From 32847f65f01da64a9971c0d59f12131614b22c00 Mon Sep 17 00:00:00 2001 From: Bubobubobubobubo Date: Thu, 24 Aug 2023 07:39:01 +0000 Subject: [PATCH] deploy: fbf5d5d8757d83edac354bea023103109dcab95a --- .../{index-7c8b8c12.js => index-72db4df9.js} | 44 +++++++++---------- index.html | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) rename assets/{index-7c8b8c12.js => index-72db4df9.js} (95%) diff --git a/assets/index-7c8b8c12.js b/assets/index-72db4df9.js similarity index 95% rename from assets/index-7c8b8c12.js rename to assets/index-72db4df9.js index ed10a40..5e35cff 100644 --- a/assets/index-7c8b8c12.js +++ b/assets/index-72db4df9.js @@ -1,4 +1,4 @@ -var EA=Object.defineProperty;var bA=(n,e,t)=>e in n?EA(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var I=(n,e,t)=>(bA(n,typeof e!="symbol"?e+"":e,t),t),ic=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var Q=(n,e,t)=>(ic(n,e,"read from private field"),t?t.call(n):e.get(n)),tt=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Qe=(n,e,t,r)=>(ic(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);var io=(n,e,t,r)=>({set _(i){Qe(n,e,i,t)},get _(){return Q(n,e,r)}}),Ue=(n,e,t)=>(ic(n,e,"access private method"),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function t(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=t(i);fetch(i.href,a)}})();const jm=n=>{n=1831565813+(n|=0)|0;let e=Math.imul(n^n>>>15,1|n);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296};class TA{constructor(e){this.dictionaries=void 0,this.length=void 0,this.separator=void 0,this.style=void 0,this.seed=void 0;const{length:t,separator:r,dictionaries:i,style:a,seed:s}=e;this.dictionaries=i,this.separator=r,this.length=t,this.style=a,this.seed=s}generate(){if(!this.dictionaries)throw new Error('Cannot find any dictionary. Please provide at least one, or leave the "dictionary" field empty in the config object');if(this.length<=0)throw new Error("Invalid length provided");if(this.length>this.dictionaries.length)throw new Error(`The length cannot be bigger than the number of dictionaries. +var EA=Object.defineProperty;var bA=(n,e,t)=>e in n?EA(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var R=(n,e,t)=>(bA(n,typeof e!="symbol"?e+"":e,t),t),ic=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var Q=(n,e,t)=>(ic(n,e,"read from private field"),t?t.call(n):e.get(n)),tt=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Qe=(n,e,t,r)=>(ic(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);var io=(n,e,t,r)=>({set _(i){Qe(n,e,i,t)},get _(){return Q(n,e,r)}}),Ue=(n,e,t)=>(ic(n,e,"access private method"),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function t(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=t(i);fetch(i.href,a)}})();const jm=n=>{n=1831565813+(n|=0)|0;let e=Math.imul(n^n>>>15,1|n);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296};class TA{constructor(e){this.dictionaries=void 0,this.length=void 0,this.separator=void 0,this.style=void 0,this.seed=void 0;const{length:t,separator:r,dictionaries:i,style:a,seed:s}=e;this.dictionaries=i,this.separator=r,this.length=t,this.style=a,this.seed=s}generate(){if(!this.dictionaries)throw new Error('Cannot find any dictionary. Please provide at least one, or leave the "dictionary" field empty in the config object');if(this.length<=0)throw new Error("Invalid length provided");if(this.length>this.dictionaries.length)throw new Error(`The length cannot be bigger than the number of dictionaries. Length provided: ${this.length}. Number of dictionaries provided: ${this.dictionaries.length}`);let e=this.seed;return this.dictionaries.slice(0,this.length).reduce((t,r)=>{let i;e?(i=(s=>{if(typeof s=="string"){const o=s.split("").map(u=>u.charCodeAt(0)).reduce((u,d)=>u+d,1),l=Math.floor(Number(o));return jm(l)}return jm(s)})(e),e=4294967296*i):i=Math.random();let a=r[Math.floor(i*r.length)]||"";if(this.style==="lowerCase")a=a.toLowerCase();else if(this.style==="capital"){const[s,...o]=a.split("");a=s.toUpperCase()+o.join("")}else this.style==="upperCase"&&(a=a.toUpperCase());return t?`${t}${this.separator}${a}`:`${a}`},"")}}const Jm={separator:"_",dictionaries:[]},CA=n=>{const e=[...n&&n.dictionaries||Jm.dictionaries],t={...Jm,...n,length:n&&n.length||e.length,dictionaries:e};if(!n||!n.dictionaries||!n.dictionaries.length)throw new Error('A "dictionaries" array must be provided. This is a breaking change introduced starting from Unique Name Generator v4. Read more about the breaking change here: https://github.com/andreasonny83/unique-names-generator#migration-guide');return new TA(t).generate()};var vA=["able","above","absent","absolute","abstract","abundant","academic","acceptable","accepted","accessible","accurate","accused","active","actual","acute","added","additional","adequate","adjacent","administrative","adorable","advanced","adverse","advisory","aesthetic","afraid","aggregate","aggressive","agreeable","agreed","agricultural","alert","alive","alleged","allied","alone","alright","alternative","amateur","amazing","ambitious","amused","ancient","angry","annoyed","annual","anonymous","anxious","appalling","apparent","applicable","appropriate","arbitrary","architectural","armed","arrogant","artificial","artistic","ashamed","asleep","assistant","associated","atomic","attractive","automatic","autonomous","available","average","awake","aware","awful","awkward","back","bad","balanced","bare","basic","beautiful","beneficial","better","bewildered","big","binding","biological","bitter","bizarre","blank","blind","blonde","bloody","blushing","boiling","bold","bored","boring","bottom","brainy","brave","breakable","breezy","brief","bright","brilliant","broad","broken","bumpy","burning","busy","calm","capable","capitalist","careful","casual","causal","cautious","central","certain","changing","characteristic","charming","cheap","cheerful","chemical","chief","chilly","chosen","christian","chronic","chubby","circular","civic","civil","civilian","classic","classical","clean","clear","clever","clinical","close","closed","cloudy","clumsy","coastal","cognitive","coherent","cold","collective","colonial","colorful","colossal","coloured","colourful","combative","combined","comfortable","coming","commercial","common","communist","compact","comparable","comparative","compatible","competent","competitive","complete","complex","complicated","comprehensive","compulsory","conceptual","concerned","concrete","condemned","confident","confidential","confused","conscious","conservation","conservative","considerable","consistent","constant","constitutional","contemporary","content","continental","continued","continuing","continuous","controlled","controversial","convenient","conventional","convinced","convincing","cooing","cool","cooperative","corporate","correct","corresponding","costly","courageous","crazy","creative","creepy","criminal","critical","crooked","crowded","crucial","crude","cruel","cuddly","cultural","curious","curly","current","curved","cute","daily","damaged","damp","dangerous","dark","dead","deaf","deafening","dear","decent","decisive","deep","defeated","defensive","defiant","definite","deliberate","delicate","delicious","delighted","delightful","democratic","dependent","depressed","desirable","desperate","detailed","determined","developed","developing","devoted","different","difficult","digital","diplomatic","direct","dirty","disabled","disappointed","disastrous","disciplinary","disgusted","distant","distinct","distinctive","distinguished","disturbed","disturbing","diverse","divine","dizzy","domestic","dominant","double","doubtful","drab","dramatic","dreadful","driving","drunk","dry","dual","due","dull","dusty","dutch","dying","dynamic","eager","early","eastern","easy","economic","educational","eerie","effective","efficient","elaborate","elated","elderly","eldest","electoral","electric","electrical","electronic","elegant","eligible","embarrassed","embarrassing","emotional","empirical","empty","enchanting","encouraging","endless","energetic","enormous","enthusiastic","entire","entitled","envious","environmental","equal","equivalent","essential","established","estimated","ethical","ethnic","eventual","everyday","evident","evil","evolutionary","exact","excellent","exceptional","excess","excessive","excited","exciting","exclusive","existing","exotic","expected","expensive","experienced","experimental","explicit","extended","extensive","external","extra","extraordinary","extreme","exuberant","faint","fair","faithful","familiar","famous","fancy","fantastic","far","fascinating","fashionable","fast","fat","fatal","favourable","favourite","federal","fellow","female","feminist","few","fierce","filthy","final","financial","fine","firm","fiscal","fit","fixed","flaky","flat","flexible","fluffy","fluttering","flying","following","fond","foolish","foreign","formal","formidable","forthcoming","fortunate","forward","fragile","frail","frantic","free","frequent","fresh","friendly","frightened","front","frozen","full","fun","functional","fundamental","funny","furious","future","fuzzy","gastric","gay","general","generous","genetic","gentle","genuine","geographical","giant","gigantic","given","glad","glamorous","gleaming","global","glorious","golden","good","gorgeous","gothic","governing","graceful","gradual","grand","grateful","greasy","great","grieving","grim","gross","grotesque","growing","grubby","grumpy","guilty","handicapped","handsome","happy","hard","harsh","head","healthy","heavy","helpful","helpless","hidden","high","hilarious","hissing","historic","historical","hollow","holy","homeless","homely","hon","honest","horizontal","horrible","hostile","hot","huge","human","hungry","hurt","hushed","husky","icy","ideal","identical","ideological","ill","illegal","imaginative","immediate","immense","imperial","implicit","important","impossible","impressed","impressive","improved","inadequate","inappropriate","inc","inclined","increased","increasing","incredible","independent","indirect","individual","industrial","inevitable","influential","informal","inherent","initial","injured","inland","inner","innocent","innovative","inquisitive","instant","institutional","insufficient","intact","integral","integrated","intellectual","intelligent","intense","intensive","interested","interesting","interim","interior","intermediate","internal","international","intimate","invisible","involved","irrelevant","isolated","itchy","jealous","jittery","joint","jolly","joyous","judicial","juicy","junior","just","keen","key","kind","known","labour","large","late","latin","lazy","leading","left","legal","legislative","legitimate","lengthy","lesser","level","lexical","liable","liberal","light","like","likely","limited","linear","linguistic","liquid","literary","little","live","lively","living","local","logical","lonely","long","loose","lost","loud","lovely","low","loyal","ltd","lucky","mad","magic","magnetic","magnificent","main","major","male","mammoth","managerial","managing","manual","many","marginal","marine","marked","married","marvellous","marxist","mass","massive","mathematical","mature","maximum","mean","meaningful","mechanical","medical","medieval","melodic","melted","mental","mere","metropolitan","mid","middle","mighty","mild","military","miniature","minimal","minimum","ministerial","minor","miserable","misleading","missing","misty","mixed","moaning","mobile","moderate","modern","modest","molecular","monetary","monthly","moral","motionless","muddy","multiple","mushy","musical","mute","mutual","mysterious","naked","narrow","nasty","national","native","natural","naughty","naval","near","nearby","neat","necessary","negative","neighbouring","nervous","net","neutral","new","nice","noble","noisy","normal","northern","nosy","notable","novel","nuclear","numerous","nursing","nutritious","nutty","obedient","objective","obliged","obnoxious","obvious","occasional","occupational","odd","official","ok","okay","old","olympic","only","open","operational","opposite","optimistic","oral","ordinary","organic","organisational","original","orthodox","other","outdoor","outer","outrageous","outside","outstanding","overall","overseas","overwhelming","painful","pale","panicky","parallel","parental","parliamentary","partial","particular","passing","passive","past","patient","payable","peaceful","peculiar","perfect","permanent","persistent","personal","petite","philosophical","physical","plain","planned","plastic","pleasant","pleased","poised","polite","political","poor","popular","positive","possible","potential","powerful","practical","precious","precise","preferred","pregnant","preliminary","premier","prepared","present","presidential","pretty","previous","prickly","primary","prime","primitive","principal","printed","prior","private","probable","productive","professional","profitable","profound","progressive","prominent","promising","proper","proposed","prospective","protective","protestant","proud","provincial","psychiatric","psychological","public","puny","pure","purring","puzzled","quaint","qualified","quarrelsome","querulous","quick","quickest","quiet","quintessential","quixotic","racial","radical","rainy","random","rapid","rare","raspy","rational","ratty","raw","ready","real","realistic","rear","reasonable","recent","reduced","redundant","regional","registered","regular","regulatory","related","relative","relaxed","relevant","reliable","relieved","religious","reluctant","remaining","remarkable","remote","renewed","representative","repulsive","required","resident","residential","resonant","respectable","respective","responsible","resulting","retail","retired","revolutionary","rich","ridiculous","right","rigid","ripe","rising","rival","roasted","robust","rolling","romantic","rotten","rough","round","royal","rubber","rude","ruling","running","rural","sacred","sad","safe","salty","satisfactory","satisfied","scared","scary","scattered","scientific","scornful","scrawny","screeching","secondary","secret","secure","select","selected","selective","selfish","semantic","senior","sensible","sensitive","separate","serious","severe","sexual","shaggy","shaky","shallow","shared","sharp","sheer","shiny","shivering","shocked","short","shrill","shy","sick","significant","silent","silky","silly","similar","simple","single","skilled","skinny","sleepy","slight","slim","slimy","slippery","slow","small","smart","smiling","smoggy","smooth","social","socialist","soft","solar","sole","solid","sophisticated","sore","sorry","sound","sour","southern","soviet","spare","sparkling","spatial","special","specific","specified","spectacular","spicy","spiritual","splendid","spontaneous","sporting","spotless","spotty","square","squealing","stable","stale","standard","static","statistical","statutory","steady","steep","sticky","stiff","still","stingy","stormy","straight","straightforward","strange","strategic","strict","striking","striped","strong","structural","stuck","stupid","subjective","subsequent","substantial","subtle","successful","successive","sudden","sufficient","suitable","sunny","super","superb","superior","supporting","supposed","supreme","sure","surprised","surprising","surrounding","surviving","suspicious","sweet","swift","symbolic","sympathetic","systematic","tall","tame","tart","tasteless","tasty","technical","technological","teenage","temporary","tender","tense","terrible","territorial","testy","then","theoretical","thick","thin","thirsty","thorough","thoughtful","thoughtless","thundering","tight","tiny","tired","top","tory","total","tough","toxic","traditional","tragic","tremendous","tricky","tropical","troubled","typical","ugliest","ugly","ultimate","unable","unacceptable","unaware","uncertain","unchanged","uncomfortable","unconscious","underground","underlying","unemployed","uneven","unexpected","unfair","unfortunate","unhappy","uniform","uninterested","unique","united","universal","unknown","unlikely","unnecessary","unpleasant","unsightly","unusual","unwilling","upper","upset","uptight","urban","urgent","used","useful","useless","usual","vague","valid","valuable","variable","varied","various","varying","vast","verbal","vertical","very","vicarious","vicious","victorious","violent","visible","visiting","visual","vital","vitreous","vivacious","vivid","vocal","vocational","voiceless","voluminous","voluntary","vulnerable","wandering","warm","wasteful","watery","weak","wealthy","weary","wee","weekly","weird","welcome","well","western","wet","whispering","whole","wicked","wide","widespread","wild","wilful","willing","willowy","wily","wise","wispy","wittering","witty","wonderful","wooden","working","worldwide","worried","worrying","worthwhile","worthy","written","wrong","xenacious","xenial","xenogeneic","xenophobic","xeric","xerothermic","yabbering","yammering","yappiest","yappy","yawning","yearling","yearning","yeasty","yelling","yelping","yielding","yodelling","young","youngest","youthful","ytterbic","yucky","yummy","zany","zealous","zeroth","zestful","zesty","zippy","zonal","zoophagous","zygomorphic","zygotic"],yA=["aardvark","aardwolf","albatross","alligator","alpaca","amphibian","anaconda","angelfish","anglerfish","ant","anteater","antelope","antlion","ape","aphid","armadillo","asp","baboon","badger","bandicoot","barnacle","barracuda","basilisk","bass","bat","bear","beaver","bedbug","bee","beetle","bird","bison","blackbird","boa","boar","bobcat","bobolink","bonobo","booby","bovid","bug","butterfly","buzzard","camel","canid","canidae","capybara","cardinal","caribou","carp","cat","caterpillar","catfish","catshark","cattle","centipede","cephalopod","chameleon","cheetah","chickadee","chicken","chimpanzee","chinchilla","chipmunk","cicada","clam","clownfish","cobra","cockroach","cod","condor","constrictor","coral","cougar","cow","coyote","crab","crane","crawdad","crayfish","cricket","crocodile","crow","cuckoo","damselfly","deer","dingo","dinosaur","dog","dolphin","donkey","dormouse","dove","dragon","dragonfly","duck","eagle","earthworm","earwig","echidna","eel","egret","elephant","elk","emu","ermine","falcon","felidae","ferret","finch","firefly","fish","flamingo","flea","fly","flyingfish","fowl","fox","frog","galliform","gamefowl","gayal","gazelle","gecko","gerbil","gibbon","giraffe","goat","goldfish","goose","gopher","gorilla","grasshopper","grouse","guan","guanaco","guineafowl","gull","guppy","haddock","halibut","hamster","hare","harrier","hawk","hedgehog","heron","herring","hippopotamus","hookworm","hornet","horse","hoverfly","hummingbird","hyena","iguana","impala","jackal","jaguar","jay","jellyfish","junglefowl","kangaroo","kingfisher","kite","kiwi","koala","koi","krill","ladybug","lamprey","landfowl","lark","leech","lemming","lemur","leopard","leopon","limpet","lion","lizard","llama","lobster","locust","loon","louse","lungfish","lynx","macaw","mackerel","magpie","mammal","manatee","mandrill","marlin","marmoset","marmot","marsupial","marten","mastodon","meadowlark","meerkat","mink","minnow","mite","mockingbird","mole","mollusk","mongoose","monkey","moose","mosquito","moth","mouse","mule","muskox","narwhal","newt","nightingale","ocelot","octopus","opossum","orangutan","orca","ostrich","otter","owl","ox","panda","panther","parakeet","parrot","parrotfish","partridge","peacock","peafowl","pelican","penguin","perch","pheasant","pig","pigeon","pike","pinniped","piranha","planarian","platypus","pony","porcupine","porpoise","possum","prawn","primate","ptarmigan","puffin","puma","python","quail","quelea","quokka","rabbit","raccoon","rat","rattlesnake","raven","reindeer","reptile","rhinoceros","roadrunner","rodent","rook","rooster","roundworm","sailfish","salamander","salmon","sawfish","scallop","scorpion","seahorse","shark","sheep","shrew","shrimp","silkworm","silverfish","skink","skunk","sloth","slug","smelt","snail","snake","snipe","sole","sparrow","spider","spoonbill","squid","squirrel","starfish","stingray","stoat","stork","sturgeon","swallow","swan","swift","swordfish","swordtail","tahr","takin","tapir","tarantula","tarsier","termite","tern","thrush","tick","tiger","tiglon","toad","tortoise","toucan","trout","tuna","turkey","turtle","tyrannosaurus","unicorn","urial","vicuna","viper","vole","vulture","wallaby","walrus","warbler","wasp","weasel","whale","whippet","whitefish","wildcat","wildebeest","wildfowl","wolf","wolverine","wombat","woodpecker","worm","wren","xerinae","yak","zebra"],AA=["amaranth","amber","amethyst","apricot","aqua","aquamarine","azure","beige","black","blue","blush","bronze","brown","chocolate","coffee","copper","coral","crimson","cyan","emerald","fuchsia","gold","gray","green","harlequin","indigo","ivory","jade","lavender","lime","magenta","maroon","moccasin","olive","orange","peach","pink","plum","purple","red","rose","salmon","sapphire","scarlet","silver","tan","teal","tomato","turquoise","violet","white","yellow"];class mt{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),kn.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let r=[];return this.decompose(e,t,r,0),kn.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new hs(this),a=new hs(e);for(let s=t,o=t;;){if(i.next(s),a.next(s),s=0,i.lineBreak!=a.lineBreak||i.done!=a.done||i.value!=a.value)return!1;if(o+=i.value.length,i.done||o>=r)return!0}}iter(e=1){return new hs(this,e)}iterRange(e,t=this.length){return new wT(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new xT(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?mt.empty:e.length<=32?new Ht(e):kn.from(Ht.split(e,[]))}}class Ht extends mt{constructor(e,t=RA(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let a=0;;a++){let s=this.text[a],o=i+s.length;if((t?r:o)>=e)return new IA(i,o,r,s);i=o+1,r++}}decompose(e,t,r,i){let a=e<=0&&t>=this.length?this:new Ht(e_(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let s=r.pop(),o=Do(a.text,s.text.slice(),0,a.length);if(o.length<=32)r.push(new Ht(o,s.length+a.length));else{let l=o.length>>1;r.push(new Ht(o.slice(0,l)),new Ht(o.slice(l)))}}else r.push(a)}replace(e,t,r){if(!(r instanceof Ht))return super.replace(e,t,r);let i=Do(this.text,Do(r.text,e_(this.text,0,e)),t),a=this.length+r.length-(t-e);return i.length<=32?new Ht(i,a):kn.from(Ht.split(i,[]),a)}sliceString(e,t=this.length,r=` `){let i="";for(let a=0,s=0;a<=t&&se&&s&&(i+=r),ea&&(i+=o.slice(Math.max(0,e-a),t-a)),a=l+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let a of e)r.push(a),i+=a.length+1,r.length==32&&(t.push(new Ht(r,i)),r=[],i=-1);return i>-1&&t.push(new Ht(r,i)),t}}class kn extends mt{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let a=0;;a++){let s=this.children[a],o=i+s.length,l=r+s.lines-1;if((t?l:o)>=e)return s.lineInner(e,t,r,i);i=o+1,r=l+1}}decompose(e,t,r,i){for(let a=0,s=0;s<=t&&a=s){let u=i&((s<=e?1:0)|(l>=t?2:0));s>=e&&l<=t&&!u?r.push(o):o.decompose(e-s,t-s,r,u)}s=l+1}}replace(e,t,r){if(r.lines=a&&t<=o){let l=s.replace(e-a,t-a,r),u=this.lines-s.lines+l.lines;if(l.lines>5-1&&l.lines>u>>5+1){let d=this.children.slice();return d[i]=l,new kn(d,this.length-(t-e)+r.length)}return super.replace(a,o,l)}a=o+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=` `){let i="";for(let a=0,s=0;ae&&a&&(i+=r),es&&(i+=o.sliceString(e-s,t-s,r)),s=l+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof kn))return 0;let r=0,[i,a,s,o]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,a+=t){if(i==s||a==o)return r;let l=this.children[i],u=e.children[a];if(l!=u)return r+l.scanIdentical(u,t);r+=l.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let g of e)r+=g.lines;if(r<32){let g=[];for(let b of e)b.flatten(g);return new Ht(g,t)}let i=Math.max(32,r>>5),a=i<<1,s=i>>1,o=[],l=0,u=-1,d=[];function f(g){let b;if(g.lines>a&&g instanceof kn)for(let v of g.children)f(v);else g.lines>s&&(l>s||!l)?(m(),o.push(g)):g instanceof Ht&&l&&(b=d[d.length-1])instanceof Ht&&g.lines+b.lines<=32?(l+=g.lines,u+=g.length+1,d[d.length-1]=new Ht(b.text.concat(g.text),b.length+1+g.length)):(l+g.lines>i&&m(),l+=g.lines,u+=g.length+1,d.push(g))}function m(){l!=0&&(o.push(d.length==1?d[0]:kn.from(d,u)),u=-1,l=d.length=0)}for(let g of e)f(g);return m(),o.length==1?o[0]:new kn(o,t)}}mt.empty=new Ht([""],0);function RA(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Do(n,e,t=0,r=1e9){for(let i=0,a=0,s=!0;a=t&&(l>r&&(o=o.slice(0,r-i)),i0?1:(e instanceof Ht?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],a=this.offsets[r],s=a>>1,o=i instanceof Ht?i.text.length:i.children.length;if(s==(t>0?o:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((a&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=` @@ -26,33 +26,33 @@ Length provided: ${this.length}. Number of dictionaries provided: ${this.diction `?"":t;else{let i=t.indexOf(` `);r=i<0?t:t.slice(0,i)}return e+r.length>this.to?r.slice(0,this.to-e):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,r=0){this.block=fl.create(e,r,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,r=0){this.startContext(this.parser.getNodeType(e),t,r)}addNode(e,t,r){typeof e=="number"&&(e=new gt(this.parser.nodeSet.types[e],Pa,Pa,(r??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(Sh(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?Kv(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let r of e.parsers)if(r.finish(this,e))return;let t=Sh(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(ge.Paragraph,e.content.length),e.start)}elt(e,t,r,i){return typeof e=="string"?_t(this.parser.getNodeType(e),t,r,i):new e1(e,t)}get buffer(){return new Jv(this.parser.nodeSet)}}function Kv(n,e,t,r,i){let a=n[e].to,s=[],o=[],l=t.from+r;function u(d,f){for(;f?d>=a:d>a;){let m=n[e+1].from-a;r+=m,d+=m,e++,a=n[e].to}}for(let d=t.firstChild;d;d=d.nextSibling){u(d.from+r,!0);let f=d.from+r,m,g=i.get(d.tree);g?m=g:d.to+r>a?(m=Kv(n,e,d,r,i),u(d.to+r,!1)):m=d.toTree(),s.push(m),o.push(f-l)}return u(t.to+r,!1),new gt(t.type,s,o,t.to+r-l,t.tree?t.tree.propValues:void 0)}class Ql extends jh{constructor(e,t,r,i,a,s,o,l,u){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=a,this.skipContextMarkup=s,this.inlineParsers=o,this.inlineNames=l,this.wrappers=u,this.nodeTypes=Object.create(null);for(let d of e.types)this.nodeTypes[d.name]=d.id}createParse(e,t,r){let i=new fw(this,e,t,r);for(let a of this.wrappers)i=a(i,e,t,r);return i}configure(e){let t=gh(e);if(!t)return this;let{nodeSet:r,skipContextMarkup:i}=this,a=this.blockParsers.slice(),s=this.leafBlockParsers.slice(),o=this.blockNames.slice(),l=this.inlineParsers.slice(),u=this.inlineNames.slice(),d=this.endLeafBlock.slice(),f=this.wrappers;if(ts(t.defineNodes)){i=Object.assign({},i);let m=r.types.slice(),g;for(let b of t.defineNodes){let{name:v,block:y,composite:N,style:F}=typeof b=="string"?{name:b}:b;if(m.some(E=>E.name==v))continue;N&&(i[m.length]=(E,O,A)=>N(O,A,E.value));let X=m.length,p=N?["Block","BlockContext"]:y?X>=ge.ATXHeading1&&X<=ge.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;m.push(rr.define({id:X,name:v,props:p&&[[Ze.group,p]]})),F&&(g||(g={}),Array.isArray(F)||F instanceof Cn?g[v]=F:Object.assign(g,F))}r=new Ws(m),g&&(r=r.extend(Qa(g)))}if(ts(t.props)&&(r=r.extend(...t.props)),ts(t.remove))for(let m of t.remove){let g=this.blockNames.indexOf(m),b=this.inlineNames.indexOf(m);g>-1&&(a[g]=s[g]=void 0),b>-1&&(l[b]=void 0)}if(ts(t.parseBlock))for(let m of t.parseBlock){let g=o.indexOf(m.name);if(g>-1)a[g]=m.parse,s[g]=m.leaf;else{let b=m.before?vo(o,m.before):m.after?vo(o,m.after)+1:o.length-1;a.splice(b,0,m.parse),s.splice(b,0,m.leaf),o.splice(b,0,m.name)}m.endLeaf&&d.push(m.endLeaf)}if(ts(t.parseInline))for(let m of t.parseInline){let g=u.indexOf(m.name);if(g>-1)l[g]=m.parse;else{let b=m.before?vo(u,m.before):m.after?vo(u,m.after)+1:u.length-1;l.splice(b,0,m.parse),u.splice(b,0,m.name)}}return t.wrap&&(f=f.concat(t.wrap)),new Ql(r,a,s,o,d,i,l,u,f)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let r=new mw(this,e,t);e:for(let i=t;i=0){i=o;continue e}}i++}return r.resolveMarkers(0)}}function ts(n){return n!=null&&n.length>0}function gh(n){if(!Array.isArray(n))return n;if(n.length==0)return null;let e=gh(n[0]);if(n.length==1)return e;let t=gh(n.slice(1));if(!t||!e)return e||t;let r=(s,o)=>(s||Pa).concat(o||Pa),i=e.wrap,a=t.wrap;return{props:r(e.props,t.props),defineNodes:r(e.defineNodes,t.defineNodes),parseBlock:r(e.parseBlock,t.parseBlock),parseInline:r(e.parseInline,t.parseInline),remove:r(e.remove,t.remove),wrap:i?a?(s,o,l,u)=>i(a(s,o,l,u),o,l,u):i:a}}function vo(n,e){let t=n.indexOf(e);if(t<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return t}let jv=[rr.none];for(let n=1,e;e=ge[n];n++)jv[n]=rr.define({id:n,name:e,props:n>=ge.Escape?[]:[[Ze.group,n in Qv?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const Pa=[];class Jv{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,r,i=0){return this.content.push(e,t,r,4+i*4),this}writeElements(e,t=0){for(let r of e)r.writeTo(this,t);return this}finish(e,t){return gt.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}}let Ls=class{constructor(e,t,r,i=Pa){this.type=e,this.from=t,this.to=r,this.children=i}writeTo(e,t){let r=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-r)}toTree(e){return new Jv(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class e1{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Pa}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}}function _t(n,e,t,r){return new Ls(n,e,t,r)}const t1={resolve:"Emphasis",mark:"EmphasisMark"},r1={resolve:"Emphasis",mark:"EmphasisMark"},rs={},Xg={};class vn{constructor(e,t,r,i){this.type=e,this.from=t,this.to=r,this.side=i}}const Zg="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let ks=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{ks=new RegExp("[\\p{Pc}|\\p{Pd}|\\p{Pe}|\\p{Pf}|\\p{Pi}|\\p{Po}|\\p{Ps}]","u")}catch{}const Rc={Escape(n,e,t){if(e!=92||t==n.end-1)return-1;let r=n.char(t+1);for(let i=0;i]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return n.append(_t(ge.URL,t,t+1+i[0].length));let a=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(a)return n.append(_t(ge.Comment,t,t+1+a[0].length));let s=/^\?[^]*?\?>/.exec(r);if(s)return n.append(_t(ge.ProcessingInstruction,t,t+1+s[0].length));let o=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return o?n.append(_t(ge.HTMLTag,t,t+1+o[0].length)):-1},Emphasis(n,e,t){if(e!=95&&e!=42)return-1;let r=t+1;for(;n.char(r)==e;)r++;let i=n.slice(t-1,t),a=n.slice(r,r+1),s=ks.test(i),o=ks.test(a),l=/\s|^$/.test(i),u=/\s|^$/.test(a),d=!u&&(!o||l||s),f=!l&&(!s||u||o),m=d&&(e==42||!f||s),g=f&&(e==42||!d||o);return n.append(new vn(e==95?t1:r1,t,r,(m?1:0)|(g?2:0)))},HardBreak(n,e,t){if(e==92&&n.char(t+1)==10)return n.append(_t(ge.HardBreak,t,t+2));if(e==32){let r=t+1;for(;n.char(r)==32;)r++;if(n.char(r)==10&&r>=t+2)return n.append(_t(ge.HardBreak,t,r+1))}return-1},Link(n,e,t){return e==91?n.append(new vn(rs,t,t+1,1)):-1},Image(n,e,t){return e==33&&n.char(t+1)==91?n.append(new vn(Xg,t,t+2,1)):-1},LinkEnd(n,e,t){if(e!=93)return-1;for(let r=n.parts.length-1;r>=0;r--){let i=n.parts[r];if(i instanceof vn&&(i.type==rs||i.type==Xg)){if(!i.side||n.skipSpace(i.to)==t&&!/[(\[]/.test(n.slice(t+1,t+2)))return n.parts[r]=null,-1;let a=n.takeContent(r),s=n.parts[r]=hw(n,a,i.type==rs?ge.Link:ge.Image,i.from,t+1);if(i.type==rs)for(let o=0;oe?_t(ge.URL,e+t,a+t):a==n.length?null:!1}}function i1(n,e,t){let r=n.charCodeAt(e);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let a=e+1,s=!1;a=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,r,i,a){return this.append(new vn(e,t,r,(i?1:0)|(a?2:0)))}addElement(e){return this.append(e)}resolveMarkers(e){for(let r=e;r=e;l--){let v=this.parts[l];if(v instanceof vn&&v.side&1&&v.type==i.type&&!(a&&(i.side&1||v.side&2)&&(v.to-v.from+s)%3==0&&((v.to-v.from)%3||s%3))){o=v;break}}if(!o)continue;let u=i.type.resolve,d=[],f=o.from,m=i.to;if(a){let v=Math.min(2,o.to-o.from,s);f=o.to-v,m=i.from+v,u=v==1?"Emphasis":"StrongEmphasis"}o.type.mark&&d.push(this.elt(o.type.mark,f,o.to));for(let v=l+1;v=0;t--){let r=this.parts[t];if(r instanceof vn&&r.type==e)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}skipSpace(e){return gs(this.text,e-this.offset)+this.offset}elt(e,t,r,i){return typeof e=="string"?_t(this.parser.getNodeType(e),t,r,i):new e1(e,t)}}function Sh(n,e){if(!e.length)return n;if(!n.length)return e;let t=n.slice(),r=0;for(let i of e){for(;r(e?e-1:0))return!1;if(this.fragmentEnd<0){let a=this.fragment.to;for(;a>0&&this.input.read(a-1,a)!=` `;)a--;this.fragmentEnd=a?a-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let i=e+this.fragment.offset;for(;r.to<=i;)if(!r.parent())return!1;for(;;){if(r.from>=i)return this.fragment.from<=t;if(!r.childAfter(i))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(Ze.contextHash)==e}takeNodes(e){let t=this.cursor,r=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),a=e.absoluteLineStart,s=a,o=e.block.children.length,l=s,u=o;for(;;){if(t.to-r>i){if(t.type.isAnonymous&&t.firstChild())continue;break}let d=s1(t.from-r,e.ranges);if(t.to-r<=e.ranges[e.rangeI].to)e.addNode(t.tree,d);else{let f=new gt(e.parser.nodeSet.types[ge.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(f,t.tree),e.addNode(f,d)}if(t.type.is("Block")&&(_w.indexOf(t.type.id)<0?(s=t.to-r,o=e.block.children.length):(s=l,o=u,l=t.to-r,u=e.block.children.length)),!t.nextSibling())break}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return s-a}}function s1(n,e){let t=n;for(let r=1;rCo[n]),Object.keys(Co).map(n=>uw[n]),Object.keys(Co),dw,Qv,Object.keys(Rc).map(n=>Rc[n]),Object.keys(Rc),[]);function Ew(n,e,t){let r=[];for(let i=n.firstChild,a=e;;i=i.nextSibling){let s=i?i.from:t;if(s>a&&r.push({from:a,to:s}),!i)break;a=i.to}return r}function bw(n){let{codeParser:e,htmlParser:t}=n;return{wrap:tv((i,a)=>{let s=i.type.id;if(e&&(s==ge.CodeBlock||s==ge.FencedCode)){let o="";if(s==ge.FencedCode){let u=i.node.getChild(ge.CodeInfo);u&&(o=a.read(u.from,u.to))}let l=e(o);if(l)return{parser:l,overlay:u=>u.type.id==ge.CodeText}}else if(t&&(s==ge.HTMLBlock||s==ge.HTMLTag))return{parser:t,overlay:Ew(i.node,i.from,i.to)};return null})}}const Tw={resolve:"Strikethrough",mark:"StrikethroughMark"},Cw={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":P.strikethrough}},{name:"StrikethroughMark",style:P.processingInstruction}],parseInline:[{name:"Strikethrough",parse(n,e,t){if(e!=126||n.char(t+1)!=126||n.char(t+2)==126)return-1;let r=n.slice(t-1,t),i=n.slice(t+2,t+3),a=/\s|^$/.test(r),s=/\s|^$/.test(i),o=ks.test(r),l=ks.test(i);return n.addDelimiter(Tw,t,t+2,!s&&(!l||a||o),!a&&(!o||s||l))},after:"Emphasis"}]};function Ss(n,e,t=0,r,i=0){let a=0,s=!0,o=-1,l=-1,u=!1,d=()=>{r.push(n.elt("TableCell",i+o,i+l,n.parser.parseInline(e.slice(o,l),i+o)))};for(let f=t;f-1)&&a++,s=!1,r&&(o>-1&&d(),r.push(n.elt("TableDelimiter",f+i,f+i+1))),o=l=-1):(u||m!=32&&m!=9)&&(o<0&&(o=f),l=f+1),u=!u&&m==92}return o>-1&&(a++,r&&d()),a}function Kg(n,e){for(let t=e;ti instanceof jg)||!Kg(e.text,e.basePos))return!1;let r=n.scanLine(n.absoluteLineEnd+1).text;return o1.test(r)&&Ss(n,e.text,e.basePos)==Ss(n,r,e.basePos)},before:"SetextHeading"}]};class yw{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}const Aw={defineNodes:[{name:"Task",block:!0,style:P.list},{name:"TaskMarker",style:P.atom}],parseBlock:[{name:"TaskList",leaf(n,e){return/^\[[ xX]\][ \t]/.test(e.content)&&n.parentType().name=="ListItem"?new yw:null},after:"SetextHeading"}]},Jg=/(www\.)|(https?:\/\/)|([\w.+-]+@)|(mailto:|xmpp:)/gy,eS=/[\w-]+(\.\w+(\.\w+)?)(\/[^\s<]*)?/gy,tS=/[\w.+-]+@[\w-]+\.[\w.-]+/gy,rS=/\/[a-zA-Z\d@.]+/gy;function nS(n,e,t,r){let i=0;for(let a=e;anS(n,e,r,"("))r--;else if(i==";"&&(a=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(n.slice(e,r))))r=e+a.index;else break}return r}function iS(n,e){tS.lastIndex=e;let t=tS.exec(n);if(!t)return-1;let r=t[0][t[0].length-1];return r=="_"||r=="-"?-1:e+t[0].length-(r=="."?1:0)}const Iw={parseInline:[{name:"Autolink",parse(n,e,t){let r=t-n.offset;Jg.lastIndex=r;let i=Jg.exec(n.text),a=-1;return!i||(i[1]||i[2]?a=Rw(n.text,r+i[0].length):i[3]?a=iS(n.text,r):(a=iS(n.text,r+i[0].length),a>-1&&i[0]=="xmpp:"&&(rS.lastIndex=a,i=rS.exec(n.text),i&&(a=i.index+i[0].length))),a<0)?-1:(n.addElement(n.elt("URL",t,a+n.offset)),a+n.offset)}}]},Nw=[vw,Aw,Cw,Iw];function l1(n,e,t){return(r,i,a)=>{if(i!=n||r.char(a+1)==n)return-1;let s=[r.elt(t,a,a+1)];for(let o=a+1;o=65&&n<=90||n==95||n>=97&&n<=122||n>=161}function _1(n){return n==9||n==10||n==13||n==32}let lS=null,cS=null,uS=0;function Eh(n,e){let t=n.pos+e;if(uS==t&&cS==n)return lS;let r=n.peek(e);for(;_1(r);)r=n.peek(++e);let i="";for(;t0(r);)i+=String.fromCharCode(r),r=n.peek(++e);return cS=n,uS=t,lS=i?i.toLowerCase():r==r0||r==n0?void 0:null}const g1=60,ml=62,hm=47,r0=63,n0=33,i0=45;function dS(n,e){this.name=n,this.parent=e,this.hash=e?e.hash:0;for(let t=0;t-1?new dS(Eh(r,1)||"",n):n},reduce(n,e){return e==f1&&n?n.parent:n},reuse(n,e,t,r){let i=e.type.id;return i==hl||i==Xw?new dS(Eh(r,1)||"",n):n},hash(n){return n?n.hash:0},strict:!1}),o0=new Gn((n,e)=>{if(n.next!=g1){n.next<0&&e.context&&n.acceptToken(Ic);return}n.advance();let t=n.next==hm;t&&n.advance();let r=Eh(n,0);if(r===void 0)return;if(!r)return n.acceptToken(t?$w:hl);let i=e.context?e.context.name:null;if(t){if(r==i)return n.acceptToken(Yw);if(i&&e0[i])return n.acceptToken(Ic,-2);if(e.dialectEnabled(Kw))return n.acceptToken(Gw);for(let a=e.context;a;a=a.parent)if(a.name==r)return;n.acceptToken(Qw)}else{if(r=="script")return n.acceptToken(c1);if(r=="style")return n.acceptToken(u1);if(r=="textarea")return n.acceptToken(d1);if(Jw.hasOwnProperty(r))return n.acceptToken(p1);i&&oS[i]&&oS[i][r]?n.acceptToken(Ic,-1):n.acceptToken(hl)}},{contextual:!0}),l0=new Gn(n=>{for(let e=0,t=0;;t++){if(n.next<0){t&&n.acceptToken(sS);break}if(n.next==i0)e++;else if(n.next==ml&&e>=2){t>3&&n.acceptToken(sS,-2);break}else e=0;n.advance()}});function c0(n){for(;n;n=n.parent)if(n.name=="svg"||n.name=="math")return!0;return!1}const u0=new Gn((n,e)=>{if(n.next==hm&&n.peek(1)==ml){let t=e.dialectEnabled(jw)||c0(e.context);n.acceptToken(t?Fw:aS,2)}else n.next==ml&&n.acceptToken(aS,1)});function mm(n,e,t){let r=2+n.length;return new Gn(i=>{for(let a=0,s=0,o=0;;o++){if(i.next<0){o&&i.acceptToken(e);break}if(a==0&&i.next==g1||a==1&&i.next==hm||a>=2&&as?i.acceptToken(e,-s):i.acceptToken(t,-(s-2));break}else if((i.next==10||i.next==13)&&o){i.acceptToken(e,1);break}else a=s=0;i.advance()}})}const d0=mm("script",Lw,kw),p0=mm("style",Mw,Pw),f0=mm("textarea",Bw,Uw),h0=Qa({"Text RawText":P.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":P.angleBracket,TagName:P.tagName,"MismatchedCloseTag/TagName":[P.tagName,P.invalid],AttributeName:P.attributeName,"AttributeValue UnquotedAttributeValue":P.attributeValue,Is:P.definitionOperator,"EntityReference CharacterReference":P.character,Comment:P.blockComment,ProcessingInst:P.processingInstruction,DoctypeDecl:P.documentMeta}),m0=wa.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1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ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:s0,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[h0],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+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O*V!R!;uP;=`<%l!4t!V!{let u=o.type.id;if(u==Hw)return Nc(o,l,t);if(u==zw)return Nc(o,l,r);if(u==Ww)return Nc(o,l,i);if(u==f1&&a.length){let d=o.node,f=d.firstChild,m=f&&pS(f,l),g;if(m){for(let b of a)if(b.tag==m&&(!b.attrs||b.attrs(g||(g=S1(d,l))))){let v=d.lastChild;return{parser:b.parser,overlay:[{from:f.to,to:v.type.id==Zw?v.from:d.to}]}}}}if(s&&u==h1){let d=o.node,f;if(f=d.firstChild){let m=s[l.read(f.from,f.to)];if(m)for(let g of m){if(g.tagName&&g.tagName!=pS(d.parent,l))continue;let b=d.lastChild;if(b.type.id==Oh){let v=b.from+1,y=b.lastChild,N=b.to-(y&&y.isError?0:1);if(N>v)return{parser:g.parser,overlay:[{from:v,to:N}]}}else if(b.type.id==m1)return{parser:g.parser,overlay:[{from:b.from,to:b.to}]}}}}return null})}const _0=96,fS=1,g0=97,S0=98,hS=2,E1=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],O0=58,E0=40,b1=95,b0=91,$o=45,T0=46,C0=35,v0=37;function _l(n){return n>=65&&n<=90||n>=97&&n<=122||n>=161}function y0(n){return n>=48&&n<=57}const A0=new Gn((n,e)=>{for(let t=!1,r=0,i=0;;i++){let{next:a}=n;if(_l(a)||a==$o||a==b1||t&&y0(a))!t&&(a!=$o||i>0)&&(t=!0),r===i&&a==$o&&r++,n.advance();else{t&&n.acceptToken(a==E0?g0:r==2&&e.canShift(hS)?hS:S0);break}}}),R0=new Gn(n=>{if(E1.includes(n.peek(-1))){let{next:e}=n;(_l(e)||e==b1||e==C0||e==T0||e==b0||e==O0||e==$o)&&n.acceptToken(_0)}}),I0=new Gn(n=>{if(!E1.includes(n.peek(-1))){let{next:e}=n;if(e==v0&&(n.advance(),n.acceptToken(fS)),_l(e)){do n.advance();while(_l(n.next));n.acceptToken(fS)}}}),N0=Qa({"AtKeyword import charset namespace keyframes media supports":P.definitionKeyword,"from to selector":P.keyword,NamespaceName:P.namespace,KeyframeName:P.labelName,KeyframeRangeName:P.operatorKeyword,TagName:P.tagName,ClassName:P.className,PseudoClassName:P.constant(P.className),IdName:P.labelName,"FeatureName PropertyName":P.propertyName,AttributeName:P.attributeName,NumberLiteral:P.number,KeywordQuery:P.keyword,UnaryQueryOp:P.operatorKeyword,"CallTag ValueName":P.atom,VariableName:P.variableName,Callee:P.operatorKeyword,Unit:P.unit,"UniversalSelector NestingSelector":P.definitionOperator,MatchOp:P.compareOperator,"ChildOp SiblingOp, LogicOp":P.logicOperator,BinOp:P.arithmeticOperator,Important:P.modifier,Comment:P.blockComment,ColorLiteral:P.color,"ParenthesizedContent StringLiteral":P.string,":":P.punctuation,"PseudoOp #":P.derefOperator,"; ,":P.separator,"( )":P.paren,"[ ]":P.squareBracket,"{ }":P.brace}),D0={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},w0={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},x0={__proto__:null,not:128,only:128},L0=wa.deserialize({version:14,states:"9bQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DPO$vQ[O'#DTOOQP'#Ej'#EjO${QdO'#DeO%gQ[O'#DrO${QdO'#DtO%xQ[O'#DvO&TQ[O'#DyO&]Q[O'#EPO&kQ[O'#EROOQS'#Ei'#EiOOQS'#EU'#EUQYQ[OOO&rQXO'#CdO'gQWO'#DaO'lQWO'#EpO'wQ[O'#EpQOQWOOP(RO#tO'#C_POOO)C@X)C@XOOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(^Q[O'#EXO(xQWO,58{O)QQ[O,59SO$qQ[O,59kO$vQ[O,59oO(^Q[O,59s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^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[!YQo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bFfSxQOy%^z;'S%^;'S;=`%o<%lO%^lFwSv[Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!`Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!RUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!Q^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!PQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[R0,I0,A0,1,2,3,4,new ol("m~RRYZ[z{a~~g~aO#Z~~dP!P!Qg~lO#[~~",28,102)],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:97,get:n=>D0[n]||-1},{term:56,get:n=>w0[n]||-1},{term:98,get:n=>x0[n]||-1}],tokenPrec:1169});let Dc=null;function wc(){if(!Dc&&typeof document=="object"&&document.body){let{style:n}=document.body,e=[],t=new Set;for(let r in n)r!="cssText"&&r!="cssFloat"&&typeof n[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),t.has(r)||(e.push(r),t.add(r)));Dc=e.sort().map(r=>({type:"property",label:r}))}return Dc||[]}const mS=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(n=>({type:"class",label:n})),_S=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(n=>({type:"keyword",label:n})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(n=>({type:"constant",label:n}))),k0=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(n=>({type:"type",label:n})),li=/^(\w[\w-]*|-\w[\w-]*|)$/,M0=/^-(-[\w-]*)?$/;function P0(n,e){var t;if((n.name=="("||n.type.isError)&&(n=n.parent||n),n.name!="ArgList")return!1;let r=(t=n.parent)===null||t===void 0?void 0:t.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const gS=new ev,B0=["Declaration"];function U0(n){for(let e=n;;){if(e.type.isTop)return e;if(!(e=e.parent))return n}}function T1(n,e,t){if(e.to-e.from>4096){let r=gS.get(e);if(r)return r;let i=[],a=new Set,s=e.cursor(Rt.IncludeAnonymous);if(s.firstChild())do for(let o of T1(n,s.node,t))a.has(o.label)||(a.add(o.label),i.push(o));while(s.nextSibling());return gS.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(a=>{var s;if(t(a)&&a.matchContext(B0)&&((s=a.node.nextSibling)===null||s===void 0?void 0:s.name)==":"){let o=n.sliceString(a.from,a.to);i.has(o)||(i.add(o),r.push({label:o,type:"variable"}))}}),r}}const F0=n=>e=>{let{state:t,pos:r}=e,i=Ut(t).resolveInner(r,-1),a=i.type.isError&&i.from==i.to-1&&t.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(a||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:wc(),validFor:li};if(i.name=="ValueName")return{from:i.from,options:_S,validFor:li};if(i.name=="PseudoClassName")return{from:i.from,options:mS,validFor:li};if(n(i)||(e.explicit||a)&&P0(i,t.doc))return{from:n(i)||a?i.from:r,options:T1(t.doc,U0(i),n),validFor:M0};if(i.name=="TagName"){for(let{parent:l}=i;l;l=l.parent)if(l.name=="Block")return{from:i.from,options:wc(),validFor:li};return{from:i.from,options:k0,validFor:li}}if(!e.explicit)return null;let s=i.resolve(r),o=s.childBefore(r);return o&&o.name==":"&&s.name=="PseudoClassSelector"?{from:r,options:mS,validFor:li}:o&&o.name==":"&&s.name=="Declaration"||s.name=="ArgList"?{from:r,options:_S,validFor:li}:s.name=="Block"||s.name=="Styles"?{from:r,options:wc(),validFor:li}:null},Y0=F0(n=>n.name=="VariableName"),gl=xa.define({name:"css",parser:L0.configure({props:[Xs.add({Declaration:Go()}),Zs.add({"Block KeyframeList":pv})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function G0(){return new Is(gl,gl.data.of({autocomplete:Y0}))}const ns=["_blank","_self","_top","_parent"],xc=["ascii","utf-8","utf-16","latin1","latin1"],Lc=["get","post","put","delete"],kc=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Vr=["true","false"],ke={},Q0={a:{attrs:{href:null,ping:null,type:null,media:null,target:ns,hreflang:null}},abbr:ke,address:ke,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:ke,aside:ke,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:ke,base:{attrs:{href:null,target:ns}},bdi:ke,bdo:ke,blockquote:{attrs:{cite:null}},body:ke,br:ke,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:kc,formmethod:Lc,formnovalidate:["novalidate"],formtarget:ns,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:ke,center:ke,cite:ke,code:ke,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:ke,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:ke,div:ke,dl:ke,dt:ke,em:ke,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:ke,figure:ke,footer:ke,form:{attrs:{action:null,name:null,"accept-charset":xc,autocomplete:["on","off"],enctype:kc,method:Lc,novalidate:["novalidate"],target:ns}},h1:ke,h2:ke,h3:ke,h4:ke,h5:ke,h6:ke,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:ke,hgroup:ke,hr:ke,html:{attrs:{manifest:null}},i:ke,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:kc,formmethod:Lc,formnovalidate:["novalidate"],formtarget:ns,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:ke,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:ke,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:ke,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:xc,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:ke,noscript:ke,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:ke,param:{attrs:{name:null,value:null}},pre:ke,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:ke,rt:ke,ruby:ke,samp:ke,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:xc}},section:ke,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:ke,source:{attrs:{src:null,type:null,media:null}},span:ke,strong:ke,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:ke,summary:ke,sup:ke,table:ke,tbody:ke,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:ke,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:ke,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:ke,time:{attrs:{datetime:null}},title:ke,tr:ke,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:ke,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:ke},C1={accesskey:null,class:null,contenteditable:Vr,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Vr,autocorrect:Vr,autocapitalize:Vr,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Vr,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Vr,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Vr,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Vr,"aria-hidden":Vr,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Vr,"aria-multiselectable":Vr,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Vr,"aria-relevant":null,"aria-required":Vr,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},v1="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(n=>"on"+n);for(let n of v1)C1[n]=null;class Ms{constructor(e,t){this.tags=Object.assign(Object.assign({},Q0),e),this.globalAttrs=Object.assign(Object.assign({},C1),t),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Ms.default=new Ms;function Ba(n,e,t=n.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?n.sliceString(i.from,Math.min(i.to,t)):""}function Ua(n,e=!1){for(;n;n=n.parent)if(n.name=="Element")if(e)e=!1;else return n;return null}function y1(n,e,t){let r=t.tags[Ba(n,Ua(e))];return(r==null?void 0:r.children)||t.allTags}function _m(n,e){let t=[];for(let r=Ua(e);r&&!r.type.isTop;r=Ua(r.parent)){let i=Ba(n,r);if(i&&r.lastChild.name=="CloseTag")break;i&&t.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&t.push(i)}return t}const A1=/^[:\-\.\w\u00b7-\uffff]*$/;function SS(n,e,t,r,i){let a=/\s*>/.test(n.sliceDoc(i,i+5))?"":">",s=Ua(t,!0);return{from:r,to:i,options:y1(n.doc,s,e).map(o=>({label:o,type:"type"})).concat(_m(n.doc,t).map((o,l)=>({label:"/"+o,apply:"/"+o+a,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function OS(n,e,t,r){let i=/\s*>/.test(n.sliceDoc(r,r+5))?"":">";return{from:t,to:r,options:_m(n.doc,e).map((a,s)=>({label:a,apply:a+i,type:"type",boost:99-s})),validFor:A1}}function $0(n,e,t,r){let i=[],a=0;for(let s of y1(n.doc,t,e))i.push({label:"<"+s,type:"type"});for(let s of _m(n.doc,t))i.push({label:"",type:"type",boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function q0(n,e,t,r,i){let a=Ua(t),s=a?e.tags[Ba(n.doc,a)]:null,o=s&&s.attrs?Object.keys(s.attrs):[],l=s&&s.globalAttrs===!1?o:o.length?o.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:l.map(u=>({label:u,type:"property"})),validFor:A1}}function V0(n,e,t,r,i){var a;let s=(a=t.parent)===null||a===void 0?void 0:a.getChild("AttributeName"),o=[],l;if(s){let u=n.sliceDoc(s.from,s.to),d=e.globalAttrs[u];if(!d){let f=Ua(t),m=f?e.tags[Ba(n.doc,f)]:null;d=(m==null?void 0:m.attrs)&&m.attrs[u]}if(d){let f=n.sliceDoc(r,i).toLowerCase(),m='"',g='"';/^['"]/.test(f)?(l=f[0]=='"'?/^[^"]*$/:/^[^']*$/,m="",g=n.sliceDoc(i,i+1)==f[0]?"":f[0],f=f.slice(1),r++):l=/^[^\s<>='"]*$/;for(let b of d)o.push({label:b,apply:m+b+g,type:"constant"})}}return{from:r,to:i,options:o,validFor:l}}function R1(n,e){let{state:t,pos:r}=e,i=Ut(t).resolveInner(r,-1),a=i.resolve(r);for(let s=r,o;a==i&&(o=i.childBefore(s));){let l=o.lastChild;if(!l||!l.type.isError||l.fromR1(r,i)}const I1=[{tag:"script",attrs:n=>n.type=="text/typescript"||n.lang=="ts",parser:Fv.parser},{tag:"script",attrs:n=>n.type=="text/babel"||n.type=="text/jsx",parser:Yv.parser},{tag:"script",attrs:n=>n.type=="text/typescript-jsx",parser:Gv.parser},{tag:"script",attrs(n){return!n.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(n.type)},parser:Kn.parser},{tag:"style",attrs(n){return(!n.lang||n.lang=="css")&&(!n.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(n.type))},parser:gl.parser}],N1=[{name:"style",parser:gl.parser.configure({top:"Styles"})}].concat(v1.map(n=>({name:n,parser:Kn.parser}))),D1=xa.define({name:"html",parser:m0.configure({props:[Xs.add({Element(n){let e=/^(\s*)(<\/)?/.exec(n.textAfter);return n.node.to<=n.pos+e[0].length?n.continue():n.lineIndent(n.node.from)+(e[2]?0:n.unit)},"OpenTag CloseTag SelfClosingTag"(n){return n.column(n.node.from)+n.unit},Document(n){if(n.pos+/\s*/.exec(n.textAfter)[0].lengthn.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),qo=D1.configure({wrap:O1(I1,N1)});function W0(n={}){let e="",t;n.matchClosingTags===!1&&(e="noMatch"),n.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(n.nestedLanguages&&n.nestedLanguages.length||n.nestedAttributes&&n.nestedAttributes.length)&&(t=O1((n.nestedLanguages||[]).concat(I1),(n.nestedAttributes||[]).concat(N1)));let r=t?D1.configure({wrap:t,dialect:e}):e?qo.configure({dialect:e}):qo;return new Is(r,[qo.data.of({autocomplete:z0(n)}),n.autoCloseTags!==!1?X0:[],fh().support,G0().support])}const ES=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),X0=Ae.inputHandler.of((n,e,t,r)=>{if(n.composing||n.state.readOnly||e!=t||r!=">"&&r!="/"||!qo.isActiveAt(n.state,e,-1))return!1;let{state:i}=n,a=i.changeByRange(s=>{var o,l,u;let{head:d}=s,f=Ut(i).resolveInner(d,-1),m;if((f.name=="TagName"||f.name=="StartTag")&&(f=f.parent),r==">"&&f.name=="OpenTag"){if(((l=(o=f.parent)===null||o===void 0?void 0:o.lastChild)===null||l===void 0?void 0:l.name)!="CloseTag"&&(m=Ba(i.doc,f.parent,d))&&!ES.has(m)){let g=n.state.doc.sliceString(d,d+1)===">",b=`${g?"":">"}`;return{range:de.cursor(d+1),changes:{from:d+(g?1:0),insert:b}}}}else if(r=="/"&&f.name=="OpenTag"){let g=f.parent,b=g==null?void 0:g.parent;if(g.from==d-1&&((u=b.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(m=Ba(i.doc,b,d))&&!ES.has(m)){let v=n.state.doc.sliceString(d,d+1)===">",y=`/${m}${v?"":">"}`,N=d+y.length+(v?1:0);return{range:de.cursor(N),changes:{from:d,insert:y}}}}return{range:s}});return a.changes.empty?!1:(n.dispatch(a,{userEvent:"input.type",scrollIntoView:!0}),!0)}),w1=Jh({commentTokens:{block:{open:""}}}),x1=new Ze,L1=Ow.configure({props:[Zs.add(n=>!n.is("Block")||n.is("Document")||bh(n)!=null?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),x1.add(bh),Xs.add({Document:()=>null}),Fi.add({Document:w1})]});function bh(n){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(n.name);return e?+e[1]:void 0}function Z0(n,e){let t=n;for(;;){let r=t.nextSibling,i;if(!r||(i=bh(r.type))!=null&&i<=e)break;t=r}return t.to}const K0=dv.of((n,e,t)=>{for(let r=Ut(n).resolveInner(t,-1);r&&!(r.fromt)return{from:t,to:a}}return null});function gm(n){return new jr(w1,n,[K0],"markdown")}const j0=gm(L1),J0=L1.configure([Nw,ww,Dw,xw]),k1=gm(J0);function ex(n,e){return t=>{if(t&&n){let r=null;if(t=/\S*/.exec(t)[0],typeof n=="function"?r=n(t):r=ul.matchLanguageName(n,t,!0),r instanceof ul)return r.support?r.support.language.parser:Rs.getSkippingParser(r.load());if(r)return r.parser}return e?e.parser:null}}class yo{constructor(e,t,r,i,a,s,o){this.node=e,this.from=t,this.to=r,this.spaceBefore=i,this.spaceAfter=a,this.type=s,this.item=o}blank(e,t=!0){let r=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;r.length0;i--)r+=" ";return r+(t?this.spaceAfter:"")}}marker(e,t){let r=this.node.name=="OrderedList"?String(+P1(this.item,e)[2]+t):"";return this.spaceBefore+r+this.type+this.spaceAfter}}function M1(n,e){let t=[];for(let i=n;i&&i.name!="Document";i=i.parent)(i.name=="ListItem"||i.name=="Blockquote"||i.name=="FencedCode")&&t.push(i);let r=[];for(let i=t.length-1;i>=0;i--){let a=t[i],s,o=e.lineAt(a.from),l=a.from-o.from;if(a.name=="FencedCode")r.push(new yo(a,l,l,"","","",null));else if(a.name=="Blockquote"&&(s=/^[ \t]*>( ?)/.exec(o.text.slice(l))))r.push(new yo(a,l,l+s[0].length,"",s[1],">",null));else if(a.name=="ListItem"&&a.parent.name=="OrderedList"&&(s=/^([ \t]*)\d+([.)])([ \t]*)/.exec(o.text.slice(l)))){let u=s[3],d=s[0].length;u.length>=4&&(u=u.slice(0,u.length-4),d-=4),r.push(new yo(a.parent,l,l+d,s[1],u,s[2],a))}else if(a.name=="ListItem"&&a.parent.name=="BulletList"&&(s=/^([ \t]*)([-+*])([ \t]{1,4}\[[ xX]\])?([ \t]+)/.exec(o.text.slice(l)))){let u=s[4],d=s[0].length;u.length>4&&(u=u.slice(0,u.length-4),d-=4);let f=s[2];s[3]&&(f+=s[3].replace(/[xX]/," ")),r.push(new yo(a.parent,l,l+d,s[1],u,f,a))}}return r}function P1(n,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(n.from,n.from+10))}function Mc(n,e,t,r=0){for(let i=-1,a=n;;){if(a.name=="ListItem"){let o=P1(a,e),l=+o[2];if(i>=0){if(l!=i+1)return;t.push({from:a.from+o[1].length,to:a.from+o[0].length,insert:String(i+2+r)})}i=l}let s=a.nextSibling;if(!s)break;a=s}}const tx=({state:n,dispatch:e})=>{let t=Ut(n),{doc:r}=n,i=null,a=n.changeByRange(s=>{if(!s.empty||!k1.isActiveAt(n,s.from))return i={range:s};let o=s.from,l=r.lineAt(o),u=M1(t.resolveInner(o,-1),r);for(;u.length&&u[u.length-1].from>o-l.from;)u.pop();if(!u.length)return i={range:s};let d=u[u.length-1];if(d.to-d.spaceAfter.length>o-l.from)return i={range:s};let f=o>=d.to-d.spaceAfter.length&&!/\S/.test(l.text.slice(d.to));if(d.item&&f)if(d.node.firstChild.to>=o||l.from>0&&!/[^\s>]/.test(r.lineAt(l.from-1).text)){let y=u.length>1?u[u.length-2]:null,N,F="";y&&y.item?(N=l.from+y.from,F=y.marker(r,1)):N=l.from+(y?y.to:0);let X=[{from:N,to:o,insert:F}];return d.node.name=="OrderedList"&&Mc(d.item,r,X,-2),y&&y.node.name=="OrderedList"&&Mc(y.item,r,X),{range:de.cursor(N+F.length),changes:X}}else{let y="";for(let N=0,F=u.length-2;N<=F;N++)y+=u[N].blank(N\s*$/.exec(y.text);if(N&&N.index==d.from){let F=n.changes([{from:y.from+N.index,to:y.to},{from:l.from+d.from,to:l.to}]);return{range:s.map(F),changes:F}}}let m=[];d.node.name=="OrderedList"&&Mc(d.item,r,m);let g=d.item&&d.item.from]*/.exec(l.text)[0].length>=d.to)for(let y=0,N=u.length-1;y<=N;y++)b+=y==N&&!g?u[y].marker(r,1):u[y].blank(yl.from&&/\s/.test(l.text.charAt(v-l.from-1));)v--;return b=n.lineBreak+b,m.push({from:v,to:o,insert:b}),{range:de.cursor(v+b.length),changes:m}});return i?!1:(e(n.update(a,{scrollIntoView:!0,userEvent:"input"})),!0)};function bS(n){return n.name=="QuoteMark"||n.name=="ListMark"}function rx(n,e){let t=n.resolveInner(e,-1),r=e;bS(t)&&(r=t.from,t=t.parent);for(let i;i=t.childBefore(r);)if(bS(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")t=i.lastChild,r=t.to;else break;return t}const nx=({state:n,dispatch:e})=>{let t=Ut(n),r=null,i=n.changeByRange(a=>{let s=a.from,{doc:o}=n;if(a.empty&&k1.isActiveAt(n,a.from)){let l=o.lineAt(s),u=M1(rx(t,s),o);if(u.length){let d=u[u.length-1],f=d.to-d.spaceAfter.length+(d.spaceAfter?1:0);if(s-l.from>f&&!/\S/.test(l.text.slice(f,s-l.from)))return{range:de.cursor(l.from+f),changes:{from:l.from+f,to:s}};if(s-l.from==f&&(!d.item||l.from<=d.item.from||!/\S/.test(l.text.slice(0,d.to)))){let m=l.from+d.from;if(d.item&&d.node.from{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=Om(n.state,t.from);return r.line?cx(n):r.block?dx(n):!1};function Sm(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const cx=Sm(hx,0),ux=Sm(B1,0),dx=Sm((n,e)=>B1(n,e,fx(e)),0);function Om(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const is=50;function px(n,{open:e,close:t},r,i){let a=n.sliceDoc(r-is,r),s=n.sliceDoc(i,i+is),o=/\s*$/.exec(a)[0].length,l=/^\s*/.exec(s)[0].length,u=a.length-o;if(a.slice(u-e.length,u)==e&&s.slice(l,l+t.length)==t)return{open:{pos:r-o,margin:o&&1},close:{pos:i+l,margin:l&&1}};let d,f;i-r<=2*is?d=f=n.sliceDoc(r,i):(d=n.sliceDoc(r,r+is),f=n.sliceDoc(i-is,i));let m=/^\s*/.exec(d)[0].length,g=/\s*$/.exec(f)[0].length,b=f.length-g-t.length;return d.slice(m,m+e.length)==e&&f.slice(b,b+t.length)==t?{open:{pos:r+m+e.length,margin:/\s/.test(d.charAt(m+e.length))?1:0},close:{pos:i-g-t.length,margin:/\s/.test(f.charAt(b-1))?1:0}}:null}function fx(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to),a=e.length-1;a>=0&&e[a].to>r.from?e[a].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function B1(n,e,t=e.selection.ranges){let r=t.map(a=>Om(e,a.from).block);if(!r.every(a=>a))return null;let i=t.map((a,s)=>px(e,r[s],a.from,a.to));if(n!=2&&!i.every(a=>a))return{changes:e.changes(t.map((a,s)=>i[s]?[]:[{from:a.from,insert:r[s].open+" "},{from:a.to,insert:" "+r[s].close}]))};if(n!=1&&i.some(a=>a)){let a=[];for(let s=0,o;si&&(a==s||s>f.from)){i=f.from;let m=/^\s*/.exec(f.text)[0].length,g=m==f.length,b=f.text.slice(m,m+u.length)==u?m:-1;ma.comment<0&&(!a.empty||a.single))){let a=[];for(let{line:o,token:l,indent:u,empty:d,single:f}of r)(f||!d)&&a.push({from:o.from+u,insert:l+" "});let s=e.changes(a);return{changes:s,selection:e.selection.map(s,1)}}else if(n!=1&&r.some(a=>a.comment>=0)){let a=[];for(let{line:s,comment:o,token:l}of r)if(o>=0){let u=s.from+o,d=u+l.length;s.text[d-s.from]==" "&&d++,a.push({from:u,to:d})}return{changes:a}}return null}const Ch=ei.define(),mx=ei.define(),_x=De.define(),U1=De.define({combine(n){return ti(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,i)=>e(r,i)||t(r,i)})}});function gx(n){let e=0;return n.iterChangedRanges((t,r)=>e=r),e}const F1=hr.define({create(){return Un.empty},update(n,e){let t=e.state.facet(U1),r=e.annotation(Ch);if(r){let l=e.docChanged?de.single(gx(e.changes)):void 0,u=Yr.fromTransaction(e,l),d=r.side,f=d==0?n.undone:n.done;return u?f=Ol(f,f.length,t.minDepth,u):f=G1(f,e.startState.selection),new Un(d==0?r.rest:f,d==0?f:r.rest)}let i=e.annotation(mx);if((i=="full"||i=="before")&&(n=n.isolate()),e.annotation(tr.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let a=Yr.fromTransaction(e),s=e.annotation(tr.time),o=e.annotation(tr.userEvent);return a?n=n.addChanges(a,s,o,t,e):e.selection&&(n=n.addSelection(e.startState.selection,s,o,t.newGroupDelay)),(i=="full"||i=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new Un(n.done.map(Yr.fromJSON),n.undone.map(Yr.fromJSON))}});function Sx(n={}){return[F1,U1.of(n),Ae.domEventHandlers({beforeinput(e,t){let r=e.inputType=="historyUndo"?Em:e.inputType=="historyRedo"?Sl:null;return r?(e.preventDefault(),r(t)):!1}})]}function $l(n,e){return function({state:t,dispatch:r}){if(!e&&t.readOnly)return!1;let i=t.field(F1,!1);if(!i)return!1;let a=i.pop(n,t,e);return a?(r(a),!0):!1}}const Em=$l(0,!1),Sl=$l(1,!1),Ox=$l(0,!0),Ex=$l(1,!0);class Yr{constructor(e,t,r,i,a){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=i,this.selectionsAfter=a}setSelAfter(e){return new Yr(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Yr(e.changes&&Jt.fromJSON(e.changes),[],e.mapped&&Fn.fromJSON(e.mapped),e.startSelection&&de.fromJSON(e.startSelection),e.selectionsAfter.map(de.fromJSON))}static fromTransaction(e,t){let r=ln;for(let i of e.startState.facet(_x)){let a=i(e);a.length&&(r=r.concat(a))}return!r.length&&e.changes.empty?null:new Yr(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,ln)}static selection(e){return new Yr(void 0,ln,void 0,void 0,e)}}function Ol(n,e,t,r){let i=e+1>t+20?e-t-1:0,a=n.slice(i,e);return a.push(r),a}function bx(n,e){let t=[],r=!1;return n.iterChangedRanges((i,a)=>t.push(i,a)),e.iterChangedRanges((i,a,s,o)=>{for(let l=0;l=u&&s<=d&&(r=!0)}}),r}function Tx(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,r)=>t.empty!=e.ranges[r].empty).length===0}function Y1(n,e){return n.length?e.length?n.concat(e):n:e}const ln=[],Cx=200;function G1(n,e){if(n.length){let t=n[n.length-1],r=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-Cx));return r.length&&r[r.length-1].eq(e)?n:(r.push(e),Ol(n,n.length-1,1e9,t.setSelAfter(r)))}else return[Yr.selection([e])]}function vx(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function Bc(n,e){if(!n.length)return n;let t=n.length,r=ln;for(;t;){let i=yx(n[t-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let a=n.slice(0,t);return a[t-1]=i,a}else e=i.mapped,t--,r=i.selectionsAfter}return r.length?[Yr.selection(r)]:ln}function yx(n,e,t){let r=Y1(n.selectionsAfter.length?n.selectionsAfter.map(o=>o.map(e)):ln,t);if(!n.changes)return Yr.selection(r);let i=n.changes.map(e),a=e.mapDesc(n.changes,!0),s=n.mapped?n.mapped.composeDesc(a):a;return new Yr(i,it.mapEffects(n.effects,e),s,n.startSelection.map(a),r)}const Ax=/^(input\.type|delete)($|\.)/;class Un{constructor(e,t,r=0,i=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Un(this.done,this.undone):this}addChanges(e,t,r,i,a){let s=this.done,o=s[s.length-1];return o&&o.changes&&!o.changes.empty&&e.changes&&(!r||Ax.test(r))&&(!o.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):ql(t,e))}function br(n){return n.textDirectionAt(n.state.selection.main.head)==Bt.LTR}const Tm=n=>bm(n,!br(n)),Q1=n=>bm(n,br(n)),Ix=n=>bm(n,!1);function $1(n,e){return yn(n,t=>t.empty?n.moveByGroup(t,e):ql(t,e))}const Nx=n=>$1(n,!br(n)),Dx=n=>$1(n,br(n));function wx(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Vl(n,e,t){let r=Ut(n).resolveInner(e.head),i=t?Ze.closedBy:Ze.openedBy;for(let l=e.head;;){let u=t?r.childAfter(l):r.childBefore(l);if(!u)break;wx(n,u,i)?r=u:l=t?u.to:u.from}let a=r.type.prop(i),s,o;return a&&(s=t?on(n,r.from,1):on(n,r.to,-1))&&s.matched?o=t?s.end.to:s.end.from:o=t?r.to:r.from,de.cursor(o,t?-1:1)}const xx=n=>yn(n,e=>Vl(n.state,e,!br(n))),Lx=n=>yn(n,e=>Vl(n.state,e,br(n)));function q1(n,e){return yn(n,t=>{if(!t.empty)return ql(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const V1=n=>q1(n,!1),H1=n=>q1(n,!0);function z1(n){let e=n.scrollDOM.clientHeights.empty?n.moveVertically(s,e,t.height):ql(s,e));if(i.eq(r.selection))return!1;let a;if(t.selfScroll){let s=n.coordsAtPos(r.selection.main.head),o=n.scrollDOM.getBoundingClientRect(),l=o.top+t.marginTop,u=o.bottom-t.marginBottom;s&&s.top>l&&s.bottomW1(n,!1),vh=n=>W1(n,!0);function vi(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let a=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;a&&e.head!=r.from+a&&(i=de.cursor(r.from+a))}return i}const X1=n=>yn(n,e=>vi(n,e,!0)),Z1=n=>yn(n,e=>vi(n,e,!1)),kx=n=>yn(n,e=>vi(n,e,!br(n))),Mx=n=>yn(n,e=>vi(n,e,br(n))),Px=n=>yn(n,e=>de.cursor(n.lineBlockAt(e.head).from,1)),Bx=n=>yn(n,e=>de.cursor(n.lineBlockAt(e.head).to,-1));function Ux(n,e,t){let r=!1,i=qa(n.selection,a=>{let s=on(n,a.head,-1)||on(n,a.head,1)||a.head>0&&on(n,a.head-1,1)||a.headUx(n,e,!1);function fn(n,e){let t=qa(n.state.selection,r=>{let i=e(r);return de.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Qn(n.state,t)),!0)}function K1(n,e){return fn(n,t=>n.moveByChar(t,e))}const j1=n=>K1(n,!br(n)),J1=n=>K1(n,br(n));function ey(n,e){return fn(n,t=>n.moveByGroup(t,e))}const Yx=n=>ey(n,!br(n)),Gx=n=>ey(n,br(n)),Qx=n=>fn(n,e=>Vl(n.state,e,!br(n))),$x=n=>fn(n,e=>Vl(n.state,e,br(n)));function ty(n,e){return fn(n,t=>n.moveVertically(t,e))}const ry=n=>ty(n,!1),ny=n=>ty(n,!0);function iy(n,e){return fn(n,t=>n.moveVertically(t,e,z1(n).height))}const CS=n=>iy(n,!1),vS=n=>iy(n,!0),qx=n=>fn(n,e=>vi(n,e,!0)),Vx=n=>fn(n,e=>vi(n,e,!1)),Hx=n=>fn(n,e=>vi(n,e,!br(n))),zx=n=>fn(n,e=>vi(n,e,br(n))),Wx=n=>fn(n,e=>de.cursor(n.lineBlockAt(e.head).from)),Xx=n=>fn(n,e=>de.cursor(n.lineBlockAt(e.head).to)),yS=({state:n,dispatch:e})=>(e(Qn(n,{anchor:0})),!0),AS=({state:n,dispatch:e})=>(e(Qn(n,{anchor:n.doc.length})),!0),RS=({state:n,dispatch:e})=>(e(Qn(n,{anchor:n.selection.main.anchor,head:0})),!0),IS=({state:n,dispatch:e})=>(e(Qn(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),Zx=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),Kx=({state:n,dispatch:e})=>{let t=zl(n).map(({from:r,to:i})=>de.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:de.create(t),userEvent:"select"})),!0},jx=({state:n,dispatch:e})=>{let t=qa(n.selection,r=>{var i;let a=Ut(n).resolveInner(r.head,1);for(;!(a.from=r.to||a.to>r.to&&a.from<=r.from||!(!((i=a.parent)===null||i===void 0)&&i.parent));)a=a.parent;return de.range(a.to,a.from)});return e(Qn(n,t)),!0},Jx=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=de.create([t.main]):t.main.empty||(r=de.create([de.cursor(t.main.head)])),r?(e(Qn(n,r)),!0):!1};function Hl(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(a=>{let{from:s,to:o}=a;if(s==o){let l=e(s);ls&&(t="delete.forward",l=Ao(n,l,!0)),s=Math.min(s,l),o=Math.max(o,l)}else s=Ao(n,s,!1),o=Ao(n,o,!0);return s==o?{range:a}:{changes:{from:s,to:o},range:de.cursor(s)}});return i.changes.empty?!1:(n.dispatch(r.update(i,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?Ae.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function Ao(n,e,t){if(n instanceof Ae)for(let r of n.state.facet(Ae.atomicRanges).map(i=>i(n)))r.between(e,e,(i,a)=>{ie&&(e=t?a:i)});return e}const ay=(n,e)=>Hl(n,t=>{let{state:r}=n,i=r.doc.lineAt(t),a,s;if(!e&&t>i.from&&tay(n,!1),sy=n=>ay(n,!0),oy=(n,e)=>Hl(n,t=>{let r=t,{state:i}=n,a=i.doc.lineAt(r),s=i.charCategorizer(r);for(let o=null;;){if(r==(e?a.to:a.from)){r==t&&a.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=Er(a.text,r-a.from,e)+a.from,u=a.text.slice(Math.min(r,l)-a.from,Math.max(r,l)-a.from),d=s(u);if(o!=null&&d!=o)break;(u!=" "||r!=t)&&(o=d),r=l}return r}),ly=n=>oy(n,!1),eL=n=>oy(n,!0),cy=n=>Hl(n,e=>{let t=n.lineBlockAt(e).to;return eHl(n,e=>{let t=n.lineBlockAt(e).from;return e>t?t:Math.max(0,e-1)}),rL=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:mt.of(["",""])},range:de.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},nL=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,a=n.doc.lineAt(i),s=i==a.from?i-1:Er(a.text,i-a.from,!1)+a.from,o=i==a.to?i+1:Er(a.text,i-a.from,!0)+a.from;return{changes:{from:s,to:o,insert:n.doc.slice(i,o).append(n.doc.slice(s,i))},range:de.cursor(o)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function zl(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),a=n.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=n.doc.lineAt(r.to-1)),t>=i.number){let s=e[e.length-1];s.to=a.to,s.ranges.push(r)}else e.push({from:i.from,to:a.to,ranges:[r]});t=a.number+1}return e}function uy(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let a of zl(n)){if(t?a.to==n.doc.length:a.from==0)continue;let s=n.doc.lineAt(t?a.to+1:a.from-1),o=s.length+1;if(t){r.push({from:a.to,to:s.to},{from:a.from,insert:s.text+n.lineBreak});for(let l of a.ranges)i.push(de.range(Math.min(n.doc.length,l.anchor+o),Math.min(n.doc.length,l.head+o)))}else{r.push({from:s.from,to:a.from},{from:a.to,insert:n.lineBreak+s.text});for(let l of a.ranges)i.push(de.range(l.anchor-o,l.head-o))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:de.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const iL=({state:n,dispatch:e})=>uy(n,e,!1),aL=({state:n,dispatch:e})=>uy(n,e,!0);function dy(n,e,t){if(n.readOnly)return!1;let r=[];for(let i of zl(n))t?r.push({from:i.from,insert:n.doc.slice(i.from,i.to)+n.lineBreak}):r.push({from:i.to,insert:n.lineBreak+n.doc.slice(i.from,i.to)});return e(n.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const sL=({state:n,dispatch:e})=>dy(n,e,!1),oL=({state:n,dispatch:e})=>dy(n,e,!0),lL=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(zl(e).map(({from:i,to:a})=>(i>0?i--:an.moveVertically(i,!0)).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function cL(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=Ut(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),a;return r&&i&&r.to<=e&&i.from>=e&&(a=r.type.prop(Ze.closedBy))&&a.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from?{from:r.to,to:i.from}:null}const py=fy(!1),uL=fy(!0);function fy(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:a,to:s}=i,o=e.doc.lineAt(a),l=!n&&a==s&&cL(e,a);n&&(a=s=(s<=o.to?o:e.doc.lineAt(s)).to);let u=new Yl(e,{simulateBreak:a,simulateDoubleBreak:!!l}),d=tm(u,a);for(d==null&&(d=/^\s*/.exec(e.doc.lineAt(a).text)[0].length);so.from&&a{let i=[];for(let s=r.from;s<=r.to;){let o=n.doc.lineAt(s);o.number>t&&(r.empty||r.to>o.from)&&(e(o,i,r),t=o.number),s=o.to+1}let a=n.changes(i);return{changes:i,range:de.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}const hy=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new Yl(n,{overrideIndentation:a=>{let s=t[a];return s??-1}}),i=Cm(n,(a,s,o)=>{let l=tm(r,a.from);if(l==null)return;/\S/.test(a.text)||(l=0);let u=/^\s*/.exec(a.text)[0],d=Ns(n,l);(u!=d||o.fromn.readOnly?!1:(e(n.update(Cm(n,(t,r)=>{r.push({from:t.from,insert:n.facet(Ma)})}),{userEvent:"input.indent"})),!0),ym=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(Cm(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let a=qs(i,n.tabSize),s=0,o=Ns(n,Math.max(0,a-dl(n)));for(;s({mac:n.key,run:n.run,shift:n.shift}))),fL=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:xx,shift:Qx},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Lx,shift:$x},{key:"Alt-ArrowUp",run:iL},{key:"Shift-Alt-ArrowUp",run:sL},{key:"Alt-ArrowDown",run:aL},{key:"Shift-Alt-ArrowDown",run:oL},{key:"Escape",run:Jx},{key:"Mod-Enter",run:uL},{key:"Alt-l",mac:"Ctrl-l",run:Kx},{key:"Mod-i",run:jx,preventDefault:!0},{key:"Mod-[",run:ym},{key:"Mod-]",run:vm},{key:"Mod-Alt-\\",run:hy},{key:"Shift-Mod-k",run:lL},{key:"Shift-Mod-\\",run:Fx},{key:"Mod-/",run:lx},{key:"Alt-A",run:ux}].concat(pL),hL={key:"Tab",run:vm,shift:ym};function Pn(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r];typeof i=="string"?n.setAttribute(r,i):i!=null&&(n[r]=i)}e++}for(;en.normalize("NFKD"):n=>n;class Am{constructor(e,t,r=0,i=e.length,a,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=a?o=>a(NS(o)):NS,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return pr(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=Bh(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=an(e);let i=this.normalize(t);for(let a=0,s=r;;a++){let o=i.charCodeAt(a),l=this.match(o,s);if(a==i.length-1){if(l)return this.value=l,this;break}s==r&&athis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=El(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(rthis.value.to)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||i.to<=t){let o=new Ca(t,e.sliceString(t,r));return Uc.set(e,o),o}if(i.from==t&&i.to==r)return i;let{text:a,from:s}=i;return s>t&&(a=e.sliceString(t,s)+a,s=t),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let r=this.flat.from+t.index,i=r+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this.matchPos=El(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Ca.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(Im.prototype[Symbol.iterator]=gy.prototype[Symbol.iterator]=function(){return this});function mL(n){try{return new RegExp(n,Rm),!0}catch{return!1}}function El(n,e){if(e>=n.length)return e;let t=n.lineAt(e),r;for(;e=56320&&r<57344;)e++;return e}const _L={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Sy=De.define({combine(n){return ti(n,_L,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function gL(n){let e=[TL,bL];return n&&e.push(Sy.of(n)),e}const SL=qe.mark({class:"cm-selectionMatch"}),OL=qe.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function DS(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=Pt.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=Pt.Word)}function EL(n,e,t,r){return n(e.sliceDoc(t,t+1))==Pt.Word&&n(e.sliceDoc(r-1,r))==Pt.Word}const bL=lr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(Sy),{state:t}=n,r=t.selection;if(r.ranges.length>1)return qe.none;let i=r.main,a,s=null;if(i.empty){if(!e.highlightWordAroundCursor)return qe.none;let l=t.wordAt(i.head);if(!l)return qe.none;s=t.charCategorizer(i.head),a=t.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l200)return qe.none;if(e.wholeWords){if(a=t.sliceDoc(i.from,i.to),s=t.charCategorizer(i.head),!(DS(s,t,i.from,i.to)&&EL(s,t,i.from,i.to)))return qe.none}else if(a=t.sliceDoc(i.from,i.to).trim(),!a)return qe.none}let o=[];for(let l of n.visibleRanges){let u=new Am(t.doc,a,l.from,l.to);for(;!u.next().done;){let{from:d,to:f}=u.value;if((!s||DS(s,t,d,f))&&(i.empty&&d<=i.from&&f>=i.to?o.push(OL.range(d,f)):(d>=i.to||f<=i.from)&&o.push(SL.range(d,f)),o.length>e.maxMatches))return qe.none}}return qe.set(o)}},{decorations:n=>n.decorations}),TL=Ae.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});class CL{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||mL(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,r)=>r=="n"?` -`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new RL(this):new yL(this)}getCursor(e,t=0,r){let i=e.doc?e:ut.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?pa(this,i,t,r):da(this,i,t,r)}}class Oy{constructor(e){this.spec=e}}function da(n,e,t,r){return new Am(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:i=>i.toLowerCase(),n.wholeWord?vL(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function vL(n,e){return(t,r,i,a)=>((a>t||a+i.length=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let a=da(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!a.next().done;)i(a.value.from,a.value.to)}}function pa(n,e,t,r){return new Im(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?AL(e.charCategorizer(e.selection.main.head)):void 0},t,r)}function bl(n,e){return n.slice(Er(n,e,!1),e)}function Tl(n,e){return n.slice(e,Er(n,e))}function AL(n){return(e,t,r)=>!r[0].length||(n(bl(r.input,r.index))!=Pt.Word||n(Tl(r.input,r.index))!=Pt.Word)&&(n(Tl(r.input,r.index+r[0].length))!=Pt.Word||n(bl(r.input,r.index+r[0].length))!=Pt.Word)}class RL extends Oy{nextMatch(e,t,r){let i=pa(this.spec,e,r,e.doc.length).next();return i.done&&(i=pa(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let a=Math.max(t,r-i*1e4),s=pa(this.spec,e,a,r),o=null;for(;!s.next().done;)o=s.value;if(o&&(a==t||o.from>a+10))return o;if(a==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(t,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let a=pa(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!a.next().done;)i(a.value.from,a.value.to)}}const Ah=it.define();function IL(n){var e=n.Pos;function t(c,h){var _=c.state.vim;if(!_||_.insertMode)return h.head;var S=_.sel.head;if(!S)return h.head;if(!(_.visualBlock&&h.head.line!=S.line))return h.from()==h.anchor&&!h.empty()&&h.head.line==S.line&&h.head.ch!=S.ch?new e(h.head.line,h.head.ch-1):h.head}function r(c,h,_){if(h.line===_.line&&h.ch>=_.ch-1){var S=c.getLine(h.line),T=S.charCodeAt(h.ch);55296<=T&&T<=55551&&(_.ch+=1)}return{start:h,end:_}}var i=[{keys:"",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"g",type:"keyToKey",toKeys:"gk"},{keys:"g",type:"keyToKey",toKeys:"gj"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"idle",context:"normal"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],a=i.length,s=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}];function o(c){c.setOption("disableInput",!0),c.setOption("showCursorWhenSelecting",!1),n.signal(c,"vim-mode-change",{mode:"normal"}),c.on("cursorActivity",Hm),Ie(c),n.on(c.getInputField(),"paste",y(c))}function l(c){c.setOption("disableInput",!1),c.off("cursorActivity",Hm),n.off(c.getInputField(),"paste",y(c)),c.state.vim=null,aa&&clearTimeout(aa)}function u(c,h){this==n.keyMap.vim&&(c.options.$customCursor=null,n.rmClass(c.getWrapperElement(),"cm-fat-cursor")),(!h||h.attach!=d)&&l(c)}function d(c,h){this==n.keyMap.vim&&(c.curOp&&(c.curOp.selectionChanged=!0),c.options.$customCursor=t,n.addClass(c.getWrapperElement(),"cm-fat-cursor")),(!h||h.attach!=d)&&o(c)}n.defineOption("vimMode",!1,function(c,h,_){h&&c.getOption("keyMap")!="vim"?c.setOption("keyMap","vim"):!h&&_!=n.Init&&/^vim/.test(c.getOption("keyMap"))&&c.setOption("keyMap","default")});function f(c,h){if(h){if(this[c])return this[c];var _=v(c);if(!_)return!1;var S=He.findKey(h,_);return typeof S=="function"&&n.signal(h,"vim-keypress",_),S}}var m={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A",CapsLock:""},g={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"},b={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(g)).forEach(function(c){b[(g[c]||"").toLowerCase()]=b[c.toLowerCase()]=c});function v(c){if(c.charAt(0)=="'")return c.charAt(1);var h=c.split(/-(?!$)/),_=h[h.length-1];if(h.length==1&&h[0].length==1)return!1;if(h.length==2&&h[0]=="Shift"&&_.length==1)return!1;for(var S=!1,T=0;T"):!1}function y(c){var h=c.state.vim;return h.onPasteFn||(h.onPasteFn=function(){h.insertMode||(c.setCursor(Ee(c.getCursor(),0,1)),he.enterInsertMode(c,{},h))}),h.onPasteFn}var N=/[\d]/,F=[n.isWordChar,function(c){return c&&!n.isWordChar(c)&&!/\s/.test(c)}],X=[function(c){return/\S/.test(c)}];function p(c,h){for(var _=[],S=c;S"]),M=[].concat(E,O,A,["-",'"',".",":","_","/","+"]),w;try{w=new RegExp("^[\\p{Lu}]$","u")}catch{w=/^[A-Z]$/}function B(c,h){return h>=c.firstLine()&&h<=c.lastLine()}function re(c){return/^[a-z]$/.test(c)}function ie(c){return"()[]{}".indexOf(c)!=-1}function j(c){return N.test(c)}function J(c){return w.test(c)}function L(c){return/^\s*$/.test(c)}function G(c){return".?!".indexOf(c)!=-1}function Z(c,h){for(var _=0;__?h=_:h0?1:-1,pe,ne=x.getCursor();do if(h+=oe,$=T[(c+h)%c],$&&(pe=$.find())&&!Wt(ne,pe))break;while(h<_&&h>S)}return $}function k(x,q){var $=h,oe=R(x,q);return h=$,oe&&oe.find()}return{cachedCursor:void 0,add:C,find:k,move:R}},Ve=function(c){return c?{changes:c.changes,expectCursorActivityForChange:c.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function Re(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Ve()}Re.prototype={exitMacroRecordMode:function(){var c=le.macroModeState;c.onRecordingDone&&c.onRecordingDone(),c.onRecordingDone=void 0,c.isRecording=!1},enterMacroRecordMode:function(c,h){var _=le.registerController.getRegister(h);if(_){if(_.clear(),this.latestRegister=h,c.openDialog){var S=Rn("span",{class:"cm-vim-message"},"recording @"+h);this.onRecordingDone=c.openDialog(S,null,{bottom:!0})}this.isRecording=!0}}};function Ie(c){return c.state.vim||(c.state.vim={inputState:new Vt,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),c.state.vim}var le;function Me(){le={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Pe(),macroModeState:new Re,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new Fe({}),searchHistoryController:new Mr,exCommandHistoryController:new Mr};for(var c in z){var h=z[c];h.value=h.defaultValue}}var je,He={enterVimMode:o,leaveVimMode:l,buildKeyMap:function(){},getRegisterController:function(){return le.registerController},resetVimGlobalState_:Me,getVimGlobalState_:function(){return le},maybeInitVimState_:Ie,suppressErrorLogging:!1,InsertModeKey:tc,map:function(c,h,_){Ar.map(c,h,_)},unmap:function(c,h){return Ar.unmap(c,h)},noremap:function(c,h,_){Ar.map(c,h,_,!0)},mapclear:function(c){var h=i.length,_=a,S=i.slice(0,h-_);if(i=i.slice(h-_),c)for(var T=S.length-1;T>=0;T--){var C=S[T];if(c!==C.context)if(C.context)this._mapCommand(C);else{var R=["normal","insert","visual"];for(var k in R)if(R[k]!==c){var x={};for(var q in C)x[q]=C[q];x.context=R[k],this._mapCommand(x)}}}},setOption:ue,getOption:Te,defineOption:ce,defineEx:function(c,h,_){if(!h)h=c;else if(c.indexOf(h)!==0)throw new Error('(Vim.defineEx) "'+h+'" is not a prefix of "'+c+'", command not registered');Ni[c]=_,Ar.commandMap_[h]={name:c,shortName:h,type:"api"}},handleKey:function(c,h,_){var S=this.findKey(c,h,_);if(typeof S=="function")return S()},multiSelectHandleKey:gA,findKey:function(c,h,_){var S=Ie(c);function T(){var q=le.macroModeState;if(q.isRecording){if(h=="q")return q.exitMacroRecordMode(),ht(c),!0;_!="mapping"&&hA(q,h)}}function C(){if(h==""){if(S.visualMode)$t(c);else if(S.insertMode)hn(c);else return;return ht(c),!0}}function R(){if(C())return!0;S.inputState.keyBuffer.push(h);var q=S.inputState.keyBuffer.join(""),$=h.length==1,oe=st.matchCommand(q,i,S.inputState,"insert"),pe=S.inputState.changeQueue;if(oe.type=="none")return ht(c),!1;if(oe.type=="partial"){if(je&&window.clearTimeout(je),je=$&&window.setTimeout(function(){S.insertMode&&S.inputState.keyBuffer.length&&ht(c)},Te("insertModeEscKeysTimeout")),$){var ne=c.listSelections();(!pe||pe.removed.length!=ne.length)&&(pe=S.inputState.changeQueue=new Nt),pe.inserted+=h;for(var te=0;te|./gi,C;C=T.exec(h);){var R=C[0],k=S.insertMode,x=He.handleKey(c,R,"mapping");if(!x&&k&&S.insertMode){if(R[0]=="<"){var $=R.toLowerCase().slice(1,-1),q=$.split("-"),$=q.pop();if($=="lt")R="<";else if($=="space")R=" ";else if($=="cr")R=` -`;else if(b.hasOwnProperty($)){R=b[$],Zm(c,R);continue}else R=R[0],T.lastIndex=C.index+1}c.replaceSelection(R)}}}finally{ft=!1,rt.length=0}}function Vt(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}Vt.prototype.pushRepeatDigit=function(c){this.operator?this.motionRepeat=this.motionRepeat.concat(c):this.prefixRepeat=this.prefixRepeat.concat(c)},Vt.prototype.getRepeat=function(){var c=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(c=1,this.prefixRepeat.length>0&&(c*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(c*=parseInt(this.motionRepeat.join(""),10))),c};function ht(c,h){c.state.vim.inputState=new Vt,n.signal(c,"vim-command-done",h)}function Nt(){this.removed=[],this.inserted=""}function kt(c,h,_){this.clear(),this.keyBuffer=[c||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!h,this.blockwise=!!_}kt.prototype={setText:function(c,h,_){this.keyBuffer=[c||""],this.linewise=!!h,this.blockwise=!!_},pushText:function(c,h){h&&(this.linewise||this.keyBuffer.push(` +`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new RL(this):new yL(this)}getCursor(e,t=0,r){let i=e.doc?e:ut.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?pa(this,i,t,r):da(this,i,t,r)}}class Oy{constructor(e){this.spec=e}}function da(n,e,t,r){return new Am(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:i=>i.toLowerCase(),n.wholeWord?vL(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function vL(n,e){return(t,r,i,a)=>((a>t||a+i.length=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let a=da(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!a.next().done;)i(a.value.from,a.value.to)}}function pa(n,e,t,r){return new Im(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?AL(e.charCategorizer(e.selection.main.head)):void 0},t,r)}function bl(n,e){return n.slice(Er(n,e,!1),e)}function Tl(n,e){return n.slice(e,Er(n,e))}function AL(n){return(e,t,r)=>!r[0].length||(n(bl(r.input,r.index))!=Pt.Word||n(Tl(r.input,r.index))!=Pt.Word)&&(n(Tl(r.input,r.index+r[0].length))!=Pt.Word||n(bl(r.input,r.index+r[0].length))!=Pt.Word)}class RL extends Oy{nextMatch(e,t,r){let i=pa(this.spec,e,r,e.doc.length).next();return i.done&&(i=pa(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let a=Math.max(t,r-i*1e4),s=pa(this.spec,e,a,r),o=null;for(;!s.next().done;)o=s.value;if(o&&(a==t||o.from>a+10))return o;if(a==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(t,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let a=pa(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!a.next().done;)i(a.value.from,a.value.to)}}const Ah=it.define();function IL(n){var e=n.Pos;function t(c,h){var _=c.state.vim;if(!_||_.insertMode)return h.head;var S=_.sel.head;if(!S)return h.head;if(!(_.visualBlock&&h.head.line!=S.line))return h.from()==h.anchor&&!h.empty()&&h.head.line==S.line&&h.head.ch!=S.ch?new e(h.head.line,h.head.ch-1):h.head}function r(c,h,_){if(h.line===_.line&&h.ch>=_.ch-1){var S=c.getLine(h.line),T=S.charCodeAt(h.ch);55296<=T&&T<=55551&&(_.ch+=1)}return{start:h,end:_}}var i=[{keys:"",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"g",type:"keyToKey",toKeys:"gk"},{keys:"g",type:"keyToKey",toKeys:"gj"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"idle",context:"normal"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],a=i.length,s=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}];function o(c){c.setOption("disableInput",!0),c.setOption("showCursorWhenSelecting",!1),n.signal(c,"vim-mode-change",{mode:"normal"}),c.on("cursorActivity",Hm),Ie(c),n.on(c.getInputField(),"paste",y(c))}function l(c){c.setOption("disableInput",!1),c.off("cursorActivity",Hm),n.off(c.getInputField(),"paste",y(c)),c.state.vim=null,aa&&clearTimeout(aa)}function u(c,h){this==n.keyMap.vim&&(c.options.$customCursor=null,n.rmClass(c.getWrapperElement(),"cm-fat-cursor")),(!h||h.attach!=d)&&l(c)}function d(c,h){this==n.keyMap.vim&&(c.curOp&&(c.curOp.selectionChanged=!0),c.options.$customCursor=t,n.addClass(c.getWrapperElement(),"cm-fat-cursor")),(!h||h.attach!=d)&&o(c)}n.defineOption("vimMode",!1,function(c,h,_){h&&c.getOption("keyMap")!="vim"?c.setOption("keyMap","vim"):!h&&_!=n.Init&&/^vim/.test(c.getOption("keyMap"))&&c.setOption("keyMap","default")});function f(c,h){if(h){if(this[c])return this[c];var _=v(c);if(!_)return!1;var S=He.findKey(h,_);return typeof S=="function"&&n.signal(h,"vim-keypress",_),S}}var m={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A",CapsLock:""},g={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"},b={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(g)).forEach(function(c){b[(g[c]||"").toLowerCase()]=b[c.toLowerCase()]=c});function v(c){if(c.charAt(0)=="'")return c.charAt(1);var h=c.split(/-(?!$)/),_=h[h.length-1];if(h.length==1&&h[0].length==1)return!1;if(h.length==2&&h[0]=="Shift"&&_.length==1)return!1;for(var S=!1,T=0;T"):!1}function y(c){var h=c.state.vim;return h.onPasteFn||(h.onPasteFn=function(){h.insertMode||(c.setCursor(Ee(c.getCursor(),0,1)),he.enterInsertMode(c,{},h))}),h.onPasteFn}var N=/[\d]/,F=[n.isWordChar,function(c){return c&&!n.isWordChar(c)&&!/\s/.test(c)}],X=[function(c){return/\S/.test(c)}];function p(c,h){for(var _=[],S=c;S"]),M=[].concat(E,O,A,["-",'"',".",":","_","/","+"]),w;try{w=new RegExp("^[\\p{Lu}]$","u")}catch{w=/^[A-Z]$/}function B(c,h){return h>=c.firstLine()&&h<=c.lastLine()}function re(c){return/^[a-z]$/.test(c)}function ie(c){return"()[]{}".indexOf(c)!=-1}function j(c){return N.test(c)}function J(c){return w.test(c)}function L(c){return/^\s*$/.test(c)}function G(c){return".?!".indexOf(c)!=-1}function Z(c,h){for(var _=0;__?h=_:h0?1:-1,pe,ne=x.getCursor();do if(h+=oe,$=T[(c+h)%c],$&&(pe=$.find())&&!Wt(ne,pe))break;while(h<_&&h>S)}return $}function k(x,q){var $=h,oe=I(x,q);return h=$,oe&&oe.find()}return{cachedCursor:void 0,add:C,find:k,move:I}},Ve=function(c){return c?{changes:c.changes,expectCursorActivityForChange:c.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function Re(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Ve()}Re.prototype={exitMacroRecordMode:function(){var c=le.macroModeState;c.onRecordingDone&&c.onRecordingDone(),c.onRecordingDone=void 0,c.isRecording=!1},enterMacroRecordMode:function(c,h){var _=le.registerController.getRegister(h);if(_){if(_.clear(),this.latestRegister=h,c.openDialog){var S=Rn("span",{class:"cm-vim-message"},"recording @"+h);this.onRecordingDone=c.openDialog(S,null,{bottom:!0})}this.isRecording=!0}}};function Ie(c){return c.state.vim||(c.state.vim={inputState:new Vt,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),c.state.vim}var le;function Me(){le={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Pe(),macroModeState:new Re,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new Fe({}),searchHistoryController:new Mr,exCommandHistoryController:new Mr};for(var c in z){var h=z[c];h.value=h.defaultValue}}var je,He={enterVimMode:o,leaveVimMode:l,buildKeyMap:function(){},getRegisterController:function(){return le.registerController},resetVimGlobalState_:Me,getVimGlobalState_:function(){return le},maybeInitVimState_:Ie,suppressErrorLogging:!1,InsertModeKey:tc,map:function(c,h,_){Ar.map(c,h,_)},unmap:function(c,h){return Ar.unmap(c,h)},noremap:function(c,h,_){Ar.map(c,h,_,!0)},mapclear:function(c){var h=i.length,_=a,S=i.slice(0,h-_);if(i=i.slice(h-_),c)for(var T=S.length-1;T>=0;T--){var C=S[T];if(c!==C.context)if(C.context)this._mapCommand(C);else{var I=["normal","insert","visual"];for(var k in I)if(I[k]!==c){var x={};for(var q in C)x[q]=C[q];x.context=I[k],this._mapCommand(x)}}}},setOption:ue,getOption:Te,defineOption:ce,defineEx:function(c,h,_){if(!h)h=c;else if(c.indexOf(h)!==0)throw new Error('(Vim.defineEx) "'+h+'" is not a prefix of "'+c+'", command not registered');Ni[c]=_,Ar.commandMap_[h]={name:c,shortName:h,type:"api"}},handleKey:function(c,h,_){var S=this.findKey(c,h,_);if(typeof S=="function")return S()},multiSelectHandleKey:gA,findKey:function(c,h,_){var S=Ie(c);function T(){var q=le.macroModeState;if(q.isRecording){if(h=="q")return q.exitMacroRecordMode(),ht(c),!0;_!="mapping"&&hA(q,h)}}function C(){if(h==""){if(S.visualMode)$t(c);else if(S.insertMode)hn(c);else return;return ht(c),!0}}function I(){if(C())return!0;S.inputState.keyBuffer.push(h);var q=S.inputState.keyBuffer.join(""),$=h.length==1,oe=st.matchCommand(q,i,S.inputState,"insert"),pe=S.inputState.changeQueue;if(oe.type=="none")return ht(c),!1;if(oe.type=="partial"){if(je&&window.clearTimeout(je),je=$&&window.setTimeout(function(){S.insertMode&&S.inputState.keyBuffer.length&&ht(c)},Te("insertModeEscKeysTimeout")),$){var ne=c.listSelections();(!pe||pe.removed.length!=ne.length)&&(pe=S.inputState.changeQueue=new Nt),pe.inserted+=h;for(var te=0;te|./gi,C;C=T.exec(h);){var I=C[0],k=S.insertMode,x=He.handleKey(c,I,"mapping");if(!x&&k&&S.insertMode){if(I[0]=="<"){var $=I.toLowerCase().slice(1,-1),q=$.split("-"),$=q.pop();if($=="lt")I="<";else if($=="space")I=" ";else if($=="cr")I=` +`;else if(b.hasOwnProperty($)){I=b[$],Zm(c,I);continue}else I=I[0],T.lastIndex=C.index+1}c.replaceSelection(I)}}}finally{ft=!1,rt.length=0}}function Vt(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}Vt.prototype.pushRepeatDigit=function(c){this.operator?this.motionRepeat=this.motionRepeat.concat(c):this.prefixRepeat=this.prefixRepeat.concat(c)},Vt.prototype.getRepeat=function(){var c=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(c=1,this.prefixRepeat.length>0&&(c*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(c*=parseInt(this.motionRepeat.join(""),10))),c};function ht(c,h){c.state.vim.inputState=new Vt,n.signal(c,"vim-command-done",h)}function Nt(){this.removed=[],this.inserted=""}function kt(c,h,_){this.clear(),this.keyBuffer=[c||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!h,this.blockwise=!!_}kt.prototype={setText:function(c,h,_){this.keyBuffer=[c||""],this.linewise=!!h,this.blockwise=!!_},pushText:function(c,h){h&&(this.linewise||this.keyBuffer.push(` `),this.linewise=!0),this.keyBuffer.push(c)},pushInsertModeChanges:function(c){this.insertModeChanges.push(Ve(c))},pushSearchQuery:function(c){this.searchQueries.push(c)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}};function Qr(c,h){var _=le.registerController.registers;if(!c||c.length!=1)throw Error("Register name must be 1 character");if(_[c])throw Error("Register already defined "+c);_[c]=h,M.push(c)}function Fe(c){this.registers=c,this.unnamedRegister=c['"']=new kt,c["."]=new kt,c[":"]=new kt,c["/"]=new kt,c["+"]=new kt}Fe.prototype={pushText:function(c,h,_,S,T){if(c!=="_"){S&&_.charAt(_.length-1)!==` `&&(_+=` `);var C=this.isValidRegister(c)?this.getRegister(c):null;if(!C){switch(h){case"yank":this.registers[0]=new kt(_,S,T);break;case"delete":case"change":_.indexOf(` -`)==-1?this.registers["-"]=new kt(_,S):(this.shiftNumericRegisters_(),this.registers[1]=new kt(_,S));break}this.unnamedRegister.setText(_,S,T);return}var R=J(c);R?C.pushText(_,S):C.setText(_,S,T),c==="+"&&navigator.clipboard.writeText(_),this.unnamedRegister.setText(C.toString(),S)}},getRegister:function(c){return this.isValidRegister(c)?(c=c.toLowerCase(),this.registers[c]||(this.registers[c]=new kt),this.registers[c]):this.unnamedRegister},isValidRegister:function(c){return c&&Z(c,M)},shiftNumericRegisters_:function(){for(var c=9;c>=2;c--)this.registers[c]=this.getRegister(""+(c-1))}};function Mr(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}Mr.prototype={nextMatch:function(c,h){var _=this.historyBuffer,S=h?-1:1;this.initialPrefix===null&&(this.initialPrefix=c);for(var T=this.iterator+S;h?T>=0:T<_.length;T+=S)for(var C=_[T],R=0;R<=C.length;R++)if(this.initialPrefix==C.substring(0,R))return this.iterator=T,C;if(T>=_.length)return this.iterator=_.length,this.initialPrefix;if(T<0)return c},pushInput:function(c){var h=this.historyBuffer.indexOf(c);h>-1&&this.historyBuffer.splice(h,1),c.length&&this.historyBuffer.push(c)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var st={matchCommand:function(c,h,_,S){var T=Gt(c,h,S,_);if(!T.full&&!T.partial)return{type:"none"};if(!T.full&&T.partial)return{type:"partial"};for(var C,R=0;R"){var x=bt(c);if(!x||x.length>1)return{type:"clear"};_.selectedCharacter=x}return{type:"full",command:C}},processCommand:function(c,h,_){switch(h.inputState.repeatOverride=_.repeatOverride,_.type){case"motion":this.processMotion(c,h,_);break;case"operator":this.processOperator(c,h,_);break;case"operatorMotion":this.processOperatorMotion(c,h,_);break;case"action":this.processAction(c,h,_);break;case"search":this.processSearch(c,h,_);break;case"ex":case"keyToEx":this.processEx(c,h,_);break}},processMotion:function(c,h,_){h.inputState.motion=_.motion,h.inputState.motionArgs=Ke(_.motionArgs),this.evalInput(c,h)},processOperator:function(c,h,_){var S=h.inputState;if(S.operator)if(S.operator==_.operator){S.motion="expandToLine",S.motionArgs={linewise:!0},this.evalInput(c,h);return}else ht(c);S.operator=_.operator,S.operatorArgs=Ke(_.operatorArgs),_.keys.length>1&&(S.operatorShortcut=_.keys),_.exitVisualBlock&&(h.visualBlock=!1,tn(c)),h.visualMode&&this.evalInput(c,h)},processOperatorMotion:function(c,h,_){var S=h.visualMode,T=Ke(_.operatorMotionArgs);T&&S&&T.visualLine&&(h.visualLine=!0),this.processOperator(c,h,_),S||this.processMotion(c,h,_)},processAction:function(c,h,_){var S=h.inputState,T=S.getRepeat(),C=!!T,R=Ke(_.actionArgs)||{};S.selectedCharacter&&(R.selectedCharacter=S.selectedCharacter),_.operator&&this.processOperator(c,h,_),_.motion&&this.processMotion(c,h,_),(_.motion||_.operator)&&this.evalInput(c,h),R.repeat=T||1,R.repeatIsExplicit=C,R.registerName=S.registerName,ht(c),h.lastMotion=null,_.isEdit&&this.recordLastEdit(h,S,_),he[_.action](c,R,h)},processSearch:function(c,h,_){if(!c.getSearchCursor)return;var S=_.searchArgs.forward,T=_.searchArgs.wholeWordOnly;Cr(c).setReversed(!S);var C=S?"/":"?",R=Cr(c).getQuery(),k=c.getScrollInfo();function x(me,Ye,Xe){le.searchHistoryController.pushInput(me),le.searchHistoryController.reset();try{Ii(c,me,Ye,Xe)}catch{Et(c,"Invalid regex: "+me),ht(c);return}st.processMotion(c,h,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:_.searchArgs.toJumplist}})}function q(me){c.scrollTo(k.left,k.top),x(me,!0,!0);var Ye=le.macroModeState;Ye.isRecording&&_A(Ye,me)}function $(me,Ye,Xe){var Be=n.keyName(me),wt,gr;Be=="Up"||Be=="Down"?(wt=Be=="Up",gr=me.target?me.target.selectionEnd:0,Ye=le.searchHistoryController.nextMatch(Ye,wt)||"",Xe(Ye),gr&&me.target&&(me.target.selectionEnd=me.target.selectionStart=Math.min(gr,me.target.value.length))):Be!="Left"&&Be!="Right"&&Be!="Ctrl"&&Be!="Alt"&&Be!="Shift"&&le.searchHistoryController.reset();var qt;try{qt=Ii(c,Ye,!0,!0)}catch{}qt?c.scrollIntoView(eo(c,!S,qt),30):(sa(c),c.scrollTo(k.left,k.top))}function oe(me,Ye,Xe){var Be=n.keyName(me);Be=="Esc"||Be=="Ctrl-C"||Be=="Ctrl-["||Be=="Backspace"&&Ye==""?(le.searchHistoryController.pushInput(Ye),le.searchHistoryController.reset(),Ii(c,R),sa(c),c.scrollTo(k.left,k.top),n.e_stop(me),ht(c),Xe(),c.focus()):Be=="Up"||Be=="Down"?n.e_stop(me):Be=="Ctrl-U"&&(n.e_stop(me),Xe(""))}switch(_.searchArgs.querySrc){case"prompt":var pe=le.macroModeState;if(pe.isPlaying){var be=pe.replaySearchQueries.shift();x(be,!0,!1)}else ia(c,{onClose:q,prefix:C,desc:"(JavaScript regexp)",onKeyUp:$,onKeyDown:oe});break;case"wordUnderCursor":var ne=ee(c,!1,!1,!1,!0),te=!0;if(ne||(ne=ee(c,!1,!1,!1,!1),te=!1),!ne)return;var be=c.getLine(ne.start.line).substring(ne.start.ch,ne.end.ch);te&&T?be="\\b"+be+"\\b":be=cr(be),le.jumpList.cachedCursor=c.getCursor(),c.setCursor(ne.start),x(be,!0,!1);break}},processEx:function(c,h,_){function S(C){le.exCommandHistoryController.pushInput(C),le.exCommandHistoryController.reset(),Ar.processCommand(c,C),c.state.vim&&ht(c)}function T(C,R,k){var x=n.keyName(C),q,$;(x=="Esc"||x=="Ctrl-C"||x=="Ctrl-["||x=="Backspace"&&R=="")&&(le.exCommandHistoryController.pushInput(R),le.exCommandHistoryController.reset(),n.e_stop(C),ht(c),k(),c.focus()),x=="Up"||x=="Down"?(n.e_stop(C),q=x=="Up",$=C.target?C.target.selectionEnd:0,R=le.exCommandHistoryController.nextMatch(R,q)||"",k(R),$&&C.target&&(C.target.selectionEnd=C.target.selectionStart=Math.min($,C.target.value.length))):x=="Ctrl-U"?(n.e_stop(C),k("")):x!="Left"&&x!="Right"&&x!="Ctrl"&&x!="Alt"&&x!="Shift"&&le.exCommandHistoryController.reset()}_.type=="keyToEx"?Ar.processCommand(c,_.exArgs.input):h.visualMode?ia(c,{onClose:S,prefix:":",value:"'<,'>",onKeyDown:T,selectValueOnOpen:!1}):ia(c,{onClose:S,prefix:":",onKeyDown:T})},evalInput:function(c,h){var _=h.inputState,S=_.motion,T=_.motionArgs||{},C=_.operator,R=_.operatorArgs||{},k=_.registerName,x=h.sel,q=lt(h.visualMode?Ce(c,x.head):c.getCursor("head")),$=lt(h.visualMode?Ce(c,x.anchor):c.getCursor("anchor")),oe=lt(q),pe=lt($),ne,te,be;if(C&&this.recordLastEdit(h,_),_.repeatOverride!==void 0?be=_.repeatOverride:be=_.getRepeat(),be>0&&T.explicitRepeat?T.repeatIsExplicit=!0:(T.noRepeat||!T.explicitRepeat&&be===0)&&(be=1,T.repeatIsExplicit=!1),_.selectedCharacter&&(T.selectedCharacter=R.selectedCharacter=_.selectedCharacter),T.repeat=be,ht(c),S){var me=$e[S](c,q,T,h,_);if(h.lastMotion=$e[S],!me)return;if(T.toJumplist){var Ye=le.jumpList,Xe=Ye.cachedCursor;Xe?(fe(c,Xe,me),delete Ye.cachedCursor):fe(c,q,me)}me instanceof Array?(te=me[0],ne=me[1]):ne=me,ne||(ne=lt(q)),h.visualMode?(h.visualBlock&&ne.ch===1/0||(ne=Ce(c,ne,oe)),te&&(te=Ce(c,te)),te=te||pe,x.anchor=te,x.head=ne,tn(c),Br(c,h,"<",St(te,ne)?te:ne),Br(c,h,">",St(te,ne)?ne:te)):C||(ne=Ce(c,ne,oe),c.setCursor(ne.line,ne.ch))}if(C){if(R.lastSel){te=pe;var Be=R.lastSel,wt=Math.abs(Be.head.line-Be.anchor.line),gr=Math.abs(Be.head.ch-Be.anchor.ch);Be.visualLine?ne=new e(pe.line+wt,pe.ch):Be.visualBlock?ne=new e(pe.line+wt,pe.ch+gr):Be.head.line==Be.anchor.line?ne=new e(pe.line,pe.ch+gr):ne=new e(pe.line+wt,pe.ch),h.visualMode=!0,h.visualLine=Be.visualLine,h.visualBlock=Be.visualBlock,x=h.sel={anchor:te,head:ne},tn(c)}else h.visualMode&&(R.lastSel={anchor:lt(x.anchor),head:lt(x.head),visualBlock:h.visualBlock,visualLine:h.visualLine});var qt,ir,ct,pt,Rr;if(h.visualMode){qt=we(x.head,x.anchor),ir=H(x.head,x.anchor),ct=h.visualLine||R.linewise,pt=h.visualBlock?"block":ct?"line":"char";var Xt=r(c,qt,ir);if(Rr=qn(c,{anchor:Xt.start,head:Xt.end},pt),ct){var Zt=Rr.ranges;if(pt=="block")for(var oi=0;oik:$.lineq&&T.line==q?ii(c,h,_,S,!0):(_.toFirstChar&&(C=Y(c.getLine(k)),S.lastHPos=C),S.lastHSPos=c.charCoords(new e(k,C),"div").left,new e(k,C))},moveByDisplayLines:function(c,h,_,S){var T=h;switch(S.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:S.lastHSPos=c.charCoords(T,"div").left}var C=_.repeat,R=c.findPosV(T,_.forward?C:-C,"line",S.lastHSPos);if(R.hitSide)if(_.forward)var k=c.charCoords(R,"div"),x={top:k.top+8,left:S.lastHSPos},R=c.coordsChar(x,"div");else{var q=c.charCoords(new e(c.firstLine(),0),"div");q.left=S.lastHSPos,R=c.coordsChar(q,"div")}return S.lastHPos=R.ch,R},moveByPage:function(c,h,_){var S=h,T=_.repeat;return c.findPosV(S,_.forward?T:-T,"page")},moveByParagraph:function(c,h,_){var S=_.forward?1:-1;return ta(c,h,_.repeat,S)},moveBySentence:function(c,h,_){var S=_.forward?1:-1;return za(c,h,_.repeat,S)},moveByScroll:function(c,h,_,S){var T=c.getScrollInfo(),C=null,R=_.repeat;R||(R=T.clientHeight/(2*c.defaultTextHeight()));var k=c.charCoords(h,"local");if(_.repeat=R,C=$e.moveByDisplayLines(c,h,_,S),!C)return null;var x=c.charCoords(C,"local");return c.scrollTo(null,T.top+x.top-k.top),C},moveByWords:function(c,h,_){return $r(c,h,_.repeat,!!_.forward,!!_.wordEnd,!!_.bigWord)},moveTillCharacter:function(c,h,_){var S=_.repeat,T=ai(c,S,_.forward,_.selectedCharacter,h),C=_.forward?-1:1;return Se(C,_),T?(T.ch+=C,T):null},moveToCharacter:function(c,h,_){var S=_.repeat;return Se(0,_),ai(c,S,_.forward,_.selectedCharacter,h)||h},moveToSymbol:function(c,h,_){var S=_.repeat;return dt(c,S,_.forward,_.selectedCharacter)||h},moveToColumn:function(c,h,_,S){var T=_.repeat;return S.lastHPos=T-1,S.lastHSPos=c.charCoords(h,"div").left,Va(c,T)},moveToEol:function(c,h,_,S){return ii(c,h,_,S,!1)},moveToFirstNonWhiteSpaceCharacter:function(c,h){var _=h;return new e(_.line,Y(c.getLine(_.line)))},moveToMatchedSymbol:function(c,h){for(var _=h,S=_.line,T=_.ch,C=c.getLine(S),R;T"?/[(){}[\]<>]/:/[(){}[\]]/,q=c.findMatchingBracket(new e(S,T),{bracketRegex:x});return q.to}else return _},moveToStartOfLine:function(c,h){return new e(h.line,0)},moveToLineOrEdgeOfDocument:function(c,h,_){var S=_.forward?c.lastLine():c.firstLine();return _.repeatIsExplicit&&(S=_.repeat-c.getOption("firstLineNumber")),new e(S,Y(c.getLine(S)))},moveToStartOfDisplayLine:function(c){return c.execCommand("goLineLeft"),c.getCursor()},moveToEndOfDisplayLine:function(c){c.execCommand("goLineRight");var h=c.getCursor();return h.sticky=="before"&&h.ch--,h},textObjectManipulation:function(c,h,_,S){var T={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},C={"'":!0,'"':!0,"`":!0},R=_.selectedCharacter;R=="b"?R="(":R=="B"&&(R="{");var k=!_.textObjectInner,x,q;if(T[R]){if(q=!0,x=ra(c,h,R,k),!x){var $=c.getSearchCursor(new RegExp("\\"+R,"g"),h);$.find()&&(x=ra(c,$.from(),R,k))}}else if(C[R])q=!0,x=si(c,h,R,k);else if(R==="W")x=ee(c,k,!k,!0);else if(R==="w")x=ee(c,k,!k,!1);else if(R==="p")if(x=ta(c,h,_.repeat,0,k),_.linewise=!0,S.visualMode)S.visualLine||(S.visualLine=!0);else{var oe=S.inputState.operatorArgs;oe&&(oe.linewise=!0),x.end.line--}else if(R==="t")x=se(c,h,k);else if(R==="s"){var pe=c.getLine(h.line);h.ch>0&&G(pe[h.ch])&&(h.ch-=1);var ne=Ai(c,h,_.repeat,1,k),te=Ai(c,h,_.repeat,-1,k);L(c.getLine(te.line)[te.ch])&&L(c.getLine(ne.line)[ne.ch-1])&&(te={line:te.line,ch:te.ch+1}),x={start:te,end:ne}}return x?c.state.vim.visualMode?$n(c,x.start,x.end,q):[x.start,x.end]:null},repeatLastCharacterSearch:function(c,h,_){var S=le.lastCharacterSearch,T=_.repeat,C=_.forward===S.forward,R=(S.increment?1:0)*(C?-1:1);c.moveH(-R,"char"),_.inclusive=!!C;var k=ai(c,T,C,S.selectedCharacter);return k?(k.ch+=R,k):(c.moveH(R,"char"),h)}};function Pr(c,h){$e[c]=h}function nr(c,h){for(var _=[],S=0;Sc.lastLine()&&h.linewise&&!oe?c.replaceRange("",$,k):c.replaceRange("",R,k),h.linewise&&(oe||(c.setCursor($),n.commands.newlineAndIndent(c)),R.ch=Number.MAX_VALUE),S=R}le.registerController.pushText(h.registerName,"change",T,h.linewise,_.length>1),he.enterInsertMode(c,{head:S},c.state.vim)},delete:function(c,h,_){var S,T,C=c.state.vim;if(C.visualBlock){T=c.getSelection();var x=nr("",_.length);c.replaceSelections(x),S=we(_[0].head,_[0].anchor)}else{var R=_[0].anchor,k=_[0].head;h.linewise&&k.line!=c.firstLine()&&R.line==c.lastLine()&&R.line==k.line-1&&(R.line==c.firstLine()?R.ch=0:R=new e(R.line-1,nt(c,R.line-1))),T=c.getRange(R,k),c.replaceRange("",R,k),S=R,h.linewise&&(S=$e.moveToFirstNonWhiteSpaceCharacter(c,R))}return le.registerController.pushText(h.registerName,"delete",T,h.linewise,C.visualBlock),Ce(c,S)},indent:function(c,h,_){var S=c.state.vim;if(c.indentMore)for(var T=S.visualMode?h.repeat:1,C=0;Cq.top?(x.line+=(k-q.top)/T,x.line=Math.ceil(x.line),c.setCursor(x),q=c.charCoords(x,"local"),c.scrollTo(null,q.top)):c.scrollTo(null,k);else{var $=k+c.getScrollInfo().clientHeight;$=T.anchor.line?C=Ee(T.head,0,1):C=new e(T.anchor.line,0)}else if(S=="inplace"){if(_.visualMode)return}else S=="lastEdit"&&(C=ro(c)||C);c.setOption("disableInput",!1),h&&h.replace?(c.toggleOverwrite(!0),c.setOption("keyMap","vim-replace"),n.signal(c,"vim-mode-change",{mode:"replace"})):(c.toggleOverwrite(!1),c.setOption("keyMap","vim-insert"),n.signal(c,"vim-mode-change",{mode:"insert"})),le.macroModeState.isPlaying||(c.on("change",Vm),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=c.setBookmark(C,{insertLeft:!0}),n.on(c.getInputField(),"keydown",Wm)),_.visualMode&&$t(c),Dt(c,C,R)}},toggleVisualMode:function(c,h,_){var S=h.repeat,T=c.getCursor(),C;if(_.visualMode)_.visualLine^h.linewise||_.visualBlock^h.blockwise?(_.visualLine=!!h.linewise,_.visualBlock=!!h.blockwise,n.signal(c,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),tn(c)):$t(c);else{_.visualMode=!0,_.visualLine=!!h.linewise,_.visualBlock=!!h.blockwise,C=Ce(c,new e(T.line,T.ch+S-1));var R=r(c,T,C);_.sel={anchor:R.start,head:R.end},n.signal(c,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),tn(c),Br(c,_,"<",we(T,C)),Br(c,_,">",H(T,C))}},reselectLastSelection:function(c,h,_){var S=_.lastSelection;if(_.visualMode&&vt(c,_),S){var T=S.anchorMark.find(),C=S.headMark.find();if(!T||!C)return;_.sel={anchor:T,head:C},_.visualMode=!0,_.visualLine=S.visualLine,_.visualBlock=S.visualBlock,tn(c),Br(c,_,"<",we(T,C)),Br(c,_,">",H(T,C)),n.signal(c,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""})}},joinLines:function(c,h,_){var S,T;if(_.visualMode){if(S=c.getCursor("anchor"),T=c.getCursor("head"),St(T,S)){var C=T;T=S,S=C}T.ch=nt(c,T.line)-1}else{var R=Math.max(h.repeat,2);S=c.getCursor(),T=Ce(c,new e(S.line+R-1,1/0))}for(var k=0,x=S.line;x{this.continuePaste(c,h,_,C,S)});else{var T=S.toString();this.continuePaste(c,h,_,T,S)}},continuePaste:function(c,h,_,S,T){var C=lt(c.getCursor());if(S){if(h.matchIndent){var R=c.getOption("tabSize"),k=function(Xt){var Zt=Xt.split(" ").length-1,oi=Xt.split(" ").length-1;return Zt*R+oi*1},x=c.getLine(c.getCursor().line),q=k(x.match(/^\s*/)[0]),$=S.replace(/\n$/,""),oe=S!==$,pe=k(S.match(/^\s*/)[0]),S=$.replace(/^\s*/gm,function(Xt){var Zt=q+(k(Xt)-pe);if(Zt<0)return"";if(c.getOption("indentWithTabs")){var oi=Math.floor(Zt/R);return Array(oi+1).join(" ")}else return Array(Zt+1).join(" ")});S+=oe?` +`)==-1?this.registers["-"]=new kt(_,S):(this.shiftNumericRegisters_(),this.registers[1]=new kt(_,S));break}this.unnamedRegister.setText(_,S,T);return}var I=J(c);I?C.pushText(_,S):C.setText(_,S,T),c==="+"&&navigator.clipboard.writeText(_),this.unnamedRegister.setText(C.toString(),S)}},getRegister:function(c){return this.isValidRegister(c)?(c=c.toLowerCase(),this.registers[c]||(this.registers[c]=new kt),this.registers[c]):this.unnamedRegister},isValidRegister:function(c){return c&&Z(c,M)},shiftNumericRegisters_:function(){for(var c=9;c>=2;c--)this.registers[c]=this.getRegister(""+(c-1))}};function Mr(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}Mr.prototype={nextMatch:function(c,h){var _=this.historyBuffer,S=h?-1:1;this.initialPrefix===null&&(this.initialPrefix=c);for(var T=this.iterator+S;h?T>=0:T<_.length;T+=S)for(var C=_[T],I=0;I<=C.length;I++)if(this.initialPrefix==C.substring(0,I))return this.iterator=T,C;if(T>=_.length)return this.iterator=_.length,this.initialPrefix;if(T<0)return c},pushInput:function(c){var h=this.historyBuffer.indexOf(c);h>-1&&this.historyBuffer.splice(h,1),c.length&&this.historyBuffer.push(c)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var st={matchCommand:function(c,h,_,S){var T=Gt(c,h,S,_);if(!T.full&&!T.partial)return{type:"none"};if(!T.full&&T.partial)return{type:"partial"};for(var C,I=0;I"){var x=bt(c);if(!x||x.length>1)return{type:"clear"};_.selectedCharacter=x}return{type:"full",command:C}},processCommand:function(c,h,_){switch(h.inputState.repeatOverride=_.repeatOverride,_.type){case"motion":this.processMotion(c,h,_);break;case"operator":this.processOperator(c,h,_);break;case"operatorMotion":this.processOperatorMotion(c,h,_);break;case"action":this.processAction(c,h,_);break;case"search":this.processSearch(c,h,_);break;case"ex":case"keyToEx":this.processEx(c,h,_);break}},processMotion:function(c,h,_){h.inputState.motion=_.motion,h.inputState.motionArgs=Ke(_.motionArgs),this.evalInput(c,h)},processOperator:function(c,h,_){var S=h.inputState;if(S.operator)if(S.operator==_.operator){S.motion="expandToLine",S.motionArgs={linewise:!0},this.evalInput(c,h);return}else ht(c);S.operator=_.operator,S.operatorArgs=Ke(_.operatorArgs),_.keys.length>1&&(S.operatorShortcut=_.keys),_.exitVisualBlock&&(h.visualBlock=!1,tn(c)),h.visualMode&&this.evalInput(c,h)},processOperatorMotion:function(c,h,_){var S=h.visualMode,T=Ke(_.operatorMotionArgs);T&&S&&T.visualLine&&(h.visualLine=!0),this.processOperator(c,h,_),S||this.processMotion(c,h,_)},processAction:function(c,h,_){var S=h.inputState,T=S.getRepeat(),C=!!T,I=Ke(_.actionArgs)||{};S.selectedCharacter&&(I.selectedCharacter=S.selectedCharacter),_.operator&&this.processOperator(c,h,_),_.motion&&this.processMotion(c,h,_),(_.motion||_.operator)&&this.evalInput(c,h),I.repeat=T||1,I.repeatIsExplicit=C,I.registerName=S.registerName,ht(c),h.lastMotion=null,_.isEdit&&this.recordLastEdit(h,S,_),he[_.action](c,I,h)},processSearch:function(c,h,_){if(!c.getSearchCursor)return;var S=_.searchArgs.forward,T=_.searchArgs.wholeWordOnly;Cr(c).setReversed(!S);var C=S?"/":"?",I=Cr(c).getQuery(),k=c.getScrollInfo();function x(me,Ye,Xe){le.searchHistoryController.pushInput(me),le.searchHistoryController.reset();try{Ii(c,me,Ye,Xe)}catch{Et(c,"Invalid regex: "+me),ht(c);return}st.processMotion(c,h,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:_.searchArgs.toJumplist}})}function q(me){c.scrollTo(k.left,k.top),x(me,!0,!0);var Ye=le.macroModeState;Ye.isRecording&&_A(Ye,me)}function $(me,Ye,Xe){var Be=n.keyName(me),wt,gr;Be=="Up"||Be=="Down"?(wt=Be=="Up",gr=me.target?me.target.selectionEnd:0,Ye=le.searchHistoryController.nextMatch(Ye,wt)||"",Xe(Ye),gr&&me.target&&(me.target.selectionEnd=me.target.selectionStart=Math.min(gr,me.target.value.length))):Be!="Left"&&Be!="Right"&&Be!="Ctrl"&&Be!="Alt"&&Be!="Shift"&&le.searchHistoryController.reset();var qt;try{qt=Ii(c,Ye,!0,!0)}catch{}qt?c.scrollIntoView(eo(c,!S,qt),30):(sa(c),c.scrollTo(k.left,k.top))}function oe(me,Ye,Xe){var Be=n.keyName(me);Be=="Esc"||Be=="Ctrl-C"||Be=="Ctrl-["||Be=="Backspace"&&Ye==""?(le.searchHistoryController.pushInput(Ye),le.searchHistoryController.reset(),Ii(c,I),sa(c),c.scrollTo(k.left,k.top),n.e_stop(me),ht(c),Xe(),c.focus()):Be=="Up"||Be=="Down"?n.e_stop(me):Be=="Ctrl-U"&&(n.e_stop(me),Xe(""))}switch(_.searchArgs.querySrc){case"prompt":var pe=le.macroModeState;if(pe.isPlaying){var be=pe.replaySearchQueries.shift();x(be,!0,!1)}else ia(c,{onClose:q,prefix:C,desc:"(JavaScript regexp)",onKeyUp:$,onKeyDown:oe});break;case"wordUnderCursor":var ne=ee(c,!1,!1,!1,!0),te=!0;if(ne||(ne=ee(c,!1,!1,!1,!1),te=!1),!ne)return;var be=c.getLine(ne.start.line).substring(ne.start.ch,ne.end.ch);te&&T?be="\\b"+be+"\\b":be=cr(be),le.jumpList.cachedCursor=c.getCursor(),c.setCursor(ne.start),x(be,!0,!1);break}},processEx:function(c,h,_){function S(C){le.exCommandHistoryController.pushInput(C),le.exCommandHistoryController.reset(),Ar.processCommand(c,C),c.state.vim&&ht(c)}function T(C,I,k){var x=n.keyName(C),q,$;(x=="Esc"||x=="Ctrl-C"||x=="Ctrl-["||x=="Backspace"&&I=="")&&(le.exCommandHistoryController.pushInput(I),le.exCommandHistoryController.reset(),n.e_stop(C),ht(c),k(),c.focus()),x=="Up"||x=="Down"?(n.e_stop(C),q=x=="Up",$=C.target?C.target.selectionEnd:0,I=le.exCommandHistoryController.nextMatch(I,q)||"",k(I),$&&C.target&&(C.target.selectionEnd=C.target.selectionStart=Math.min($,C.target.value.length))):x=="Ctrl-U"?(n.e_stop(C),k("")):x!="Left"&&x!="Right"&&x!="Ctrl"&&x!="Alt"&&x!="Shift"&&le.exCommandHistoryController.reset()}_.type=="keyToEx"?Ar.processCommand(c,_.exArgs.input):h.visualMode?ia(c,{onClose:S,prefix:":",value:"'<,'>",onKeyDown:T,selectValueOnOpen:!1}):ia(c,{onClose:S,prefix:":",onKeyDown:T})},evalInput:function(c,h){var _=h.inputState,S=_.motion,T=_.motionArgs||{},C=_.operator,I=_.operatorArgs||{},k=_.registerName,x=h.sel,q=lt(h.visualMode?Ce(c,x.head):c.getCursor("head")),$=lt(h.visualMode?Ce(c,x.anchor):c.getCursor("anchor")),oe=lt(q),pe=lt($),ne,te,be;if(C&&this.recordLastEdit(h,_),_.repeatOverride!==void 0?be=_.repeatOverride:be=_.getRepeat(),be>0&&T.explicitRepeat?T.repeatIsExplicit=!0:(T.noRepeat||!T.explicitRepeat&&be===0)&&(be=1,T.repeatIsExplicit=!1),_.selectedCharacter&&(T.selectedCharacter=I.selectedCharacter=_.selectedCharacter),T.repeat=be,ht(c),S){var me=$e[S](c,q,T,h,_);if(h.lastMotion=$e[S],!me)return;if(T.toJumplist){var Ye=le.jumpList,Xe=Ye.cachedCursor;Xe?(fe(c,Xe,me),delete Ye.cachedCursor):fe(c,q,me)}me instanceof Array?(te=me[0],ne=me[1]):ne=me,ne||(ne=lt(q)),h.visualMode?(h.visualBlock&&ne.ch===1/0||(ne=Ce(c,ne,oe)),te&&(te=Ce(c,te)),te=te||pe,x.anchor=te,x.head=ne,tn(c),Br(c,h,"<",St(te,ne)?te:ne),Br(c,h,">",St(te,ne)?ne:te)):C||(ne=Ce(c,ne,oe),c.setCursor(ne.line,ne.ch))}if(C){if(I.lastSel){te=pe;var Be=I.lastSel,wt=Math.abs(Be.head.line-Be.anchor.line),gr=Math.abs(Be.head.ch-Be.anchor.ch);Be.visualLine?ne=new e(pe.line+wt,pe.ch):Be.visualBlock?ne=new e(pe.line+wt,pe.ch+gr):Be.head.line==Be.anchor.line?ne=new e(pe.line,pe.ch+gr):ne=new e(pe.line+wt,pe.ch),h.visualMode=!0,h.visualLine=Be.visualLine,h.visualBlock=Be.visualBlock,x=h.sel={anchor:te,head:ne},tn(c)}else h.visualMode&&(I.lastSel={anchor:lt(x.anchor),head:lt(x.head),visualBlock:h.visualBlock,visualLine:h.visualLine});var qt,ir,ct,pt,Rr;if(h.visualMode){qt=we(x.head,x.anchor),ir=H(x.head,x.anchor),ct=h.visualLine||I.linewise,pt=h.visualBlock?"block":ct?"line":"char";var Xt=r(c,qt,ir);if(Rr=qn(c,{anchor:Xt.start,head:Xt.end},pt),ct){var Zt=Rr.ranges;if(pt=="block")for(var oi=0;oik:$.lineq&&T.line==q?ii(c,h,_,S,!0):(_.toFirstChar&&(C=Y(c.getLine(k)),S.lastHPos=C),S.lastHSPos=c.charCoords(new e(k,C),"div").left,new e(k,C))},moveByDisplayLines:function(c,h,_,S){var T=h;switch(S.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:S.lastHSPos=c.charCoords(T,"div").left}var C=_.repeat,I=c.findPosV(T,_.forward?C:-C,"line",S.lastHSPos);if(I.hitSide)if(_.forward)var k=c.charCoords(I,"div"),x={top:k.top+8,left:S.lastHSPos},I=c.coordsChar(x,"div");else{var q=c.charCoords(new e(c.firstLine(),0),"div");q.left=S.lastHSPos,I=c.coordsChar(q,"div")}return S.lastHPos=I.ch,I},moveByPage:function(c,h,_){var S=h,T=_.repeat;return c.findPosV(S,_.forward?T:-T,"page")},moveByParagraph:function(c,h,_){var S=_.forward?1:-1;return ta(c,h,_.repeat,S)},moveBySentence:function(c,h,_){var S=_.forward?1:-1;return za(c,h,_.repeat,S)},moveByScroll:function(c,h,_,S){var T=c.getScrollInfo(),C=null,I=_.repeat;I||(I=T.clientHeight/(2*c.defaultTextHeight()));var k=c.charCoords(h,"local");if(_.repeat=I,C=$e.moveByDisplayLines(c,h,_,S),!C)return null;var x=c.charCoords(C,"local");return c.scrollTo(null,T.top+x.top-k.top),C},moveByWords:function(c,h,_){return $r(c,h,_.repeat,!!_.forward,!!_.wordEnd,!!_.bigWord)},moveTillCharacter:function(c,h,_){var S=_.repeat,T=ai(c,S,_.forward,_.selectedCharacter,h),C=_.forward?-1:1;return Se(C,_),T?(T.ch+=C,T):null},moveToCharacter:function(c,h,_){var S=_.repeat;return Se(0,_),ai(c,S,_.forward,_.selectedCharacter,h)||h},moveToSymbol:function(c,h,_){var S=_.repeat;return dt(c,S,_.forward,_.selectedCharacter)||h},moveToColumn:function(c,h,_,S){var T=_.repeat;return S.lastHPos=T-1,S.lastHSPos=c.charCoords(h,"div").left,Va(c,T)},moveToEol:function(c,h,_,S){return ii(c,h,_,S,!1)},moveToFirstNonWhiteSpaceCharacter:function(c,h){var _=h;return new e(_.line,Y(c.getLine(_.line)))},moveToMatchedSymbol:function(c,h){for(var _=h,S=_.line,T=_.ch,C=c.getLine(S),I;T"?/[(){}[\]<>]/:/[(){}[\]]/,q=c.findMatchingBracket(new e(S,T),{bracketRegex:x});return q.to}else return _},moveToStartOfLine:function(c,h){return new e(h.line,0)},moveToLineOrEdgeOfDocument:function(c,h,_){var S=_.forward?c.lastLine():c.firstLine();return _.repeatIsExplicit&&(S=_.repeat-c.getOption("firstLineNumber")),new e(S,Y(c.getLine(S)))},moveToStartOfDisplayLine:function(c){return c.execCommand("goLineLeft"),c.getCursor()},moveToEndOfDisplayLine:function(c){c.execCommand("goLineRight");var h=c.getCursor();return h.sticky=="before"&&h.ch--,h},textObjectManipulation:function(c,h,_,S){var T={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},C={"'":!0,'"':!0,"`":!0},I=_.selectedCharacter;I=="b"?I="(":I=="B"&&(I="{");var k=!_.textObjectInner,x,q;if(T[I]){if(q=!0,x=ra(c,h,I,k),!x){var $=c.getSearchCursor(new RegExp("\\"+I,"g"),h);$.find()&&(x=ra(c,$.from(),I,k))}}else if(C[I])q=!0,x=si(c,h,I,k);else if(I==="W")x=ee(c,k,!k,!0);else if(I==="w")x=ee(c,k,!k,!1);else if(I==="p")if(x=ta(c,h,_.repeat,0,k),_.linewise=!0,S.visualMode)S.visualLine||(S.visualLine=!0);else{var oe=S.inputState.operatorArgs;oe&&(oe.linewise=!0),x.end.line--}else if(I==="t")x=se(c,h,k);else if(I==="s"){var pe=c.getLine(h.line);h.ch>0&&G(pe[h.ch])&&(h.ch-=1);var ne=Ai(c,h,_.repeat,1,k),te=Ai(c,h,_.repeat,-1,k);L(c.getLine(te.line)[te.ch])&&L(c.getLine(ne.line)[ne.ch-1])&&(te={line:te.line,ch:te.ch+1}),x={start:te,end:ne}}return x?c.state.vim.visualMode?$n(c,x.start,x.end,q):[x.start,x.end]:null},repeatLastCharacterSearch:function(c,h,_){var S=le.lastCharacterSearch,T=_.repeat,C=_.forward===S.forward,I=(S.increment?1:0)*(C?-1:1);c.moveH(-I,"char"),_.inclusive=!!C;var k=ai(c,T,C,S.selectedCharacter);return k?(k.ch+=I,k):(c.moveH(I,"char"),h)}};function Pr(c,h){$e[c]=h}function nr(c,h){for(var _=[],S=0;Sc.lastLine()&&h.linewise&&!oe?c.replaceRange("",$,k):c.replaceRange("",I,k),h.linewise&&(oe||(c.setCursor($),n.commands.newlineAndIndent(c)),I.ch=Number.MAX_VALUE),S=I}le.registerController.pushText(h.registerName,"change",T,h.linewise,_.length>1),he.enterInsertMode(c,{head:S},c.state.vim)},delete:function(c,h,_){var S,T,C=c.state.vim;if(C.visualBlock){T=c.getSelection();var x=nr("",_.length);c.replaceSelections(x),S=we(_[0].head,_[0].anchor)}else{var I=_[0].anchor,k=_[0].head;h.linewise&&k.line!=c.firstLine()&&I.line==c.lastLine()&&I.line==k.line-1&&(I.line==c.firstLine()?I.ch=0:I=new e(I.line-1,nt(c,I.line-1))),T=c.getRange(I,k),c.replaceRange("",I,k),S=I,h.linewise&&(S=$e.moveToFirstNonWhiteSpaceCharacter(c,I))}return le.registerController.pushText(h.registerName,"delete",T,h.linewise,C.visualBlock),Ce(c,S)},indent:function(c,h,_){var S=c.state.vim;if(c.indentMore)for(var T=S.visualMode?h.repeat:1,C=0;Cq.top?(x.line+=(k-q.top)/T,x.line=Math.ceil(x.line),c.setCursor(x),q=c.charCoords(x,"local"),c.scrollTo(null,q.top)):c.scrollTo(null,k);else{var $=k+c.getScrollInfo().clientHeight;$=T.anchor.line?C=Ee(T.head,0,1):C=new e(T.anchor.line,0)}else if(S=="inplace"){if(_.visualMode)return}else S=="lastEdit"&&(C=ro(c)||C);c.setOption("disableInput",!1),h&&h.replace?(c.toggleOverwrite(!0),c.setOption("keyMap","vim-replace"),n.signal(c,"vim-mode-change",{mode:"replace"})):(c.toggleOverwrite(!1),c.setOption("keyMap","vim-insert"),n.signal(c,"vim-mode-change",{mode:"insert"})),le.macroModeState.isPlaying||(c.on("change",Vm),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=c.setBookmark(C,{insertLeft:!0}),n.on(c.getInputField(),"keydown",Wm)),_.visualMode&&$t(c),Dt(c,C,I)}},toggleVisualMode:function(c,h,_){var S=h.repeat,T=c.getCursor(),C;if(_.visualMode)_.visualLine^h.linewise||_.visualBlock^h.blockwise?(_.visualLine=!!h.linewise,_.visualBlock=!!h.blockwise,n.signal(c,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),tn(c)):$t(c);else{_.visualMode=!0,_.visualLine=!!h.linewise,_.visualBlock=!!h.blockwise,C=Ce(c,new e(T.line,T.ch+S-1));var I=r(c,T,C);_.sel={anchor:I.start,head:I.end},n.signal(c,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),tn(c),Br(c,_,"<",we(T,C)),Br(c,_,">",H(T,C))}},reselectLastSelection:function(c,h,_){var S=_.lastSelection;if(_.visualMode&&vt(c,_),S){var T=S.anchorMark.find(),C=S.headMark.find();if(!T||!C)return;_.sel={anchor:T,head:C},_.visualMode=!0,_.visualLine=S.visualLine,_.visualBlock=S.visualBlock,tn(c),Br(c,_,"<",we(T,C)),Br(c,_,">",H(T,C)),n.signal(c,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""})}},joinLines:function(c,h,_){var S,T;if(_.visualMode){if(S=c.getCursor("anchor"),T=c.getCursor("head"),St(T,S)){var C=T;T=S,S=C}T.ch=nt(c,T.line)-1}else{var I=Math.max(h.repeat,2);S=c.getCursor(),T=Ce(c,new e(S.line+I-1,1/0))}for(var k=0,x=S.line;x{this.continuePaste(c,h,_,C,S)});else{var T=S.toString();this.continuePaste(c,h,_,T,S)}},continuePaste:function(c,h,_,S,T){var C=lt(c.getCursor());if(S){if(h.matchIndent){var I=c.getOption("tabSize"),k=function(Xt){var Zt=Xt.split(" ").length-1,oi=Xt.split(" ").length-1;return Zt*I+oi*1},x=c.getLine(c.getCursor().line),q=k(x.match(/^\s*/)[0]),$=S.replace(/\n$/,""),oe=S!==$,pe=k(S.match(/^\s*/)[0]),S=$.replace(/^\s*/gm,function(Xt){var Zt=q+(k(Xt)-pe);if(Zt<0)return"";if(c.getOption("indentWithTabs")){var oi=Math.floor(Zt/I);return Array(oi+1).join(" ")}else return Array(Zt+1).join(" ")});S+=oe?` `:""}if(h.repeat>1)var S=Array(h.repeat+1).join(S);var ne=T.linewise,te=T.blockwise;if(te){S=S.split(` `),ne&&S.pop();for(var be=0;bec.lastLine()&&c.replaceRange(` -`,new e(ct,0));var pt=nt(c,ct);ptx.length&&(C=x.length),R=new e(T.line,C)}var q=r(c,T,R);if(T=q.start,R=q.end,S==` -`)_.visualMode||c.replaceRange("",T,R),(n.commands.newlineAndIndentContinueComment||n.commands.newlineAndIndent)(c);else{var $=c.getRange(T,R);if($=$.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,S),$=$.replace(/[^\n]/g,S),_.visualBlock){var oe=new Array(c.getOption("tabSize")+1).join(" ");$=c.getSelection(),$=$.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,S),$=$.replace(/\t/g,oe).replace(/[^\n]/g,S).split(` -`),c.replaceSelections($)}else c.replaceRange($,T,R);_.visualMode?(T=St(k[0].anchor,k[0].head)?k[0].anchor:k[0].head,c.setCursor(T),$t(c,!1)):c.setCursor(Ee(R,0,-1))}},incrementNumberToken:function(c,h){for(var _=c.getCursor(),S=c.getLine(_.line),T=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,C,R,k,x;(C=T.exec(S))!==null&&(R=C.index,k=R+C[0].length,!(_.chx&&($=-1),x+=$,x>k&&(x-=2)}return new e(C,x)}function Ke(c){var h={};for(var _ in c)c.hasOwnProperty(_)&&(h[_]=c[_]);return h}function Ee(c,h,_){return typeof h=="object"&&(_=h.ch,h=h.line),new e(c.line+h,c.ch+_)}function Gt(c,h,_,S){for(var T=S.operator,C,R=[],k=[],x=ft?h.length-a:0,q=x;q"){var _=h.length-11,S=c.slice(0,_),T=h.slice(0,_);return S==T&&c.length>_?"full":T.indexOf(S)==0?"partial":!1}else return c==h?"full":h.indexOf(c)==0?"partial":!1}function bt(c){var h=/^.*(<[^>]+>)$/.exec(c),_=h?h[1]:c.slice(-1);if(_.length>1)switch(_){case"":_=` -`;break;case"":_=" ";break;default:_="";break}return _}function en(c,h,_){return function(){for(var S=0;S<_;S++)h(c)}}function lt(c){return new e(c.line,c.ch)}function Wt(c,h){return c.ch==h.ch&&c.line==h.line}function St(c,h){return c.line2&&(h=we.apply(void 0,Array.prototype.slice.call(arguments,1))),St(c,h)?c:h}function H(c,h){return arguments.length>2&&(h=H.apply(void 0,Array.prototype.slice.call(arguments,1))),St(c,h)?h:c}function Ot(c,h,_){var S=St(c,h),T=St(h,_);return S&&T}function nt(c,h){return c.getLine(h).length}function Qt(c){return c.trim?c.trim():c.replace(/^\s+|\s+$/g,"")}function cr(c){return c.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function ze(c,h,_){var S=nt(c,h),T=new Array(_-S+1).join(" ");c.setCursor(new e(h,S)),c.replaceRange(T,c.getCursor())}function Ge(c,h){var _=[],S=c.listSelections(),T=lt(c.clipPos(h)),C=!Wt(h,T),R=c.getCursor("head"),k=Tr(S,R),x=Wt(S[k].head,S[k].anchor),q=S.length-1,$=q-k>k?q:0,oe=S[$].anchor,pe=Math.min(oe.line,T.line),ne=Math.max(oe.line,T.line),te=oe.ch,be=T.ch,me=S[$].head.ch-te,Ye=be-te;me>0&&Ye<=0?(te++,C||be--):me<0&&Ye>=0?(te--,x||be++):me<0&&Ye==-1&&(te--,be++);for(var Xe=pe;Xe<=ne;Xe++){var Be={anchor:new e(Xe,te),head:new e(Xe,be)};_.push(Be)}return c.setSelections(_),h.ch=be,oe.ch=te,oe}function Dt(c,h,_){for(var S=[],T=0;T<_;T++){var C=Ee(h,T,0);S.push({anchor:C,head:C})}c.setSelections(S,0)}function Tr(c,h,_){for(var S=0;Sx&&(T.line=x),T.ch=nt(c,T.line)}return{ranges:[{anchor:C,head:T}],primary:0}}else if(_=="block"){var q=Math.min(C.line,T.line),$=C.ch,oe=Math.max(C.line,T.line),pe=T.ch;$0&&C&&L(C);C=T.pop())_.line--,_.ch=0;C?(_.line--,_.ch=nt(c,_.line)):_.ch=0}}function ni(c,h,_){h.ch=0,_.ch=0,_.line++}function Y(c){if(!c)return 0;var h=c.search(/\S/);return h==-1?c.length:h}function ee(c,h,_,S,T){var C=rn(c),R=c.getLine(C.line),k=C.ch,x=T?F[0]:X[0];if(_&&/\s/.test(R.charAt(k)))x=function(ne){return/\s/.test(ne)};else{for(;!x(R.charAt(k));)if(k++,k>=R.length)return null;S?x=X[0]:(x=F[0],x(R.charAt(k))||(x=F[1]))}for(var q=k,$=k;x(R.charAt(q))&&q=0;)$--;if($++,h){for(var oe=q;/\s/.test(R.charAt(q))&&q0;)$--;$||($=pe)}}return{start:new e(C.line,$),end:new e(C.line,q)}}function se(c,h,_){var S=h;if(!n.findMatchingTag||!n.findEnclosingTag)return{start:S,end:S};var T=n.findMatchingTag(c,h)||n.findEnclosingTag(c,h);return!T||!T.open||!T.close?{start:S,end:S}:_?{start:T.open.from,end:T.close.to}:{start:T.open.to,end:T.close.from}}function fe(c,h,_){Wt(h,_)||le.jumpList.add(c,h,_)}function Se(c,h){le.lastCharacterSearch.increment=c,le.lastCharacterSearch.forward=h.forward,le.lastCharacterSearch.selectedCharacter=h.selectedCharacter}var xe={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},ye={bracket:{isComplete:function(c){if(c.nextCh===c.symb){if(c.depth++,c.depth>=1)return!0}else c.nextCh===c.reverseSymb&&c.depth--;return!1}},section:{init:function(c){c.curMoveThrough=!0,c.symb=(c.forward?"]":"[")===c.symb?"{":"}"},isComplete:function(c){return c.index===0&&c.nextCh===c.symb}},comment:{isComplete:function(c){var h=c.lastCh==="*"&&c.nextCh==="/";return c.lastCh=c.nextCh,h}},method:{init:function(c){c.symb=c.symb==="m"?"{":"}",c.reverseSymb=c.symb==="{"?"}":"{"},isComplete:function(c){return c.nextCh===c.symb}},preprocess:{init:function(c){c.index=0},isComplete:function(c){if(c.nextCh==="#"){var h=c.lineText.match(/^#(\w+)/)[1];if(h==="endif"){if(c.forward&&c.depth===0)return!0;c.depth++}else if(h==="if"){if(!c.forward&&c.depth===0)return!0;c.depth--}if(h==="else"&&c.depth===0)return!0}return!1}}};function dt(c,h,_,S){var T=lt(c.getCursor()),C=_?1:-1,R=_?c.lineCount():-1,k=T.ch,x=T.line,q=c.getLine(x),$={lineText:q,nextCh:q.charAt(k),lastCh:null,index:k,symb:S,reverseSymb:(_?{")":"(","}":"{"}:{"(":")","{":"}"})[S],forward:_,depth:0,curMoveThrough:!1},oe=xe[S];if(!oe)return T;var pe=ye[oe].init,ne=ye[oe].isComplete;for(pe&&pe($);x!==R&&h;){if($.index+=C,$.nextCh=$.lineText.charAt($.index),!$.nextCh){if(x+=C,$.lineText=c.getLine(x)||"",C>0)$.index=0;else{var te=$.lineText.length;$.index=te>0?te-1:0}$.nextCh=$.lineText.charAt($.index)}ne($)&&(T.line=x,T.ch=$.index,h--)}return $.nextCh||$.curMoveThrough?new e(x,$.index):T}function _r(c,h,_,S,T){var C=h.line,R=h.ch,k=c.getLine(C),x=_?1:-1,q=S?X:F;if(T&&k==""){if(C+=x,k=c.getLine(C),!B(c,C))return null;R=_?0:k.length}for(;;){if(T&&k=="")return{from:0,to:0,line:C};for(var $=x>0?k.length:-1,oe=$,pe=$;R!=$;){for(var ne=!1,te=0;te0?0:k.length}}function $r(c,h,_,S,T,C){var R=lt(h),k=[];(S&&!T||!S&&T)&&_++;for(var x=!(S&&T),q=0;q<_;q++){var $=_r(c,h,S,C,x);if(!$){var oe=nt(c,c.lastLine());k.push(S?{line:c.lastLine(),from:oe,to:oe}:{line:0,from:0,to:0});break}k.push($),h=new e($.line,S?$.to-1:$.from)}var pe=k.length!=_,ne=k[0],te=k.pop();return S&&!T?(!pe&&(ne.from!=R.ch||ne.line!=R.line)&&(te=k.pop()),new e(te.line,te.from)):S&&T?new e(te.line,te.to-1):!S&&T?(!pe&&(ne.to!=R.ch||ne.line!=R.line)&&(te=k.pop()),new e(te.line,te.to)):new e(te.line,te.from)}function ii(c,h,_,S,T){var C=h,R=new e(C.line+_.repeat-1,1/0),k=c.clipPos(R);return k.ch--,T||(S.lastHPos=1/0,S.lastHSPos=c.charCoords(k,"div").left),R}function ai(c,h,_,S,T){for(var C=T||c.getCursor(),R=C.ch,k,x=0;x0;)pe($,S)&&_--,$+=S;return new e($,0)}var ne=c.state.vim;if(ne.visualLine&&pe(C,1,!0)){var te=ne.sel.anchor;pe(te.line,-1,!0)&&(!T||te.line!=C)&&(C+=1)}var be=oe(C);for($=C;$<=k&&_;$++)pe($,1,!0)&&(!T||oe($)!=be)&&_--;for(q=new e($,0),$>k&&!be?be=!0:T=!1,$=C;$>R&&!((!T||oe($)==be||$==C)&&pe($,-1,!0));$--);return x=new e($,0),{start:x,end:q}}function Ai(c,h,_,S,T){function C(q){q.pos+q.dir<0||q.pos+q.dir>=q.line.length?q.line=null:q.pos+=q.dir}function R(q,$,oe,pe){var ne=q.getLine($),te={line:ne,ln:$,pos:oe,dir:pe};if(te.line==="")return{ln:te.ln,pos:te.pos};var be=te.pos;for(C(te);te.line!==null;){if(be=te.pos,G(te.line[te.pos]))if(T){for(C(te);te.line!==null&&L(te.line[te.pos]);)be=te.pos,C(te);return{ln:te.ln,pos:be+1}}else return{ln:te.ln,pos:te.pos+1};C(te)}return{ln:te.ln,pos:be+1}}function k(q,$,oe,pe){var ne=q.getLine($),te={line:ne,ln:$,pos:oe,dir:pe};if(te.line==="")return{ln:te.ln,pos:te.pos};var be=te.pos;for(C(te);te.line!==null;){if(!L(te.line[te.pos])&&!G(te.line[te.pos]))be=te.pos;else if(G(te.line[te.pos]))return T?L(te.line[te.pos+1])?{ln:te.ln,pos:te.pos+1}:{ln:te.ln,pos:be}:{ln:te.ln,pos:be};C(te)}return te.line=ne,T&&L(te.line[te.pos])?{ln:te.ln,pos:te.pos}:{ln:te.ln,pos:be}}for(var x={ln:h.line,pos:h.ch};_>0;)S<0?x=k(c,x.ln,x.pos,S):x=R(c,x.ln,x.pos,S),_--;return new e(x.ln,x.pos)}function za(c,h,_,S){function T(x,q){if(q.pos+q.dir<0||q.pos+q.dir>=q.line.length){if(q.ln+=q.dir,!B(x,q.ln)){q.line=null,q.ln=null,q.pos=null;return}q.line=x.getLine(q.ln),q.pos=q.dir>0?0:q.line.length-1}else q.pos+=q.dir}function C(x,q,$,oe){var me=x.getLine(q),pe=me==="",ne={line:me,ln:q,pos:$,dir:oe},te={ln:ne.ln,pos:ne.pos},be=ne.line==="";for(T(x,ne);ne.line!==null;){if(te.ln=ne.ln,te.pos=ne.pos,ne.line===""&&!be)return{ln:ne.ln,pos:ne.pos};if(pe&&ne.line!==""&&!L(ne.line[ne.pos]))return{ln:ne.ln,pos:ne.pos};G(ne.line[ne.pos])&&!pe&&(ne.pos===ne.line.length-1||L(ne.line[ne.pos+1]))&&(pe=!0),T(x,ne)}var me=x.getLine(te.ln);te.pos=0;for(var Ye=me.length-1;Ye>=0;--Ye)if(!L(me[Ye])){te.pos=Ye;break}return te}function R(x,q,$,oe){var be=x.getLine(q),pe={line:be,ln:q,pos:$,dir:oe},ne={ln:pe.ln,pos:null},te=pe.line==="";for(T(x,pe);pe.line!==null;){if(pe.line===""&&!te)return ne.pos!==null?ne:{ln:pe.ln,pos:pe.pos};if(G(pe.line[pe.pos])&&ne.pos!==null&&!(pe.ln===ne.ln&&pe.pos+1===ne.pos))return ne;pe.line!==""&&!L(pe.line[pe.pos])&&(te=!1,ne={ln:pe.ln,pos:pe.pos}),T(x,pe)}var be=x.getLine(ne.ln);ne.pos=0;for(var me=0;me0;)S<0?k=R(c,k.ln,k.pos,S):k=C(c,k.ln,k.pos,S),_--;return new e(k.ln,k.pos)}function ra(c,h,_,S){var T=h,C,R,k={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[_],x={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[_],q=c.getLine(T.line).charAt(T.ch),$=q===x?1:0;if(C=c.scanForBracket(new e(T.line,T.ch+$),-1,void 0,{bracketRegex:k}),R=c.scanForBracket(new e(T.line,T.ch+$),1,void 0,{bracketRegex:k}),!C||!R)return null;if(C=C.pos,R=R.pos,C.line==R.line&&C.ch>R.ch||C.line>R.line){var oe=C;C=R,R=oe}return S?R.ch+=1:C.ch+=1,{start:C,end:R}}function si(c,h,_,S){var T=lt(h),C=c.getLine(T.line),R=C.split(""),k,x,q,$,oe=R.indexOf(_);if(T.ch-1&&!k;q--)R[q]==_&&(k=q+1);if(k&&!x)for(q=k,$=R.length;q<$&&!x;q++)R[q]==_&&(x=q);return!k||!x?{start:T,end:T}:(S&&(--k,++x),{start:new e(T.line,k),end:new e(T.line,x)})}ce("pcre",!0,"boolean");function na(){}na.prototype={getQuery:function(){return le.query},setQuery:function(c){le.query=c},getOverlay:function(){return this.searchOverlay},setOverlay:function(c){this.searchOverlay=c},isReversed:function(){return le.isReversed},setReversed:function(c){le.isReversed=c},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(c){this.annotate=c}};function Cr(c){var h=c.state.vim;return h.searchState_||(h.searchState_=new na)}function vr(c){return K(c,"/")}function U(c){return ae(c,"/")}function K(c,h){var _=ae(c,h)||[];if(!_.length)return[];var S=[];if(_[0]===0){for(var T=0;T<_.length;T++)typeof _[T]=="number"&&S.push(c.substring(_[T]+1,_[T+1]));return S}}function ae(c,h){h||(h="/");for(var _=!1,S=[],T=0;Tx.length&&(C=x.length),I=new e(T.line,C)}var q=r(c,T,I);if(T=q.start,I=q.end,S==` +`)_.visualMode||c.replaceRange("",T,I),(n.commands.newlineAndIndentContinueComment||n.commands.newlineAndIndent)(c);else{var $=c.getRange(T,I);if($=$.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,S),$=$.replace(/[^\n]/g,S),_.visualBlock){var oe=new Array(c.getOption("tabSize")+1).join(" ");$=c.getSelection(),$=$.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,S),$=$.replace(/\t/g,oe).replace(/[^\n]/g,S).split(` +`),c.replaceSelections($)}else c.replaceRange($,T,I);_.visualMode?(T=St(k[0].anchor,k[0].head)?k[0].anchor:k[0].head,c.setCursor(T),$t(c,!1)):c.setCursor(Ee(I,0,-1))}},incrementNumberToken:function(c,h){for(var _=c.getCursor(),S=c.getLine(_.line),T=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,C,I,k,x;(C=T.exec(S))!==null&&(I=C.index,k=I+C[0].length,!(_.chx&&($=-1),x+=$,x>k&&(x-=2)}return new e(C,x)}function Ke(c){var h={};for(var _ in c)c.hasOwnProperty(_)&&(h[_]=c[_]);return h}function Ee(c,h,_){return typeof h=="object"&&(_=h.ch,h=h.line),new e(c.line+h,c.ch+_)}function Gt(c,h,_,S){for(var T=S.operator,C,I=[],k=[],x=ft?h.length-a:0,q=x;q"){var _=h.length-11,S=c.slice(0,_),T=h.slice(0,_);return S==T&&c.length>_?"full":T.indexOf(S)==0?"partial":!1}else return c==h?"full":h.indexOf(c)==0?"partial":!1}function bt(c){var h=/^.*(<[^>]+>)$/.exec(c),_=h?h[1]:c.slice(-1);if(_.length>1)switch(_){case"":_=` +`;break;case"":_=" ";break;default:_="";break}return _}function en(c,h,_){return function(){for(var S=0;S<_;S++)h(c)}}function lt(c){return new e(c.line,c.ch)}function Wt(c,h){return c.ch==h.ch&&c.line==h.line}function St(c,h){return c.line2&&(h=we.apply(void 0,Array.prototype.slice.call(arguments,1))),St(c,h)?c:h}function H(c,h){return arguments.length>2&&(h=H.apply(void 0,Array.prototype.slice.call(arguments,1))),St(c,h)?h:c}function Ot(c,h,_){var S=St(c,h),T=St(h,_);return S&&T}function nt(c,h){return c.getLine(h).length}function Qt(c){return c.trim?c.trim():c.replace(/^\s+|\s+$/g,"")}function cr(c){return c.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function ze(c,h,_){var S=nt(c,h),T=new Array(_-S+1).join(" ");c.setCursor(new e(h,S)),c.replaceRange(T,c.getCursor())}function Ge(c,h){var _=[],S=c.listSelections(),T=lt(c.clipPos(h)),C=!Wt(h,T),I=c.getCursor("head"),k=Tr(S,I),x=Wt(S[k].head,S[k].anchor),q=S.length-1,$=q-k>k?q:0,oe=S[$].anchor,pe=Math.min(oe.line,T.line),ne=Math.max(oe.line,T.line),te=oe.ch,be=T.ch,me=S[$].head.ch-te,Ye=be-te;me>0&&Ye<=0?(te++,C||be--):me<0&&Ye>=0?(te--,x||be++):me<0&&Ye==-1&&(te--,be++);for(var Xe=pe;Xe<=ne;Xe++){var Be={anchor:new e(Xe,te),head:new e(Xe,be)};_.push(Be)}return c.setSelections(_),h.ch=be,oe.ch=te,oe}function Dt(c,h,_){for(var S=[],T=0;T<_;T++){var C=Ee(h,T,0);S.push({anchor:C,head:C})}c.setSelections(S,0)}function Tr(c,h,_){for(var S=0;Sx&&(T.line=x),T.ch=nt(c,T.line)}return{ranges:[{anchor:C,head:T}],primary:0}}else if(_=="block"){var q=Math.min(C.line,T.line),$=C.ch,oe=Math.max(C.line,T.line),pe=T.ch;$0&&C&&L(C);C=T.pop())_.line--,_.ch=0;C?(_.line--,_.ch=nt(c,_.line)):_.ch=0}}function ni(c,h,_){h.ch=0,_.ch=0,_.line++}function Y(c){if(!c)return 0;var h=c.search(/\S/);return h==-1?c.length:h}function ee(c,h,_,S,T){var C=rn(c),I=c.getLine(C.line),k=C.ch,x=T?F[0]:X[0];if(_&&/\s/.test(I.charAt(k)))x=function(ne){return/\s/.test(ne)};else{for(;!x(I.charAt(k));)if(k++,k>=I.length)return null;S?x=X[0]:(x=F[0],x(I.charAt(k))||(x=F[1]))}for(var q=k,$=k;x(I.charAt(q))&&q=0;)$--;if($++,h){for(var oe=q;/\s/.test(I.charAt(q))&&q0;)$--;$||($=pe)}}return{start:new e(C.line,$),end:new e(C.line,q)}}function se(c,h,_){var S=h;if(!n.findMatchingTag||!n.findEnclosingTag)return{start:S,end:S};var T=n.findMatchingTag(c,h)||n.findEnclosingTag(c,h);return!T||!T.open||!T.close?{start:S,end:S}:_?{start:T.open.from,end:T.close.to}:{start:T.open.to,end:T.close.from}}function fe(c,h,_){Wt(h,_)||le.jumpList.add(c,h,_)}function Se(c,h){le.lastCharacterSearch.increment=c,le.lastCharacterSearch.forward=h.forward,le.lastCharacterSearch.selectedCharacter=h.selectedCharacter}var xe={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},ye={bracket:{isComplete:function(c){if(c.nextCh===c.symb){if(c.depth++,c.depth>=1)return!0}else c.nextCh===c.reverseSymb&&c.depth--;return!1}},section:{init:function(c){c.curMoveThrough=!0,c.symb=(c.forward?"]":"[")===c.symb?"{":"}"},isComplete:function(c){return c.index===0&&c.nextCh===c.symb}},comment:{isComplete:function(c){var h=c.lastCh==="*"&&c.nextCh==="/";return c.lastCh=c.nextCh,h}},method:{init:function(c){c.symb=c.symb==="m"?"{":"}",c.reverseSymb=c.symb==="{"?"}":"{"},isComplete:function(c){return c.nextCh===c.symb}},preprocess:{init:function(c){c.index=0},isComplete:function(c){if(c.nextCh==="#"){var h=c.lineText.match(/^#(\w+)/)[1];if(h==="endif"){if(c.forward&&c.depth===0)return!0;c.depth++}else if(h==="if"){if(!c.forward&&c.depth===0)return!0;c.depth--}if(h==="else"&&c.depth===0)return!0}return!1}}};function dt(c,h,_,S){var T=lt(c.getCursor()),C=_?1:-1,I=_?c.lineCount():-1,k=T.ch,x=T.line,q=c.getLine(x),$={lineText:q,nextCh:q.charAt(k),lastCh:null,index:k,symb:S,reverseSymb:(_?{")":"(","}":"{"}:{"(":")","{":"}"})[S],forward:_,depth:0,curMoveThrough:!1},oe=xe[S];if(!oe)return T;var pe=ye[oe].init,ne=ye[oe].isComplete;for(pe&&pe($);x!==I&&h;){if($.index+=C,$.nextCh=$.lineText.charAt($.index),!$.nextCh){if(x+=C,$.lineText=c.getLine(x)||"",C>0)$.index=0;else{var te=$.lineText.length;$.index=te>0?te-1:0}$.nextCh=$.lineText.charAt($.index)}ne($)&&(T.line=x,T.ch=$.index,h--)}return $.nextCh||$.curMoveThrough?new e(x,$.index):T}function _r(c,h,_,S,T){var C=h.line,I=h.ch,k=c.getLine(C),x=_?1:-1,q=S?X:F;if(T&&k==""){if(C+=x,k=c.getLine(C),!B(c,C))return null;I=_?0:k.length}for(;;){if(T&&k=="")return{from:0,to:0,line:C};for(var $=x>0?k.length:-1,oe=$,pe=$;I!=$;){for(var ne=!1,te=0;te0?0:k.length}}function $r(c,h,_,S,T,C){var I=lt(h),k=[];(S&&!T||!S&&T)&&_++;for(var x=!(S&&T),q=0;q<_;q++){var $=_r(c,h,S,C,x);if(!$){var oe=nt(c,c.lastLine());k.push(S?{line:c.lastLine(),from:oe,to:oe}:{line:0,from:0,to:0});break}k.push($),h=new e($.line,S?$.to-1:$.from)}var pe=k.length!=_,ne=k[0],te=k.pop();return S&&!T?(!pe&&(ne.from!=I.ch||ne.line!=I.line)&&(te=k.pop()),new e(te.line,te.from)):S&&T?new e(te.line,te.to-1):!S&&T?(!pe&&(ne.to!=I.ch||ne.line!=I.line)&&(te=k.pop()),new e(te.line,te.to)):new e(te.line,te.from)}function ii(c,h,_,S,T){var C=h,I=new e(C.line+_.repeat-1,1/0),k=c.clipPos(I);return k.ch--,T||(S.lastHPos=1/0,S.lastHSPos=c.charCoords(k,"div").left),I}function ai(c,h,_,S,T){for(var C=T||c.getCursor(),I=C.ch,k,x=0;x0;)pe($,S)&&_--,$+=S;return new e($,0)}var ne=c.state.vim;if(ne.visualLine&&pe(C,1,!0)){var te=ne.sel.anchor;pe(te.line,-1,!0)&&(!T||te.line!=C)&&(C+=1)}var be=oe(C);for($=C;$<=k&&_;$++)pe($,1,!0)&&(!T||oe($)!=be)&&_--;for(q=new e($,0),$>k&&!be?be=!0:T=!1,$=C;$>I&&!((!T||oe($)==be||$==C)&&pe($,-1,!0));$--);return x=new e($,0),{start:x,end:q}}function Ai(c,h,_,S,T){function C(q){q.pos+q.dir<0||q.pos+q.dir>=q.line.length?q.line=null:q.pos+=q.dir}function I(q,$,oe,pe){var ne=q.getLine($),te={line:ne,ln:$,pos:oe,dir:pe};if(te.line==="")return{ln:te.ln,pos:te.pos};var be=te.pos;for(C(te);te.line!==null;){if(be=te.pos,G(te.line[te.pos]))if(T){for(C(te);te.line!==null&&L(te.line[te.pos]);)be=te.pos,C(te);return{ln:te.ln,pos:be+1}}else return{ln:te.ln,pos:te.pos+1};C(te)}return{ln:te.ln,pos:be+1}}function k(q,$,oe,pe){var ne=q.getLine($),te={line:ne,ln:$,pos:oe,dir:pe};if(te.line==="")return{ln:te.ln,pos:te.pos};var be=te.pos;for(C(te);te.line!==null;){if(!L(te.line[te.pos])&&!G(te.line[te.pos]))be=te.pos;else if(G(te.line[te.pos]))return T?L(te.line[te.pos+1])?{ln:te.ln,pos:te.pos+1}:{ln:te.ln,pos:be}:{ln:te.ln,pos:be};C(te)}return te.line=ne,T&&L(te.line[te.pos])?{ln:te.ln,pos:te.pos}:{ln:te.ln,pos:be}}for(var x={ln:h.line,pos:h.ch};_>0;)S<0?x=k(c,x.ln,x.pos,S):x=I(c,x.ln,x.pos,S),_--;return new e(x.ln,x.pos)}function za(c,h,_,S){function T(x,q){if(q.pos+q.dir<0||q.pos+q.dir>=q.line.length){if(q.ln+=q.dir,!B(x,q.ln)){q.line=null,q.ln=null,q.pos=null;return}q.line=x.getLine(q.ln),q.pos=q.dir>0?0:q.line.length-1}else q.pos+=q.dir}function C(x,q,$,oe){var me=x.getLine(q),pe=me==="",ne={line:me,ln:q,pos:$,dir:oe},te={ln:ne.ln,pos:ne.pos},be=ne.line==="";for(T(x,ne);ne.line!==null;){if(te.ln=ne.ln,te.pos=ne.pos,ne.line===""&&!be)return{ln:ne.ln,pos:ne.pos};if(pe&&ne.line!==""&&!L(ne.line[ne.pos]))return{ln:ne.ln,pos:ne.pos};G(ne.line[ne.pos])&&!pe&&(ne.pos===ne.line.length-1||L(ne.line[ne.pos+1]))&&(pe=!0),T(x,ne)}var me=x.getLine(te.ln);te.pos=0;for(var Ye=me.length-1;Ye>=0;--Ye)if(!L(me[Ye])){te.pos=Ye;break}return te}function I(x,q,$,oe){var be=x.getLine(q),pe={line:be,ln:q,pos:$,dir:oe},ne={ln:pe.ln,pos:null},te=pe.line==="";for(T(x,pe);pe.line!==null;){if(pe.line===""&&!te)return ne.pos!==null?ne:{ln:pe.ln,pos:pe.pos};if(G(pe.line[pe.pos])&&ne.pos!==null&&!(pe.ln===ne.ln&&pe.pos+1===ne.pos))return ne;pe.line!==""&&!L(pe.line[pe.pos])&&(te=!1,ne={ln:pe.ln,pos:pe.pos}),T(x,pe)}var be=x.getLine(ne.ln);ne.pos=0;for(var me=0;me0;)S<0?k=I(c,k.ln,k.pos,S):k=C(c,k.ln,k.pos,S),_--;return new e(k.ln,k.pos)}function ra(c,h,_,S){var T=h,C,I,k={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[_],x={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[_],q=c.getLine(T.line).charAt(T.ch),$=q===x?1:0;if(C=c.scanForBracket(new e(T.line,T.ch+$),-1,void 0,{bracketRegex:k}),I=c.scanForBracket(new e(T.line,T.ch+$),1,void 0,{bracketRegex:k}),!C||!I)return null;if(C=C.pos,I=I.pos,C.line==I.line&&C.ch>I.ch||C.line>I.line){var oe=C;C=I,I=oe}return S?I.ch+=1:C.ch+=1,{start:C,end:I}}function si(c,h,_,S){var T=lt(h),C=c.getLine(T.line),I=C.split(""),k,x,q,$,oe=I.indexOf(_);if(T.ch-1&&!k;q--)I[q]==_&&(k=q+1);if(k&&!x)for(q=k,$=I.length;q<$&&!x;q++)I[q]==_&&(x=q);return!k||!x?{start:T,end:T}:(S&&(--k,++x),{start:new e(T.line,k),end:new e(T.line,x)})}ce("pcre",!0,"boolean");function na(){}na.prototype={getQuery:function(){return le.query},setQuery:function(c){le.query=c},getOverlay:function(){return this.searchOverlay},setOverlay:function(c){this.searchOverlay=c},isReversed:function(){return le.isReversed},setReversed:function(c){le.isReversed=c},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(c){this.annotate=c}};function Cr(c){var h=c.state.vim;return h.searchState_||(h.searchState_=new na)}function vr(c){return K(c,"/")}function U(c){return ae(c,"/")}function K(c,h){var _=ae(c,h)||[];if(!_.length)return[];var S=[];if(_[0]===0){for(var T=0;T<_.length;T++)typeof _[T]=="number"&&S.push(c.substring(_[T]+1,_[T+1]));return S}}function ae(c,h){h||(h="/");for(var _=!1,S=[],T=0;T=h&&c<=_:c==h}function oa(c){var h=c.getScrollInfo(),_=6,S=10,T=c.coordsChar({left:0,top:_+h.top},"local"),C=h.clientHeight-S+h.top,R=c.coordsChar({left:0,top:C},"local");return{top:T.line,bottom:R.line}}function la(c,h,_){if(_=="'"||_=="`")return le.jumpList.find(c,-1)||new e(0,0);if(_==".")return ro(c);var S=h.marks[_];return S&&S.find()}function ro(c){if(c.getLastEditEnd)return c.getLastEditEnd();for(var h=c.doc.history.done,_=h.length;_--;)if(h[_].changes)return lt(h[_].changes[0].to)}var Wa=function(){this.buildCommandMap_()};Wa.prototype={processCommand:function(c,h,_){var S=this;c.operation(function(){c.curOp.isVimOp=!0,S._processCommand(c,h,_)})},_processCommand:function(c,h,_){var S=c.state.vim,T=le.registerController.getRegister(":"),C=T.toString(),R=new n.StringStream(h);T.setText(h);var k=_||{};k.input=h;try{this.parseInput_(c,R,k)}catch(oe){throw Et(c,oe.toString()),oe}S.visualMode&&$t(c);var x,q;if(!k.commandName)k.line!==void 0&&(q="move");else if(x=this.matchCommand_(k.commandName),x){if(q=x.name,x.excludeFromCommandHistory&&T.setText(C),this.parseCommandArgs_(R,k,x),x.type=="exToKey"){for(var $=0;$"))==null?void 0:C.line):_.selectionLine=c.getCursor().line:(_.selectionLine=_.line,_.selectionLineEnd=_.lineEnd);var S=h.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return S?_.commandName=S[1]:_.commandName=h.match(/.*/)[0],_},parseLineSpec_:function(c,h){var _=h.match(/^(\d+)/);if(_)return parseInt(_[1],10)-1;switch(h.next()){case".":return this.parseLineSpecOffset_(h,c.getCursor().line);case"$":return this.parseLineSpecOffset_(h,c.lastLine());case"'":var S=h.next(),T=la(c,c.state.vim,S);if(!T)throw new Error("Mark not set");return this.parseLineSpecOffset_(h,T.line);case"-":case"+":return h.backUp(1),this.parseLineSpecOffset_(h,c.getCursor().line);default:h.backUp(1);return}},parseLineSpecOffset_:function(c,h){var _=c.match(/^([+-])?(\d+)/);if(_){var S=parseInt(_[2],10);_[1]=="-"?h-=S:h+=S}return h},parseCommandArgs_:function(c,h,_){if(!c.eol()){h.argString=c.match(/.*/)[0];var S=_.argDelimiter||/\s+/,T=Qt(h.argString).split(S);T.length&&T[0]&&(h.args=T)}},matchCommand_:function(c){for(var h=c.length;h>0;h--){var _=c.substring(0,h);if(this.commandMap_[_]){var S=this.commandMap_[_];if(S.name.indexOf(c)===0)return S}}return null},buildCommandMap_:function(){this.commandMap_={};for(var c=0;c=h&&c<=_:c==h}function oa(c){var h=c.getScrollInfo(),_=6,S=10,T=c.coordsChar({left:0,top:_+h.top},"local"),C=h.clientHeight-S+h.top,I=c.coordsChar({left:0,top:C},"local");return{top:T.line,bottom:I.line}}function la(c,h,_){if(_=="'"||_=="`")return le.jumpList.find(c,-1)||new e(0,0);if(_==".")return ro(c);var S=h.marks[_];return S&&S.find()}function ro(c){if(c.getLastEditEnd)return c.getLastEditEnd();for(var h=c.doc.history.done,_=h.length;_--;)if(h[_].changes)return lt(h[_].changes[0].to)}var Wa=function(){this.buildCommandMap_()};Wa.prototype={processCommand:function(c,h,_){var S=this;c.operation(function(){c.curOp.isVimOp=!0,S._processCommand(c,h,_)})},_processCommand:function(c,h,_){var S=c.state.vim,T=le.registerController.getRegister(":"),C=T.toString(),I=new n.StringStream(h);T.setText(h);var k=_||{};k.input=h;try{this.parseInput_(c,I,k)}catch(oe){throw Et(c,oe.toString()),oe}S.visualMode&&$t(c);var x,q;if(!k.commandName)k.line!==void 0&&(q="move");else if(x=this.matchCommand_(k.commandName),x){if(q=x.name,x.excludeFromCommandHistory&&T.setText(C),this.parseCommandArgs_(I,k,x),x.type=="exToKey"){for(var $=0;$"))==null?void 0:C.line):_.selectionLine=c.getCursor().line:(_.selectionLine=_.line,_.selectionLineEnd=_.lineEnd);var S=h.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return S?_.commandName=S[1]:_.commandName=h.match(/.*/)[0],_},parseLineSpec_:function(c,h){var _=h.match(/^(\d+)/);if(_)return parseInt(_[1],10)-1;switch(h.next()){case".":return this.parseLineSpecOffset_(h,c.getCursor().line);case"$":return this.parseLineSpecOffset_(h,c.lastLine());case"'":var S=h.next(),T=la(c,c.state.vim,S);if(!T)throw new Error("Mark not set");return this.parseLineSpecOffset_(h,T.line);case"-":case"+":return h.backUp(1),this.parseLineSpecOffset_(h,c.getCursor().line);default:h.backUp(1);return}},parseLineSpecOffset_:function(c,h){var _=c.match(/^([+-])?(\d+)/);if(_){var S=parseInt(_[2],10);_[1]=="-"?h-=S:h+=S}return h},parseCommandArgs_:function(c,h,_){if(!c.eol()){h.argString=c.match(/.*/)[0];var S=_.argDelimiter||/\s+/,T=Qt(h.argString).split(S);T.length&&T[0]&&(h.args=T)}},matchCommand_:function(c){for(var h=c.length;h>0;h--){var _=c.substring(0,h);if(this.commandMap_[_]){var S=this.commandMap_[_];if(S.name.indexOf(c)===0)return S}}return null},buildCommandMap_:function(){this.commandMap_={};for(var c=0;c1)return"Invalid arguments";C=Rr&&"decimal"||Xt&&"hex"||Zt&&"octal"}pt[2]&&(R=new RegExp(pt[2].substr(1,pt[2].length-2),S?"i":""))}}var x=k();if(x){Et(c,x+": "+h.argString);return}var q=h.line||c.firstLine(),$=h.lineEnd||h.line||c.lastLine();if(q==$)return;var oe=new e(q,0),pe=new e($,nt(c,$)),ne=c.getRange(oe,pe).split(` -`),te=R||(C=="decimal"?/(-?)([\d]+)/:C=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:C=="octal"?/([0-7]+)/:null),be=C=="decimal"?10:C=="hex"?16:C=="octal"?8:null,me=[],Ye=[];if(C||R)for(var Xe=0;Xe=q){Et(c,"Invalid argument: "+h.argString.substring(T));return}for(var $=0;$<=q-x;$++){var oe=String.fromCharCode(x+$);delete _.marks[oe]}}else{Et(c,"Invalid argument: "+R+"-");return}}else delete _.marks[C]}}},Ar=new Wa;function no(c,h,_,S,T,C,R,k,x){c.state.vim.exMode=!0;var q=!1,$,oe,pe;function ne(){c.operation(function(){for(;!q;)te(),me();Ye()})}function te(){var Be=c.getRange(C.from(),C.to()),wt=Be.replace(R,k),gr=C.to().line;C.replace(wt),oe=C.to().line,T+=oe-gr,pe=oe1&&(Xm(c,_,_.insertModeRepeat-1,!0),_.lastEditInputState.repeatOverride=_.insertModeRepeat),delete _.insertModeRepeat,_.insertMode=!1,h||c.setCursor(c.getCursor().line,c.getCursor().ch-1),c.setOption("keyMap","vim"),c.setOption("disableInput",!0),c.toggleOverwrite(!1),T.setText(R.changes.join("")),n.signal(c,"vim-mode-change",{mode:"normal"}),S.isRecording&&mA(S)}function Xa(c){i.unshift(c)}function $m(c,h,_,S,T){var C={keys:c,type:h};C[h]=_,C[h+"Args"]=S;for(var R in T)C[R]=T[R];Xa(C)}ce("insertModeEscKeysTimeout",200,"number"),n.keyMap["vim-insert"]={fallthrough:["default"],attach:d,detach:u,call:f},n.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:d,detach:u};function qm(c,h,_,S){var T=le.registerController.getRegister(S);if(S==":"){T.keyBuffer[0]&&Ar.processCommand(c,T.keyBuffer[0]),_.isPlaying=!1;return}var C=T.keyBuffer,R=0;_.isPlaying=!0,_.replaySearchQueries=T.searchQueries.slice(0);for(var k=0;k|<\w+>|./.exec(x),$=q[0],x=x.substring(q.index+$.length),He.handleKey(c,$,"macro"),h.insertMode){var oe=T.insertModeChanges[R++].changes;le.macroModeState.lastInsertModeChanges.changes=oe,Km(c,oe,1),hn(c)}_.isPlaying=!1}function hA(c,h){if(!c.isPlaying){var _=c.latestRegister,S=le.registerController.getRegister(_);S&&S.pushText(h)}}function mA(c){if(!c.isPlaying){var h=c.latestRegister,_=le.registerController.getRegister(h);_&&_.pushInsertModeChanges&&_.pushInsertModeChanges(c.lastInsertModeChanges)}}function _A(c,h){if(!c.isPlaying){var _=c.latestRegister,S=le.registerController.getRegister(_);S&&S.pushSearchQuery&&S.pushSearchQuery(h)}}function Vm(c,h){var _=le.macroModeState,S=_.lastInsertModeChanges;if(!_.isPlaying)for(var T=c.state.vim;h;){if(S.expectCursorActivityForChange=!0,S.ignoreCount>1)S.ignoreCount--;else if(h.origin=="+input"||h.origin=="paste"||h.origin===void 0){var C=c.listSelections().length;C>1&&(S.ignoreCount=C);var R=h.text.join(` -`);if(S.maybeReset&&(S.changes=[],S.maybeReset=!1),R)if(c.state.overwrite&&!/\n/.test(R))S.changes.push([R]);else{if(R.length>1){var k=T&&T.insertEnd&&T.insertEnd.find(),x=c.getCursor();if(k&&k.line==x.line){var q=k.ch-x.ch;q>0&&q",H(S,_))}else h.insertMode||(h.lastHPos=c.getCursor().ch)}function tc(c){this.keyName=c}function Wm(c){var h=le.macroModeState,_=h.lastInsertModeChanges,S=n.keyName(c);if(!S)return;function T(){return _.maybeReset&&(_.changes=[],_.maybeReset=!1),_.changes.push(new tc(S)),!0}(S.indexOf("Delete")!=-1||S.indexOf("Backspace")!=-1)&&n.lookupKey(S,"vim-insert",T)}function Xm(c,h,_,S){var T=le.macroModeState;T.isPlaying=!0;var C=!!h.lastEditActionCommand,R=h.inputState;function k(){C?st.processAction(c,h,h.lastEditActionCommand):st.evalInput(c,h)}function x($){if(T.lastInsertModeChanges.changes.length>0){$=h.lastEditActionCommand?$:1;var oe=T.lastInsertModeChanges;Km(c,oe.changes,$)}}if(h.inputState=h.lastEditInputState,C&&h.lastEditActionCommand.interlaceInsertRepeat)for(var q=0;q<_;q++)k(),x(1);else S||k(),x(_);h.inputState=R,h.insertMode&&!S&&hn(c),T.isPlaying=!1}function Zm(c,h){n.lookupKey(h,"vim-insert",function(S){return typeof S=="string"?n.commands[S](c):S(c),!0})}function Km(c,h,_){var S=c.getCursor("head"),T=le.macroModeState.lastInsertModeChanges.visualBlock;T&&(Dt(c,S,T+1),_=c.listSelections().length,c.setCursor(S));for(var C=0;C<_;C++){T&&c.setCursor(Ee(S,C,0));for(var R=0;R"&&!T.insertMode&&!T.visualMode&&R&&T.status=="")ht(c);else if(C||!R||c.inVirtualSelectionMode)S=He.handleKey(c,h,_);else{var k=rc(T),x=T.inputState.changeQueueList||[];c.operation(function(){c.curOp.isVimOp=!0;var q=0;c.forEachSelection(function(){c.state.vim.inputState.changeQueue=x[q];var $=c.getCursor("head"),oe=c.getCursor("anchor"),pe=St($,oe)?0:-1,ne=St($,oe)?-1:0;$=Ee($,0,pe),oe=Ee(oe,0,ne),c.state.vim.sel.head=$,c.state.vim.sel.anchor=oe,S=He.handleKey(c,h,_),c.virtualSelection&&(x[q]=c.state.vim.inputState.changeQueue,c.state.vim=rc(k)),q++}),c.curOp.cursorActivity&&!S&&(c.curOp.cursorActivity=!1),c.state.vim=T,T.inputState.changeQueueList=x,T.inputState.changeQueue=null},!0)}return S&&!T.visualMode&&!T.insert&&T.visualMode!=c.somethingSelected()&&zm(c,T),S}return Me(),He}function Ir(n,e){var t=e.ch,r=e.line+1;r<1&&(r=1,t=0),r>n.lines&&(r=n.lines,t=Number.MAX_VALUE);var i=n.line(r);return Math.min(i.from+Math.max(0,t),i.to)}function nn(n,e){let t=n.lineAt(e);return{line:t.number-1,ch:e-t.from}}class Cl{constructor(e,t){this.line=e,this.ch=t}}function Ey(n,e,t){if(n.addEventListener)n.addEventListener(e,t,!1);else{var r=n._handlers||(n._handlers={});r[e]=(r[e]||[]).concat(t)}}function by(n,e,t){if(n.removeEventListener)n.removeEventListener(e,t,!1);else{var r=n._handlers,i=r&&r[e];if(i){var a=i.indexOf(t);a>-1&&(r[e]=i.slice(0,a).concat(i.slice(a+1)))}}}function Ty(n,e,...t){var r,i=(r=n._handlers)===null||r===void 0?void 0:r[e];if(i)for(var a=0;a({anchor:nn(e,t.anchor),head:nn(e,t.head)}))}setSelections(e,t){var r=this.cm6.state.doc,i=e.map(a=>de.range(Ir(r,a.anchor),Ir(r,a.head)));this.cm6.dispatch({selection:de.create(i,t)})}setSelection(e,t,r){var i=this.cm6.state.doc,a=[de.range(Ir(i,e),Ir(i,t))];this.cm6.dispatch({selection:de.create(a,0)}),r&&r.origin=="*mouse"&&this.onBeforeEndOperation()}getLine(e){var t=this.cm6.state.doc;return e<0||e>=t.lines?"":this.cm6.state.doc.line(e+1).text}getLineHandle(e){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{row:e,index:this.indexFromPos(new Cl(e,0))}}getLineNumber(e){var t=this.$lineHandleChanges;if(!t)return null;for(var r=e.index,i=0;i({from:i.from,to:i.to,insert:e[a]||""}));ps(this,{changes:r})}getSelection(){return this.getSelections().join(` +`}}else for(var C in S){var I=S[C].toString();I.length&&(T+='"'+C+" "+I+` +`)}Et(c,T)},sort:function(c,h){var _,S,T,C,I;function k(){if(h.argString){var ct=new n.StringStream(h.argString);if(ct.eat("!")&&(_=!0),ct.eol())return;if(!ct.eatSpace())return"Invalid arguments";var pt=ct.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!pt&&!ct.eol())return"Invalid arguments";if(pt[1]){S=pt[1].indexOf("i")!=-1,T=pt[1].indexOf("u")!=-1;var Rr=pt[1].indexOf("d")!=-1||pt[1].indexOf("n")!=-1&&1,Xt=pt[1].indexOf("x")!=-1&&1,Zt=pt[1].indexOf("o")!=-1&&1;if(Rr+Xt+Zt>1)return"Invalid arguments";C=Rr&&"decimal"||Xt&&"hex"||Zt&&"octal"}pt[2]&&(I=new RegExp(pt[2].substr(1,pt[2].length-2),S?"i":""))}}var x=k();if(x){Et(c,x+": "+h.argString);return}var q=h.line||c.firstLine(),$=h.lineEnd||h.line||c.lastLine();if(q==$)return;var oe=new e(q,0),pe=new e($,nt(c,$)),ne=c.getRange(oe,pe).split(` +`),te=I||(C=="decimal"?/(-?)([\d]+)/:C=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:C=="octal"?/([0-7]+)/:null),be=C=="decimal"?10:C=="hex"?16:C=="octal"?8:null,me=[],Ye=[];if(C||I)for(var Xe=0;Xe=q){Et(c,"Invalid argument: "+h.argString.substring(T));return}for(var $=0;$<=q-x;$++){var oe=String.fromCharCode(x+$);delete _.marks[oe]}}else{Et(c,"Invalid argument: "+I+"-");return}}else delete _.marks[C]}}},Ar=new Wa;function no(c,h,_,S,T,C,I,k,x){c.state.vim.exMode=!0;var q=!1,$,oe,pe;function ne(){c.operation(function(){for(;!q;)te(),me();Ye()})}function te(){var Be=c.getRange(C.from(),C.to()),wt=Be.replace(I,k),gr=C.to().line;C.replace(wt),oe=C.to().line,T+=oe-gr,pe=oe1&&(Xm(c,_,_.insertModeRepeat-1,!0),_.lastEditInputState.repeatOverride=_.insertModeRepeat),delete _.insertModeRepeat,_.insertMode=!1,h||c.setCursor(c.getCursor().line,c.getCursor().ch-1),c.setOption("keyMap","vim"),c.setOption("disableInput",!0),c.toggleOverwrite(!1),T.setText(I.changes.join("")),n.signal(c,"vim-mode-change",{mode:"normal"}),S.isRecording&&mA(S)}function Xa(c){i.unshift(c)}function $m(c,h,_,S,T){var C={keys:c,type:h};C[h]=_,C[h+"Args"]=S;for(var I in T)C[I]=T[I];Xa(C)}ce("insertModeEscKeysTimeout",200,"number"),n.keyMap["vim-insert"]={fallthrough:["default"],attach:d,detach:u,call:f},n.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:d,detach:u};function qm(c,h,_,S){var T=le.registerController.getRegister(S);if(S==":"){T.keyBuffer[0]&&Ar.processCommand(c,T.keyBuffer[0]),_.isPlaying=!1;return}var C=T.keyBuffer,I=0;_.isPlaying=!0,_.replaySearchQueries=T.searchQueries.slice(0);for(var k=0;k|<\w+>|./.exec(x),$=q[0],x=x.substring(q.index+$.length),He.handleKey(c,$,"macro"),h.insertMode){var oe=T.insertModeChanges[I++].changes;le.macroModeState.lastInsertModeChanges.changes=oe,Km(c,oe,1),hn(c)}_.isPlaying=!1}function hA(c,h){if(!c.isPlaying){var _=c.latestRegister,S=le.registerController.getRegister(_);S&&S.pushText(h)}}function mA(c){if(!c.isPlaying){var h=c.latestRegister,_=le.registerController.getRegister(h);_&&_.pushInsertModeChanges&&_.pushInsertModeChanges(c.lastInsertModeChanges)}}function _A(c,h){if(!c.isPlaying){var _=c.latestRegister,S=le.registerController.getRegister(_);S&&S.pushSearchQuery&&S.pushSearchQuery(h)}}function Vm(c,h){var _=le.macroModeState,S=_.lastInsertModeChanges;if(!_.isPlaying)for(var T=c.state.vim;h;){if(S.expectCursorActivityForChange=!0,S.ignoreCount>1)S.ignoreCount--;else if(h.origin=="+input"||h.origin=="paste"||h.origin===void 0){var C=c.listSelections().length;C>1&&(S.ignoreCount=C);var I=h.text.join(` +`);if(S.maybeReset&&(S.changes=[],S.maybeReset=!1),I)if(c.state.overwrite&&!/\n/.test(I))S.changes.push([I]);else{if(I.length>1){var k=T&&T.insertEnd&&T.insertEnd.find(),x=c.getCursor();if(k&&k.line==x.line){var q=k.ch-x.ch;q>0&&q",H(S,_))}else h.insertMode||(h.lastHPos=c.getCursor().ch)}function tc(c){this.keyName=c}function Wm(c){var h=le.macroModeState,_=h.lastInsertModeChanges,S=n.keyName(c);if(!S)return;function T(){return _.maybeReset&&(_.changes=[],_.maybeReset=!1),_.changes.push(new tc(S)),!0}(S.indexOf("Delete")!=-1||S.indexOf("Backspace")!=-1)&&n.lookupKey(S,"vim-insert",T)}function Xm(c,h,_,S){var T=le.macroModeState;T.isPlaying=!0;var C=!!h.lastEditActionCommand,I=h.inputState;function k(){C?st.processAction(c,h,h.lastEditActionCommand):st.evalInput(c,h)}function x($){if(T.lastInsertModeChanges.changes.length>0){$=h.lastEditActionCommand?$:1;var oe=T.lastInsertModeChanges;Km(c,oe.changes,$)}}if(h.inputState=h.lastEditInputState,C&&h.lastEditActionCommand.interlaceInsertRepeat)for(var q=0;q<_;q++)k(),x(1);else S||k(),x(_);h.inputState=I,h.insertMode&&!S&&hn(c),T.isPlaying=!1}function Zm(c,h){n.lookupKey(h,"vim-insert",function(S){return typeof S=="string"?n.commands[S](c):S(c),!0})}function Km(c,h,_){var S=c.getCursor("head"),T=le.macroModeState.lastInsertModeChanges.visualBlock;T&&(Dt(c,S,T+1),_=c.listSelections().length,c.setCursor(S));for(var C=0;C<_;C++){T&&c.setCursor(Ee(S,C,0));for(var I=0;I"&&!T.insertMode&&!T.visualMode&&I&&T.status=="")ht(c);else if(C||!I||c.inVirtualSelectionMode)S=He.handleKey(c,h,_);else{var k=rc(T),x=T.inputState.changeQueueList||[];c.operation(function(){c.curOp.isVimOp=!0;var q=0;c.forEachSelection(function(){c.state.vim.inputState.changeQueue=x[q];var $=c.getCursor("head"),oe=c.getCursor("anchor"),pe=St($,oe)?0:-1,ne=St($,oe)?-1:0;$=Ee($,0,pe),oe=Ee(oe,0,ne),c.state.vim.sel.head=$,c.state.vim.sel.anchor=oe,S=He.handleKey(c,h,_),c.virtualSelection&&(x[q]=c.state.vim.inputState.changeQueue,c.state.vim=rc(k)),q++}),c.curOp.cursorActivity&&!S&&(c.curOp.cursorActivity=!1),c.state.vim=T,T.inputState.changeQueueList=x,T.inputState.changeQueue=null},!0)}return S&&!T.visualMode&&!T.insert&&T.visualMode!=c.somethingSelected()&&zm(c,T),S}return Me(),He}function Ir(n,e){var t=e.ch,r=e.line+1;r<1&&(r=1,t=0),r>n.lines&&(r=n.lines,t=Number.MAX_VALUE);var i=n.line(r);return Math.min(i.from+Math.max(0,t),i.to)}function nn(n,e){let t=n.lineAt(e);return{line:t.number-1,ch:e-t.from}}class Cl{constructor(e,t){this.line=e,this.ch=t}}function Ey(n,e,t){if(n.addEventListener)n.addEventListener(e,t,!1);else{var r=n._handlers||(n._handlers={});r[e]=(r[e]||[]).concat(t)}}function by(n,e,t){if(n.removeEventListener)n.removeEventListener(e,t,!1);else{var r=n._handlers,i=r&&r[e];if(i){var a=i.indexOf(t);a>-1&&(r[e]=i.slice(0,a).concat(i.slice(a+1)))}}}function Ty(n,e,...t){var r,i=(r=n._handlers)===null||r===void 0?void 0:r[e];if(i)for(var a=0;a({anchor:nn(e,t.anchor),head:nn(e,t.head)}))}setSelections(e,t){var r=this.cm6.state.doc,i=e.map(a=>de.range(Ir(r,a.anchor),Ir(r,a.head)));this.cm6.dispatch({selection:de.create(i,t)})}setSelection(e,t,r){var i=this.cm6.state.doc,a=[de.range(Ir(i,e),Ir(i,t))];this.cm6.dispatch({selection:de.create(a,0)}),r&&r.origin=="*mouse"&&this.onBeforeEndOperation()}getLine(e){var t=this.cm6.state.doc;return e<0||e>=t.lines?"":this.cm6.state.doc.line(e+1).text}getLineHandle(e){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{row:e,index:this.indexFromPos(new Cl(e,0))}}getLineNumber(e){var t=this.$lineHandleChanges;if(!t)return null;for(var r=e.index,i=0;i({from:i.from,to:i.to,insert:e[a]||""}));ps(this,{changes:r})}getSelection(){return this.getSelections().join(` `)}getSelections(){var e=this.cm6;return e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to))}somethingSelected(){return this.cm6.state.selection.ranges.some(e=>!e.empty)}getInputField(){return this.cm6.contentDOM}clipPos(e){var t=this.cm6.state.doc,r=e.ch,i=e.line+1;i<1&&(i=1,r=0),i>t.lines&&(i=t.lines,r=Number.MAX_VALUE);var a=t.line(i);return r=Math.min(Math.max(0,r),a.to-a.from),new Cl(i-1,r)}getValue(){return this.cm6.state.doc.toString()}setValue(e){var t=this.cm6;return t.dispatch({changes:{from:0,to:t.state.doc.length,insert:e},selection:de.range(0,0)})}focus(){return this.cm6.focus()}blur(){return this.cm6.contentDOM.blur()}defaultTextHeight(){return this.cm6.defaultLineHeight}findMatchingBracket(e){var t=this.cm6.state,r=Ir(t.doc,e),i=on(t,r+1,-1);return i&&i.end?{to:nn(t.doc,i.end.from)}:(i=on(t,r,1),i&&i.end?{to:nn(t.doc,i.end.from)}:{to:void 0})}scanForBracket(e,t,r,i){return ML(this,e,t,r,i)}indentLine(e,t){t?this.indentMore():this.indentLess()}indentMore(){vm(this.cm6)}indentLess(){ym(this.cm6)}execCommand(e){e=="indentAuto"?at.commands.indentAuto(this):e=="goLineLeft"?Z1(this.cm6):e=="goLineRight"?(X1(this.cm6),Ix(this.cm6)):console.log(e+" is not implemented")}setBookmark(e,t){var r=t!=null&&t.insertLeft?1:-1,i=this.indexFromPos(e),a=new UL(this,i,r);return a}addOverlay({query:e}){let t=new CL({regexp:!0,search:e.source,caseSensitive:!/i/.test(e.flags)});if(t.valid){t.forVim=!0,this.cm6Query=t;let r=Ah.of(t);return this.cm6.dispatch({effects:r}),t}}removeOverlay(e){if(!this.cm6Query)return;this.cm6Query.forVim=!1;let t=Ah.of(this.cm6Query);this.cm6.dispatch({effects:t})}getSearchCursor(e,t){var r=this,i=null,a=null;t.ch==null&&(t.ch=Number.MAX_VALUE);var s=Ir(r.cm6.state.doc,t),o=e.source.replace(/(\\.|{(?:\d+(?:,\d*)?|,\d+)})|[{}]/g,function(m,g){return g||"\\"+m});function l(m,g=0,b=m.length){return new Im(m,o,{ignoreCase:e.ignoreCase},g,b)}function u(m){var g=r.cm6.state.doc;if(m>g.length)return null;let b=l(g,m).next();return b.done?null:b.value}var d=1e4;function f(m,g){var b=r.cm6.state.doc;for(let v=1;;v++){let y=Math.max(m,g-v*d),N=l(b,y,g),F=null;for(;!N.next().done;)F=N.value;if(F&&(y==m||F.from>y+10))return F;if(y==m)return null}}return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(m){var g=r.cm6.state.doc;if(m){let b=i?i.from==i.to?i.to-1:i.from:s;i=f(0,b)}else{let b=i?i.from==i.to?i.to+1:i.to:s;i=u(b)}return a=i&&{from:nn(g,i.from),to:nn(g,i.to),match:i.match},i&&i.match},from:function(){return a==null?void 0:a.from},to:function(){return a==null?void 0:a.to},replace:function(m){i&&(ps(r,{changes:{from:i.from,to:i.to,insert:m}}),i.to=i.from+m.length,a&&(a.to=nn(r.cm6.state.doc,i.to)))}}}findPosV(e,t,r,i){let{cm6:a}=this;const s=a.state.doc;let o=r=="page"?a.dom.clientHeight:0;const l=Ir(s,e);let u=de.range(l,l,i),d=Math.round(Math.abs(t));for(let m=0;m0,o):r=="line"&&(u=a.moveVertically(u,t>0));let f=nn(s,u.head);return(t<0&&u.head==0&&i!=0&&e.line==0&&e.ch!=0||t>0&&u.head==s.length&&f.ch!=i&&e.line==f.line)&&(f.hitSide=!0),f}charCoords(e,t){var r=this.cm6.contentDOM.getBoundingClientRect(),i=Ir(this.cm6.state.doc,e),a=this.cm6.coordsAtPos(i),s=-r.top;return{left:((a==null?void 0:a.left)||0)-r.left,top:((a==null?void 0:a.top)||0)+s,bottom:((a==null?void 0:a.bottom)||0)+s}}coordsChar(e,t){var r=this.cm6.contentDOM.getBoundingClientRect(),i=this.cm6.posAtCoords({x:e.left+r.left,y:e.top+r.top})||0;return nn(this.cm6.state.doc,i)}getScrollInfo(){var e=this.cm6.scrollDOM;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight,width:e.scrollWidth,clientHeight:e.clientHeight,clientWidth:e.clientWidth}}scrollTo(e,t){e!=null&&(this.cm6.scrollDOM.scrollLeft=e),t!=null&&(this.cm6.scrollDOM.scrollTop=t)}scrollIntoView(e,t){if(e){var r=this.indexFromPos(e);this.cm6.dispatch({effects:Ae.scrollIntoView(r)})}else this.cm6.dispatch({scrollIntoView:!0,userEvent:"scroll"})}getWrapperElement(){return this.cm6.dom}getMode(){return{name:this.getOption("mode")}}setSize(e,t){this.cm6.dom.style.width=e+4+"px",this.cm6.dom.style.height=t+"px",this.refresh()}refresh(){this.cm6.measure()}destroy(){this.removeOverlay()}getLastEditEnd(){return this.posFromIndex(this.$lastChangeEndOffset)}onChange(e){this.$lineHandleChanges&&this.$lineHandleChanges.push(e);for(let r in this.marks)this.marks[r].update(e.changes);this.virtualSelection&&(this.virtualSelection.ranges=this.virtualSelection.ranges.map(r=>r.map(e.changes)));var t=this.curOp=this.curOp||{};e.changes.iterChanges((r,i,a,s,o)=>{(t.$changeStart==null||t.$changeStart>a)&&(t.$changeStart=a),this.$lastChangeEndOffset=s;var l={text:o.toJSON()};t.lastChange?t.lastChange.next=t.lastChange=l:t.lastChange=t.change=l},!0),t.changeHandlers||(t.changeHandlers=this._handlers.change&&this._handlers.change.slice())}onSelectionChange(){var e=this.curOp=this.curOp||{};e.cursorActivityHandlers||(e.cursorActivityHandlers=this._handlers.cursorActivity&&this._handlers.cursorActivity.slice()),this.curOp.cursorActivity=!0}operation(e){this.curOp||(this.curOp={$d:0}),this.curOp.$d++;try{var t=e()}finally{this.curOp&&(this.curOp.$d--,this.curOp.$d||this.onBeforeEndOperation())}return t}onBeforeEndOperation(){var e=this.curOp,t=!1;e&&(e.change&&wS(e.changeHandlers,this,e.change),e&&e.cursorActivity&&(wS(e.cursorActivityHandlers,this,null),e.isVimOp&&(t=!0)),this.curOp=null),t&&this.scrollIntoView()}moveH(e,t){if(t=="char"){var r=this.getCursor();this.setCursor(r.line,r.ch+e)}}setOption(e,t){switch(e){case"keyMap":this.state.keyMap=t;break}}getOption(e){switch(e){case"firstLineNumber":return 1;case"tabSize":return this.cm6.state.tabSize||4;case"readonly":return this.cm6.state.readOnly;case"indentWithTabs":return this.cm6.state.facet(Ma)==" ";case"indentUnit":return this.cm6.state.facet(Ma).length||2;case"keyMap":return this.state.keyMap||"vim"}}toggleOverwrite(e){this.state.overwrite=e}getTokenTypeAt(e){var t,r=this.indexFromPos(e),i=ov(this.cm6.state,r),a=i==null?void 0:i.resolve(r),s=((t=a==null?void 0:a.type)===null||t===void 0?void 0:t.name)||"";return/comment/i.test(s)?"comment":/string/i.test(s)?"string":""}overWriteSelection(e){var t=this.cm6.state.doc,r=this.cm6.state.selection,i=r.ranges.map(a=>{if(a.empty){var s=a.to1}virtualSelectionMode(){return!!this.virtualSelection}forEachSelection(e){var t=this.cm6.state.selection;this.virtualSelection=de.create(t.ranges,t.mainIndex);for(var r=0;rps(n,e)})},indentAuto:function(n){hy(n.cm6)}};at.defineOption=function(n,e,t){};at.isWordChar=function(n){return Rh.test(n)};at.keys=DL;at.keyMap={};at.addClass=function(){};at.rmClass=function(){};at.e_preventDefault=function(n){n.preventDefault()};at.e_stop=function(n){var e,t;(e=n==null?void 0:n.stopPropagation)===null||e===void 0||e.call(n),(t=n==null?void 0:n.preventDefault)===null||t===void 0||t.call(n)};at.keyName=function(n){var e=n.key;if(!Cy[e]){e=="Escape"&&(e="Esc"),e==" "&&(e="Space"),e.length>1&&(e=e.replace(/Numpad|Arrow/,"")),e.length==1&&(e=e.toUpperCase());var t="";return n.ctrlKey&&(t+="Ctrl-"),n.altKey&&(t+="Alt-"),(t||e.length>1)&&n.shiftKey&&(t+="Shift-"),t+=e,t}};at.vimKey=function(e){var t=e.key;if(!Cy[t]){t.length>1&&t[0]=="n"&&(t=t.replace("Numpad","")),t=NL[t]||t;var r="";return e.ctrlKey&&(r+="C-"),e.altKey&&(r+="A-"),e.metaKey&&(r+="M-"),at.isMac&&e.altKey&&!e.metaKey&&!e.ctrlKey&&(r=r.slice(2)),(r||t.length>1)&&e.shiftKey&&(r+="S-"),r+=t,r.length>1&&(r="<"+r+">"),r}};at.lookupKey=function(e,t,r){var i=at.keys[e];i&&r(i)};at.on=Ey;at.off=by;at.signal=Ty;at.findMatchingTag=PL;at.findEnclosingTag=BL;function vy(n,e,t){var r=document.createElement("div");return r.appendChild(e),r}function yy(n,e){n.state.currentNotificationClose&&n.state.currentNotificationClose(),n.state.currentNotificationClose=e}function wL(n,e,t){yy(n,o);var r=vy(n,e,t&&t.bottom),i=!1,a,s=t&&typeof t.duration<"u"?t.duration:5e3;function o(){i||(i=!0,clearTimeout(a),r.remove(),Ry(n,r))}return r.onclick=function(l){l.preventDefault(),o()},Ay(n,r),s&&(a=setTimeout(o,s)),o}function Ay(n,e){var t=n.state.dialog;n.state.dialog=e,e&&t!==e&&(t&&t.contains(document.activeElement)&&n.focus(),t&&t.parentElement?t.parentElement.replaceChild(e,t):t&&t.remove(),at.signal(n,"dialog"))}function Ry(n,e){n.state.dialog==e&&(n.state.dialog=null,at.signal(n,"dialog"))}function xL(n,e,t,r){r||(r={}),yy(n,void 0);var i=vy(n,e,r.bottom),a=!1;Ay(n,i);function s(l){if(typeof l=="string")o.value=l;else{if(a)return;a=!0,Ry(n,i),n.state.dialog||n.focus(),r.onClose&&r.onClose(i)}}var o=i.getElementsByTagName("input")[0];return o&&(r.value&&(o.value=r.value,r.selectValueOnOpen!==!1&&o.select()),r.onInput&&at.on(o,"input",function(l){r.onInput(l,o.value,s)}),r.onKeyUp&&at.on(o,"keyup",function(l){r.onKeyUp(l,o.value,s)}),at.on(o,"keydown",function(l){r&&r.onKeyDown&&r.onKeyDown(l,o.value,s)||(l.keyCode==13&&t(o.value),(l.keyCode==27||r.closeOnEnter!==!1&&l.keyCode==13)&&(o.blur(),at.e_stop(l),s()))}),r.closeOnBlur!==!1&&at.on(o,"blur",function(){setTimeout(function(){document.activeElement!==o&&s()})}),o.focus()),s}var LL={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function kL(n){return n&&n.bracketRegex||/[(){}[\]]/}function ML(n,e,t,r,i){for(var a=i&&i.maxScanLineLength||1e4,s=i&&i.maxScanLines||1e3,o=[],l=kL(i),u=t>0?Math.min(e.line+s,n.lastLine()+1):Math.max(n.firstLine()-1,e.line-s),d=e.line;d!=u;d+=t){var f=n.getLine(d);if(f){var m=t>0?0:f.length-1,g=t>0?f.length:-1;if(!(f.length>a))for(d==e.line&&(m=e.ch-(t<0?1:0));m!=g;m+=t){var b=f.charAt(m);if(l.test(b)){var v=LL[b];if(v&&v.charAt(1)==">"==t>0)o.push(b);else if(o.length)o.pop();else return{pos:new Cl(d,m),ch:b}}}}}return d-t==(t>0?n.lastLine():n.firstLine())?!1:null}function PL(n,e){}function BL(n,e){var t,r,i=n.cm6.state,a=n.indexFromPos(e);if(a!t.eq(this.cursors[r]))){let t=this.cursorLayer.children;if(t.length!==e.length){this.cursorLayer.textContent="";for(const r of e)this.cursorLayer.appendChild(r.draw())}else e.forEach((r,i)=>r.adjust(t[i]));this.cursors=e}}destroy(){this.cursorLayer.remove()}}const GL={".cm-vimMode .cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-fat-cursor":{position:"absolute",background:"#ff9696",border:"none",whiteSpace:"pre"},"&:not(.cm-focused) .cm-fat-cursor":{background:"none",outline:"solid 1px #ff9696",color:"transparent !important"}},QL=Jn.highest(Ae.theme(GL));function $L(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==Bt.LTR?e.left:e.right-n.scrollDOM.clientWidth)-n.scrollDOM.scrollLeft,top:e.top-n.scrollDOM.scrollTop}}function qL(n,e,t,r){let i=t.head,a=!1,s=1,o=n.state.vim;if(o&&(!o.insertMode||n.state.overwrite)){if(a=!0,o.visualBlock&&!r)return null;t.anchor1&&(i--,u=e.state.sliceDoc(i,i+1));let d=e.coordsAtPos(i,1);if(!d)return null;let f=$L(e),m=e.domAtPos(i),g=m?m.node:e.contentDOM;for(;m&&m.node instanceof HTMLElement;)g=m.node,m={node:m.node.childNodes[m.offset],offset:0};if(!(g instanceof HTMLElement)){if(!g.parentNode)return null;g=g.parentNode}let b=getComputedStyle(g),v=d.left;if(!u||u==` `||u=="\r")u=" ";else if(u==" "){u=" ";var l=e.coordsAtPos(i+1,-1);l&&(v=l.left-(l.left-d.left)/parseInt(b.tabSize))}else/[\uD800-\uDBFF]/.test(u)&&i{e.state.vim&&(e.state.vim.status=""),this.blockCursor.scheduleRedraw(),this.updateStatus()}),this.cm.on("vim-mode-change",t=>{e.state.vim.mode=t.mode,t.subMode&&(e.state.vim.mode+=" block"),e.state.vim.status="",this.blockCursor.scheduleRedraw(),this.updateClass(),this.updateStatus()}),this.cm.on("dialog",()=>{this.cm.state.statusbar?this.updateStatus():n.dispatch({effects:Iy.of(!!this.cm.state.dialog)})}),this.dom=document.createElement("span"),this.dom.style.cssText="position: absolute; right: 10px; top: 1px",this.statusButton=document.createElement("span"),this.statusButton.onclick=t=>{as.handleKey(this.cm,"","user"),this.cm.focus()},this.statusButton.style.cssText="cursor: pointer"}update(n){var e;if((n.viewportChanged||n.docChanged)&&this.query&&this.highlight(this.query),n.docChanged&&this.cm.onChange(n),n.selectionSet&&this.cm.onSelectionChange(),n.viewportChanged,this.cm.curOp&&!this.cm.curOp.isVimOp&&this.cm.onBeforeEndOperation(),n.transactions){for(let t of n.transactions)for(let r of t.effects)if(r.is(Ah))if(!((e=r.value)===null||e===void 0?void 0:e.forVim))this.highlight(null);else{let a=r.value.create();this.highlight(a)}}this.blockCursor.update(n)}updateClass(){const n=this.cm.state;!n.vim||n.vim.insertMode&&!n.overwrite?this.view.scrollDOM.classList.remove("cm-vimMode"):this.view.scrollDOM.classList.add("cm-vimMode")}updateStatus(){let n=this.cm.state.statusbar,e=this.cm.state.vim;if(!n||!e)return;let t=this.cm.state.dialog;if(t)t.parentElement!=n&&(n.textContent="",n.appendChild(t));else{n.textContent="";var r=(e.mode||"normal").toUpperCase();e.insertModeReturn&&(r+="(C-O)"),this.statusButton.textContent=`--${r}--`,n.appendChild(this.statusButton)}this.dom.textContent=e.status,n.appendChild(this.dom)}destroy(){as.leaveVimMode(this.cm),this.updateClass(),this.blockCursor.destroy(),delete this.view.cm}highlight(n){if(this.query=n,!n)return this.decorations=qe.none;let{view:e}=this,t=new zi;for(let r=0,i=e.visibleRanges,a=i.length;ri[r+1].from-2*HL;)o=i[++r].to;n.highlight(e.state,s,o,(l,u)=>{t.add(l,u,ZL)})}return this.decorations=t.finish()}handleKey(n,e){const t=at.vimKey(n),r=this.cm;if(!t)return;let i=r.state.vim;if(!i)return;if(t==""&&!i.insertMode&&!i.visualMode&&this.query){const o=i.searchState_;o&&(r.removeOverlay(o.getOverlay()),o.setOverlay(null))}if(t===""&&!at.isMac&&r.somethingSelected())return this.waitForCopy=!0,!0;i.status=(i.status||"")+t;let s=as.multiSelectHandleKey(r,t,"user");return i=r.state.vim,!s&&i.insertMode&&r.state.overwrite&&(n.key&&n.key.length==1&&!/\n/.test(n.key)?(s=!0,r.overWriteSelection(n.key)):n.key=="Backspace"&&(s=!0,at.commands.cursorCharLeft(r))),s&&(at.signal(this.cm,"vim-keypress",t),n.preventDefault(),n.stopPropagation(),this.blockCursor.scheduleRedraw()),this.updateStatus(),!!s}},{eventHandlers:{copy:function(n,e){this.waitForCopy&&(this.waitForCopy=!1,Promise.resolve().then(()=>{var t=this.cm,r=t.state.vim;r&&(r.insertMode?t.setSelection(t.getCursor(),t.getCursor()):t.operation(()=>{t.curOp&&(t.curOp.isVimOp=!0),as.handleKey(t,"","user")}))}))},compositionstart:function(n,e){this.useNextTextInput=!0},keypress:function(n,e){this.lastKeydown=="Dead"&&this.handleKey(n,e)},keydown:function(n,e){this.lastKeydown=n.key,this.lastKeydown=="Unidentified"||this.lastKeydown=="Process"||this.lastKeydown=="Dead"?this.useNextTextInput=!0:(this.useNextTextInput=!1,this.handleKey(n,e))}},provide:()=>[Ae.inputHandler.of((n,e,t,r)=>{var i,a,s=ek(n);if(!s)return!1;var o=(i=s.state)===null||i===void 0?void 0:i.vim,l=s.state.vimPlugin;return o&&!o.insertMode&&!(!((a=s.curOp)===null||a===void 0)&&a.isVimOp)?(r==="\0\0"||(r.length==1&&l.useNextTextInput&&l.handleKey({key:r,preventDefault:()=>{},stopPropagation:()=>{}}),XL(n)),!0):!1})],decorations:n=>n.decorations});function XL(n){var e=n.scrollDOM.parentElement;if(e){if(VL){n.contentDOM.textContent="\0\0",n.contentDOM.dispatchEvent(new CustomEvent("compositionend"));return}var t=n.scrollDOM.nextSibling,r=window.getSelection(),i=r&&{anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset};n.scrollDOM.remove(),e.insertBefore(n.scrollDOM,t);try{i&&r&&(r.setPosition(i.anchorNode,i.anchorOffset),i.focusNode&&r.extend(i.focusNode,i.focusOffset))}catch(a){console.error(a)}n.focus(),n.contentDOM.dispatchEvent(new CustomEvent("compositionend"))}}const ZL=qe.mark({class:"cm-searchMatch"}),Iy=it.define(),KL=hr.define({create:()=>!1,update(n,e){for(let t of e.effects)t.is(Iy)&&(n=t.value);return n},provide:n=>ys.from(n,e=>e?jL:null)});function jL(n){let e=document.createElement("div");e.className="cm-vim-panel";let t=n.cm;return t.state.dialog&&e.appendChild(t.state.dialog),{top:!1,dom:e}}function JL(n){let e=document.createElement("div");e.className="cm-vim-panel";let t=n.cm;return t.state.statusbar=e,t.state.vimPlugin.updateStatus(),{dom:e}}function Fc(n={}){return[zL,WL,QL,n.status?ys.of(JL):KL]}function ek(n){return n.cm||null}const kS=` // Global buffer: a central buffer to command them all. @@ -69,7 +69,7 @@ Length provided: ${this.length}. Number of dictionaries provided: ${this.diction // Init buffer: a buffer to initialize the universe. // This universe is runned once when the universe is // loaded! -`,tk="// Notes buffer: a buffer to write your notes.",rk={global:{candidate:kS,committed:kS,evaluations:0},locals:{1:{candidate:ar,committed:ar,evaluations:0},2:{candidate:ar,committed:ar,evaluations:0},3:{candidate:ar,committed:ar,evaluations:0},4:{candidate:ar,committed:ar,evaluations:0},5:{candidate:ar,committed:ar,evaluations:0},6:{candidate:ar,committed:ar,evaluations:0},7:{candidate:ar,committed:ar,evaluations:0},8:{candidate:ar,committed:ar,evaluations:0},9:{candidate:ar,committed:ar,evaluations:0}},init:{candidate:MS,committed:MS,evaluations:0},notes:{candidate:tk}},PS={global:{candidate:"",committed:"",evaluations:0},locals:{1:{candidate:"",committed:"",evaluations:0},2:{candidate:"",committed:"",evaluations:0},3:{candidate:"",committed:"",evaluations:0},4:{candidate:"",committed:"",evaluations:0},5:{candidate:"",committed:"",evaluations:0},6:{candidate:"",committed:"",evaluations:0},7:{candidate:"",committed:"",evaluations:0},8:{candidate:"",committed:"",evaluations:0},9:{candidate:"",committed:"",evaluations:0}},init:{candidate:"",committed:"",evaluations:0},notes:{candidate:""}},Ih={Default:{global:{candidate:"",committed:"",evaluations:0},locals:{1:{candidate:"",committed:"",evaluations:0},2:{candidate:"",committed:"",evaluations:0},3:{candidate:"",committed:"",evaluations:0},4:{candidate:"",committed:"",evaluations:0},5:{candidate:"",committed:"",evaluations:0},6:{candidate:"",committed:"",evaluations:0},7:{candidate:"",committed:"",evaluations:0},8:{candidate:"",committed:"",evaluations:0},9:{candidate:"",committed:"",evaluations:0}},init:{candidate:"",committed:"",evaluations:0},notes:{candidate:"// NOTES"}},Help:rk};class nk{constructor(){I(this,"vimMode",!1);I(this,"theme","materialDark");I(this,"font","SpaceMono");I(this,"font_size",22);I(this,"universes");I(this,"selected_universe","Default");I(this,"line_numbers",!0);const e=JSON.parse(localStorage.getItem("topos")||"{}");e&&Object.keys(e).length!==0?(this.vimMode=e.vimMode,this.theme=e.theme,this.font=e.font,this.font_size=e.font_size,this.universes=e.universes,this.selected_universe=e.selected_universe,this.line_numbers=e.line_numbers):this.universes=Ih}get_universe(){this.universes.universe_name}get data(){return{vimMode:this.vimMode,theme:this.theme,font:this.font,font_size:this.font_size,universes:this.universes,selected_universe:this.selected_universe,line_numbers:this.line_numbers}}saveApplicationToLocalStorage(e,t){this.universes=e,this.vimMode=t.vimMode,this.font=t.font,this.font_size=t.font_size,this.selected_universe=t.selected_universe,this.line_numbers=t.line_numbers,localStorage.setItem("topos",JSON.stringify(this.data))}}class ik{constructor(e,t,r){this.from=e,this.to=t,this.diagnostic=r}}class Mi{constructor(e,t,r){this.diagnostics=e,this.panel=t,this.selected=r}static init(e,t,r){let i=e,a=r.facet(wy).markerFilter;a&&(i=a(i));let s=qe.set(i.map(o=>o.from==o.to||o.from==o.to-1&&r.doc.lineAt(o.from).to==o.from?qe.widget({widget:new fk(o),diagnostic:o}).range(o.from):qe.mark({attributes:{class:"cm-lintRange cm-lintRange-"+o.severity+(o.markClass?" "+o.markClass:"")},diagnostic:o}).range(o.from,o.to)),!0);return new Mi(s,t,Fa(s))}}function Fa(n,e=null,t=0){let r=null;return n.between(t,1e9,(i,a,{spec:s})=>{if(!(e&&s.diagnostic!=e))return r=new ik(i,a,s.diagnostic),!1}),r}function ak(n,e){let t=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(r=>r.is(Ny))||n.changes.touchesRange(t.from,t.to))}function sk(n,e){return n.field(Jr,!1)?e:e.concat(it.appendConfig.of(_k))}const Ny=it.define(),Nm=it.define(),Dy=it.define(),Jr=hr.define({create(){return new Mi(qe.none,null,null)},update(n,e){if(e.docChanged){let t=n.diagnostics.map(e.changes),r=null;if(n.selected){let i=e.changes.mapPos(n.selected.from,1);r=Fa(t,n.selected.diagnostic,i)||Fa(t,null,i)}n=new Mi(t,n.panel,r)}for(let t of e.effects)t.is(Ny)?n=Mi.init(t.value,n.panel,e.state):t.is(Nm)?n=new Mi(n.diagnostics,t.value?Wl.open:null,n.selected):t.is(Dy)&&(n=new Mi(n.diagnostics,n.panel,t.value));return n},provide:n=>[ys.from(n,e=>e.panel),Ae.decorations.from(n,e=>e.diagnostics)]}),ok=qe.mark({class:"cm-lintRange cm-lintRange-active"});function lk(n,e,t){let{diagnostics:r}=n.state.field(Jr),i=[],a=2e8,s=0;r.between(e-(t<0?1:0),e+(t>0?1:0),(l,u,{spec:d})=>{e>=l&&e<=u&&(l==u||(e>l||t>0)&&(eLy(n,t,!1)))}const uk=n=>{let e=n.state.field(Jr,!1);(!e||!e.panel)&&n.dispatch({effects:sk(n.state,[Nm.of(!0)])});let t=JI(n,Wl.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},BS=n=>{let e=n.state.field(Jr,!1);return!e||!e.panel?!1:(n.dispatch({effects:Nm.of(!1)}),!0)},dk=n=>{let e=n.state.field(Jr,!1);if(!e)return!1;let t=n.state.selection.main,r=e.diagnostics.iter(t.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==t.from&&r.to==t.to)?!1:(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},pk=[{key:"Mod-Shift-m",run:uk,preventDefault:!0},{key:"F8",run:dk}],wy=De.define({combine(n){return Object.assign({sources:n.map(e=>e.source)},ti(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,t)=>e?t?r=>e(r)||t(r):e:t}))}});function xy(n){let e=[];if(n)e:for(let{name:t}of n){for(let r=0;ra.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function Ly(n,e,t){var r;let i=t?xy(e.actions):[];return Pn("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Pn("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(r=e.actions)===null||r===void 0?void 0:r.map((a,s)=>{let o=!1,l=m=>{if(m.preventDefault(),o)return;o=!0;let g=Fa(n.state.field(Jr).diagnostics,e);g&&a.apply(n,g.from,g.to)},{name:u}=a,d=i[s]?u.indexOf(i[s]):-1,f=d<0?u:[u.slice(0,d),Pn("u",u.slice(d,d+1)),u.slice(d+1)];return Pn("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${u}${d<0?"":` (access key "${i[s]})"`}.`},f)}),e.source&&Pn("div",{class:"cm-diagnosticSource"},e.source))}class fk extends ri{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Pn("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class US{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Ly(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Wl{constructor(e){this.view=e,this.items=[];let t=i=>{if(i.keyCode==27)BS(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:a}=this.items[this.selectedIndex],s=xy(a.actions);for(let o=0;o{for(let a=0;aBS(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Jr).selected;if(!e)return-1;for(let t=0;t{let u=-1,d;for(let f=r;fr&&(this.items.splice(r,u-r),i=!0)),t&&d.diagnostic==t.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),a=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),r++});r({sel:a.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:o})=>{s.topo.bottom&&(this.list.scrollTop+=s.bottom-o.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)t();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Jr),r=Fa(t.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:Dy.of(r)})}static open(e){return new Wl(e)}}function hk(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function Ro(n){return hk(``,'width="6" height="3"')}const mk=Ae.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Ro("#d11")},".cm-lintRange-warning":{backgroundImage:Ro("orange")},".cm-lintRange-info":{backgroundImage:Ro("#999")},".cm-lintRange-hint":{backgroundImage:Ro("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),_k=[Jr,Ae.decorations.compute([Jr],n=>{let{selected:e,panel:t}=n.field(Jr);return!e||!t||e.from==e.to?qe.none:qe.set([ok.range(e.from,e.to)])}),KI(lk,{hideOn:ak}),mk],gk=(()=>[lN(),NI(),Sx(),SI(),CI(),ut.allowMultipleSelections.of(!0),g2(),Sv(L2,{fallback:!0}),Y2(),AD(),BD(),GI(),qI(),MI(),gL(),Xi.of([...DD,...fL,...Rx,...pk])])(),Tt=n=>`${n}`,Sk=()=>"",Ok=` +`,tk="// Notes buffer: a buffer to write your notes.",rk={global:{candidate:kS,committed:kS,evaluations:0},locals:{1:{candidate:ar,committed:ar,evaluations:0},2:{candidate:ar,committed:ar,evaluations:0},3:{candidate:ar,committed:ar,evaluations:0},4:{candidate:ar,committed:ar,evaluations:0},5:{candidate:ar,committed:ar,evaluations:0},6:{candidate:ar,committed:ar,evaluations:0},7:{candidate:ar,committed:ar,evaluations:0},8:{candidate:ar,committed:ar,evaluations:0},9:{candidate:ar,committed:ar,evaluations:0}},init:{candidate:MS,committed:MS,evaluations:0},notes:{candidate:tk}},PS={global:{candidate:"",committed:"",evaluations:0},locals:{1:{candidate:"",committed:"",evaluations:0},2:{candidate:"",committed:"",evaluations:0},3:{candidate:"",committed:"",evaluations:0},4:{candidate:"",committed:"",evaluations:0},5:{candidate:"",committed:"",evaluations:0},6:{candidate:"",committed:"",evaluations:0},7:{candidate:"",committed:"",evaluations:0},8:{candidate:"",committed:"",evaluations:0},9:{candidate:"",committed:"",evaluations:0}},init:{candidate:"",committed:"",evaluations:0},notes:{candidate:""}},Ih={Default:{global:{candidate:"",committed:"",evaluations:0},locals:{1:{candidate:"",committed:"",evaluations:0},2:{candidate:"",committed:"",evaluations:0},3:{candidate:"",committed:"",evaluations:0},4:{candidate:"",committed:"",evaluations:0},5:{candidate:"",committed:"",evaluations:0},6:{candidate:"",committed:"",evaluations:0},7:{candidate:"",committed:"",evaluations:0},8:{candidate:"",committed:"",evaluations:0},9:{candidate:"",committed:"",evaluations:0}},init:{candidate:"",committed:"",evaluations:0},notes:{candidate:"// NOTES"}},Help:rk};class nk{constructor(){R(this,"vimMode",!1);R(this,"theme","materialDark");R(this,"font","SpaceMono");R(this,"font_size",22);R(this,"universes");R(this,"selected_universe","Default");R(this,"line_numbers",!0);const e=JSON.parse(localStorage.getItem("topos")||"{}");e&&Object.keys(e).length!==0?(this.vimMode=e.vimMode,this.theme=e.theme,this.font=e.font,this.font_size=e.font_size,this.universes=e.universes,this.selected_universe=e.selected_universe,this.line_numbers=e.line_numbers):this.universes=Ih}get_universe(){this.universes.universe_name}get data(){return{vimMode:this.vimMode,theme:this.theme,font:this.font,font_size:this.font_size,universes:this.universes,selected_universe:this.selected_universe,line_numbers:this.line_numbers}}saveApplicationToLocalStorage(e,t){this.universes=e,this.vimMode=t.vimMode,this.font=t.font,this.font_size=t.font_size,this.selected_universe=t.selected_universe,this.line_numbers=t.line_numbers,localStorage.setItem("topos",JSON.stringify(this.data))}}class ik{constructor(e,t,r){this.from=e,this.to=t,this.diagnostic=r}}class Mi{constructor(e,t,r){this.diagnostics=e,this.panel=t,this.selected=r}static init(e,t,r){let i=e,a=r.facet(wy).markerFilter;a&&(i=a(i));let s=qe.set(i.map(o=>o.from==o.to||o.from==o.to-1&&r.doc.lineAt(o.from).to==o.from?qe.widget({widget:new fk(o),diagnostic:o}).range(o.from):qe.mark({attributes:{class:"cm-lintRange cm-lintRange-"+o.severity+(o.markClass?" "+o.markClass:"")},diagnostic:o}).range(o.from,o.to)),!0);return new Mi(s,t,Fa(s))}}function Fa(n,e=null,t=0){let r=null;return n.between(t,1e9,(i,a,{spec:s})=>{if(!(e&&s.diagnostic!=e))return r=new ik(i,a,s.diagnostic),!1}),r}function ak(n,e){let t=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(r=>r.is(Ny))||n.changes.touchesRange(t.from,t.to))}function sk(n,e){return n.field(Jr,!1)?e:e.concat(it.appendConfig.of(_k))}const Ny=it.define(),Nm=it.define(),Dy=it.define(),Jr=hr.define({create(){return new Mi(qe.none,null,null)},update(n,e){if(e.docChanged){let t=n.diagnostics.map(e.changes),r=null;if(n.selected){let i=e.changes.mapPos(n.selected.from,1);r=Fa(t,n.selected.diagnostic,i)||Fa(t,null,i)}n=new Mi(t,n.panel,r)}for(let t of e.effects)t.is(Ny)?n=Mi.init(t.value,n.panel,e.state):t.is(Nm)?n=new Mi(n.diagnostics,t.value?Wl.open:null,n.selected):t.is(Dy)&&(n=new Mi(n.diagnostics,n.panel,t.value));return n},provide:n=>[ys.from(n,e=>e.panel),Ae.decorations.from(n,e=>e.diagnostics)]}),ok=qe.mark({class:"cm-lintRange cm-lintRange-active"});function lk(n,e,t){let{diagnostics:r}=n.state.field(Jr),i=[],a=2e8,s=0;r.between(e-(t<0?1:0),e+(t>0?1:0),(l,u,{spec:d})=>{e>=l&&e<=u&&(l==u||(e>l||t>0)&&(eLy(n,t,!1)))}const uk=n=>{let e=n.state.field(Jr,!1);(!e||!e.panel)&&n.dispatch({effects:sk(n.state,[Nm.of(!0)])});let t=JI(n,Wl.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},BS=n=>{let e=n.state.field(Jr,!1);return!e||!e.panel?!1:(n.dispatch({effects:Nm.of(!1)}),!0)},dk=n=>{let e=n.state.field(Jr,!1);if(!e)return!1;let t=n.state.selection.main,r=e.diagnostics.iter(t.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==t.from&&r.to==t.to)?!1:(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},pk=[{key:"Mod-Shift-m",run:uk,preventDefault:!0},{key:"F8",run:dk}],wy=De.define({combine(n){return Object.assign({sources:n.map(e=>e.source)},ti(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,t)=>e?t?r=>e(r)||t(r):e:t}))}});function xy(n){let e=[];if(n)e:for(let{name:t}of n){for(let r=0;ra.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function Ly(n,e,t){var r;let i=t?xy(e.actions):[];return Pn("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Pn("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(r=e.actions)===null||r===void 0?void 0:r.map((a,s)=>{let o=!1,l=m=>{if(m.preventDefault(),o)return;o=!0;let g=Fa(n.state.field(Jr).diagnostics,e);g&&a.apply(n,g.from,g.to)},{name:u}=a,d=i[s]?u.indexOf(i[s]):-1,f=d<0?u:[u.slice(0,d),Pn("u",u.slice(d,d+1)),u.slice(d+1)];return Pn("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${u}${d<0?"":` (access key "${i[s]})"`}.`},f)}),e.source&&Pn("div",{class:"cm-diagnosticSource"},e.source))}class fk extends ri{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Pn("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class US{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Ly(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Wl{constructor(e){this.view=e,this.items=[];let t=i=>{if(i.keyCode==27)BS(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:a}=this.items[this.selectedIndex],s=xy(a.actions);for(let o=0;o{for(let a=0;aBS(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Jr).selected;if(!e)return-1;for(let t=0;t{let u=-1,d;for(let f=r;fr&&(this.items.splice(r,u-r),i=!0)),t&&d.diagnostic==t.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),a=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),r++});r({sel:a.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:o})=>{s.topo.bottom&&(this.list.scrollTop+=s.bottom-o.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)t();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Jr),r=Fa(t.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:Dy.of(r)})}static open(e){return new Wl(e)}}function hk(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function Ro(n){return hk(``,'width="6" height="3"')}const mk=Ae.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Ro("#d11")},".cm-lintRange-warning":{backgroundImage:Ro("orange")},".cm-lintRange-info":{backgroundImage:Ro("#999")},".cm-lintRange-hint":{backgroundImage:Ro("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),_k=[Jr,Ae.decorations.compute([Jr],n=>{let{selected:e,panel:t}=n.field(Jr);return!e||!t||e.from==e.to?qe.none:qe.set([ok.range(e.from,e.to)])}),KI(lk,{hideOn:ak}),mk],gk=(()=>[lN(),NI(),Sx(),SI(),CI(),ut.allowMultipleSelections.of(!0),g2(),Sv(L2,{fallback:!0}),Y2(),AD(),BD(),GI(),qI(),MI(),gL(),Xi.of([...DD,...fL,...Rx,...pk])])(),Tt=n=>`${n}`,Sk=()=>"",Ok=` # Welcome Welcome to the Topos documentation. These pages are made to help you understand the software and the ideas behind Topos. You can jump here anytime by pressing ${Tt("Ctrl + D")}. Press again to make the documentation disappear. @@ -619,19 +619,19 @@ Topos is made to be controlled entirely with a keyboard. It is recommanded to st ## Special - Switch the editor to Vim Mode: ${Tt("Ctrl + V")}. -`,wk={introduction:Ok,interface:Ek,code:Rk,time:bk,sound:Ck,samples:vk,synths:yk,midi:Tk,functions:Ik,reference:Nk,shortcuts:Dk,about:Ak},ky=n=>new Promise((e,t)=>setTimeout(()=>t(new Error("Operation took too long")),n)),My=n=>n.replace(/->/g,"&&").replace(/::/g,"&&"),Py=(n,e)=>new Promise((t,r)=>{try{Function(`"use strict";try{${My(e)}} catch (e) {console.log(e); _reportError(e);};`).call(n.api),t(!0)}catch(i){n.error_line.innerHTML=i,console.log(i),t(!1)}}),_a=new Map,xk=20,Lk=(n,e)=>{_a.size>=xk&&_a.delete(_a.keys().next().value),_a.set(n,e)},vl=async(n,e,t=5e3)=>{try{e.evaluations++;const r=e.candidate;if(_a.has(r))_a.get(r).call(n.api);else{const i=`let i = ${e.evaluations};`+r;if(await Promise.race([Py(n,i),ky(t)])){e.committed=e.candidate;const s=new Function(`"use strict";try{${My(i)}} catch (e) {console.log(e)};`);Lk(r,s)}else await kk(n,e,t)}}catch(r){n.error_line.innerHTML=r,console.log(r)}},kk=async(n,e,t=1e3)=>{try{await Promise.race([Py(n,e.committed),ky(t)]),e.evaluations&&e.evaluations++}catch(r){n.error_line.innerHTML=r,console.log(r)}};class Mk extends AudioWorkletNode{constructor(t,r,i){super(t,"transport",r);I(this,"handleMessage",t=>{if(t.data&&t.data.type==="bang"){this.startTime===null&&(this.startTime=t.data.currentTime),this.elapsedTime=t.data.currentTime-this.startTime,this.prevCurrentTime=t.data.currentTime;let{futureTimeStamp:r,timeToNextPulse:i,nextPulsePosition:a}=this.convertTimeToNextBarsBeats(this.elapsedTime);this.nextPulsePosition!==a&&(this.nextPulsePosition=a,setTimeout(()=>{const s=this.app.audioContext.currentTime;this.app.clock.time_position=r,vl(this.app,this.app.global_buffer),this.hasBeenEvaluated=!0,this.currentPulsePosition=a;const o=this.app.audioContext.currentTime;this.lastLatencies[this.indexOfLastLatencies]=o-s,this.indexOfLastLatencies=(this.indexOfLastLatencies+1)%this.lastLatencies.length;const l=this.lastLatencies.reduce((u,d)=>u+d)/this.lastLatencies.length;this.executionLatency=l/1e3},(i+this.executionLatency)*1e3))}});this.app=i,this.port.addEventListener("message",this.handleMessage),this.port.start(),this.$clock=document.getElementById("clockviewer"),this.hasBeenEvaluated=!1,this.currentPulsePosition=0,this.nextPulsePosition=-1,this.executionLatency=0,this.lastLatencies=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.indexOfLastLatencies=0,this.startTime=null,this.elapsedTime=0}start(){this.port.postMessage("start")}pause(){this.port.postMessage("pause")}stop(){this.startTime=null,this.elapsedTime=null,this.app.clock.tick=0,this.port.postMessage("stop")}convertTimeToBarsBeats(t){const r=60/this.app.clock.bpm,i=t/r,a=this.app.clock.time_signature[0],s=Math.floor(i/a)+1,o=Math.floor(i%a)+1,l=Math.floor(i%1*this.app.clock.ppqn);return this.app.clock.tick++,{bar:s,beat:o,ppqn:l}}convertTimeToNextBarsBeats(t){const r=60/this.app.clock.bpm,i=t/r,a=this.app.clock.time_signature[0];this.currentPulsePosition=i*this.app.clock.ppqn;const s=Math.ceil(this.currentPulsePosition),o=this.app.clock.convertPulseToSecond(this.nextPulsePosition-this.currentPulsePosition),l=this.nextPulsePosition/this.app.clock.ppqn,u=l/a,d={bar:Math.floor(u)+1,beat:Math.floor(l)%a+1,pulse:Math.floor(this.nextPulsePosition)%this.app.clock.ppqn};return this.app.clock.tick++,{futureTimeStamp:d,timeToNextPulse:o,nextPulsePosition:s}}}const Pk="/assets/TransportProcessor-9e6f56da.js";class Bk{constructor(e,t){I(this,"ctx");I(this,"transportNode");I(this,"bpm");I(this,"time_signature");I(this,"time_position");I(this,"ppqn");I(this,"tick");this.app=e,this.time_position={bar:0,beat:0,pulse:0},this.time_signature=[4,4],this.tick=0,this.bpm=120,this.ppqn=48,this.transportNode=null,this.ctx=t,t.audioWorklet.addModule(Pk).then(r=>(this.transportNode=new Mk(t,{},this.app),this.transportNode.connect(t.destination),r)).catch(r=>{console.log("Error loading TransportProcessor.js:",r)})}get ticks_before_new_bar(){const e=(this.app.clock.beats_since_origin-1)*48+this.time_position.pulse+1;return this.beats_per_bar*this.ppqn*this.time_position.bar+1-e}get beats_per_bar(){return this.time_signature[0]}get beats_since_origin(){return(this.time_position.bar-1)*this.beats_per_bar+this.time_position.beat}get pulses_since_origin(){return this.beats_since_origin*this.ppqn+this.time_position.pulse}get pulse_duration(){return 60/this.bpm/this.ppqn}convertPulseToSecond(e){return e*this.pulse_duration}start(){var e,t;((e=this.transportNode)==null?void 0:e.state)==="running"?console.log("Already started"):(this.app.audioContext.resume(),(t=this.transportNode)==null||t.start())}pause(){var e;(e=this.transportNode)==null||e.pause()}stop(){var e;(e=this.transportNode)==null||e.stop()}}const Uk={"+":(n,e)=>n+e,"-":(n,e)=>n-e,"*":(n,e)=>n*e,"/":(n,e)=>n/e,"%":(n,e)=>n%e,"^":(n,e)=>n**e,"<<":(n,e)=>n<>":(n,e)=>n>>e,"&":(n,e)=>n&e,"|":(n,e)=>n|e},Fk={octave:0,duration:.25,key:"C4",scale:"IONIAN",measure:0,degrees:!1},Yk={m:8,k:10240/1920,l:4,"d.":3,p:5120/1920,d:2,"w.":1.5,c:2560/1920,w:1,"h..":.875,"h.":.75,y:1280/1920,h:.5,"q..":840/1920,"q.":.375,n:640/1920,q:.25,"e..":420/1920,"e.":.1875,a:320/1920,e:.125,"s..":210/1920,"s.":180/1920,f:160/1920,s:.0625,"t..":105/1920,"t.":90/1920,x:80/1920,t:60/1920,"u.":45/1920,g:40/1920,u:30/1920,j:15/1920,o:8/1920,z:0},Gk={C:0,Cs:1,D:2,Eb:3,E:4,F:5,Fs:6,G:7,Ab:8,A:9,Bb:10,B:11},Qk={"#":1,b:-1,s:1},$k=()=>{const n=[2,1,2,2,1,2,2],e=[2,2,1,2,2,2,1],t=[2,1,2,2,1,3,1],r=[2,2,1,2,1,3,1],i=[3,2,2,3,2],a=[2,3,2,3,2],s=[2,2,2,2,2,2],o=[2,1,1,3,2,3],l=[3,2,1,1,3,2],u=[2,1,2,2,2,2,1],d=[2,2,1,2,1,2,2],f=[1,2,2,2,1,3,1],m=[1,2,2,2,2,2,1],g=[1,2,1,2,1,2,1,2],b=[2,2,1,2,1,1,2,1],v=[2,1,2,2,1,1,2,1],y=[2,2,1,2,2,1,1,1];return{MAJOR:e,MINOR:n,"HARMONIC MINOR":t,"HARMONIC MAJOR":r,"MINOR PENTATONIC":i,"SUSPENDED PENTATONIC":a,"BLUES MAJOR":o,"BLUES MINOR":l,WHOLE:s,"MELODIC MINOR":u,"MELODIC MAJOR":d,MINORIC:[4,4,4],THAPTIC:[4,3,4,1],LOTHIC:[3,4,1,4],PHRATIC:[4,1,4,3],AERATHIC:[1,4,3,4],EPATHIC:[4,3,2,3],MYNIC:[3,2,3,4],ROTHIC:[2,3,4,3],EPORIC:[3,4,3,2],ZYPHIC:[4,4,3,1],EPOGIC:[4,3,1,4],LANIC:[3,1,4,4],PYRRIC:[1,4,4,3],AEOLORIC:[4,4,1,3],GONIC:[4,1,3,4],DALIC:[1,3,4,4],DYGIC:[3,4,4,1],DARIC:[4,3,3,2],LONIC:[3,3,2,4],PHRADIC:[3,2,4,3],BOLIC:[2,4,3,3],SARIC:[4,2,3,3],ZOPTIC:[2,3,3,4],AERAPHIC:[3,3,4,2],BYPTIC:[3,4,2,3],AEOLIC:[4,4,2,2],KOPTIC:[4,2,2,4],MIXOLYRIC:[2,2,4,4],LYDIC:[2,4,4,2],STATHIC:[4,2,4,2],DADIC:[2,4,2,4],PHRYNIC:[3,3,3,3],EPATHITONIC:[3,2,3,2,2],MYNITONIC:[2,3,2,2,3],ROCRITONIC:i,PENTATONIC:[2,2,3,2,3],THAPTITONIC:a,MAGITONIC:[4,3,2,2,1],DADITONIC:[3,2,2,1,4],AEOLYPHRITONIC:[2,2,1,4,3],GYCRITONIC:[2,1,4,3,2],PYRITONIC:[1,4,3,2,2],GATHITONIC:[4,2,3,2,1],IONITONIC:[2,3,2,1,4],PHRYNITONIC:[3,2,1,4,2],STATHITONIC:[2,1,4,2,3],THALITONIC:[1,4,2,3,2],ZOLITONIC:[4,2,1,4,1],EPOGITONIC:[2,1,4,1,4],LANITONIC:[1,4,1,4,2],PAPTITONIC:[4,1,4,2,1],IONACRITONIC:[1,4,2,1,4],PHRADITONIC:[4,1,4,1,2],AEOLORITONIC:[1,4,1,2,4],GONITONIC:[4,1,2,4,1],DALITONIC:[1,2,4,1,4],DYGITONIC:[2,4,1,4,1],AERACRITONIC:[4,1,2,3,2],BYPTITONIC:[1,2,3,2,4],DARITONIC:[2,3,2,4,1],LONITONIC:[3,2,4,1,2],IONYCRITONIC:[2,4,1,2,3],LOTHITONIC:[4,1,2,2,3],PHRATONIC:[1,2,2,3,4],AERATHITONIC:[2,2,3,4,1],SARITONIC:[2,3,4,1,2],ZOPTITONIC:[3,4,1,2,2],DOLITONIC:[4,4,1,2,1],PORITONIC:[4,1,2,1,4],AERYLITONIC:[1,2,1,4,4],ZAGITONIC:[2,1,4,4,1],LAGITONIC:[1,4,4,1,2],MOLITONIC:[4,3,3,1,1],STAPTITONIC:[3,3,1,1,4],MOTHITONIC:[3,1,1,4,3],AERITONIC:[1,1,4,3,3],RAGITONIC:[1,4,3,3,1],IONADITONIC:[4,3,2,1,2],BOCRITONIC:[3,2,1,2,4],GYTHITONIC:[2,1,2,4,3],PAGITONIC:[1,2,4,3,2],AEOLYTHITONIC:[2,4,3,2,1],ZACRITONIC:[4,3,1,3,1],LARITONIC:[3,1,3,1,4],THACRITONIC:[1,3,1,4,3],STYDITONIC:[3,1,4,3,1],LORITONIC:[1,4,3,1,3],AEOLYRITONIC:[4,3,1,1,3],GORITONIC:[3,1,1,3,4],AEOLODITONIC:[1,1,3,4,3],DOPTITONIC:[1,3,4,3,1],AERAPHITONIC:[3,4,3,1,1],ZATHITONIC:[4,2,4,1,1],RADITONIC:[2,4,1,1,4],STONITONIC:[4,1,1,4,2],SYPTITONIC:[1,1,4,2,4],IONYTHITONIC:[1,4,2,4,1],AEOLANITONIC:[4,2,2,3,1],DANITONIC:[2,2,3,1,4],IONARITONIC:[2,3,1,4,2],DYNITONIC:[3,1,4,2,2],ZYDITONIC:[1,4,2,2,3],AEOLACRITONIC:[4,2,1,2,3],ZYTHITONIC:[2,1,2,3,4],DYRITONIC:[1,2,3,4,2],KOPTITONIC:[2,3,4,2,1],THOCRITONIC:[3,4,2,1,2],LYCRITONIC:[4,1,3,3,1],DAPTITONIC:[1,3,3,1,4],KYGITONIC:[3,3,1,4,1],MOCRITONIC:[3,1,4,1,3],ZYNITONIC:[1,4,1,3,3],EPYGITONIC:[4,1,3,2,2],ZAPTITONIC:[1,3,2,2,4],KAGITONIC:[3,2,2,4,1],ZOGITONIC:[2,2,4,1,3],EPYRITONIC:[2,4,1,3,2],ZOTHITONIC:[4,1,3,1,3],PHROLITONIC:[1,3,1,3,4],IONAGITONIC:[3,1,3,4,1],AEOLAPRITONIC:[1,3,4,1,3],KYRITONIC:[3,4,1,3,1],IONYPTITONIC:[4,1,1,3,3],GYRITONIC:[1,1,3,3,4],ZALITONIC:[1,3,3,4,1],STOLITONIC:[3,3,4,1,1],BYLITONIC:[3,4,1,1,3],THODITONIC:[3,3,2,3,1],DOGITONIC:[3,2,3,1,3],PHRALITONIC:[2,3,1,3,3],GARITONIC:[3,1,3,3,2],SOPTITONIC:[1,3,3,2,3],KATARITONIC:[3,3,2,2,2],SYLITONIC:[3,2,2,2,3],THONITONIC:[2,2,2,3,3],PHROPITONIC:[2,2,3,3,2],STADITONIC:[2,3,3,2,2],LYDITONIC:[3,3,1,3,2],MYTHITONIC:[3,1,3,2,3],SOGITONIC:[1,3,2,3,3],GOTHITONIC:[3,2,3,3,1],ROTHITONIC:[2,3,3,1,3],ZYLITONIC:[4,4,2,1,1],ZODITONIC:[4,2,1,1,4],ZARITONIC:[2,1,1,4,4],PHRYTHITONIC:[1,1,4,4,2],ROLITONIC:[1,4,4,2,1],RANITONIC:[4,4,1,1,2],LADITONIC:[4,1,1,2,4],PODITONIC:[1,1,2,4,4],IONOTHITONIC:[1,2,4,4,1],KANITONIC:[2,4,4,1,1],RYPHITONIC:[4,3,1,2,2],GYLITONIC:[3,1,2,2,4],AEOLYCRITONIC:[1,2,2,4,3],PYNITONIC:[2,2,4,3,1],ZANITONIC:[2,4,3,1,2],PHRONITONIC:[4,2,3,1,2],BANITONIC:[2,3,1,2,4],AERONITONIC:[3,1,2,4,2],GOLITONIC:[1,2,4,2,3],DYPTITONIC:[2,4,2,3,1],AERYNITONIC:[4,2,2,1,3],PALITONIC:[2,2,1,3,4],STOTHITONIC:[2,1,3,4,2],AEROPHITONIC:[1,3,4,2,2],KATAGITONIC:[3,4,2,2,1],IONODITONIC:[4,2,1,3,2],BOGITONIC:[2,1,3,2,4],MOGITONIC:[1,3,2,4,2],DOCRITONIC:[3,2,4,2,1],EPADITONIC:[2,4,2,1,3],MIXITONIC:[3,3,3,2,1],PHROTHITONIC:[3,3,2,1,3],KATYCRITONIC:[3,2,1,3,3],IONALITONIC:[2,1,3,3,3],LOPTITONIC:[1,3,3,3,2],THYRITONIC:[3,3,3,1,2],THOPTITONIC:[3,3,1,2,3],BYCRITONIC:[3,1,2,3,3],PATHITONIC:[1,2,3,3,3],MYDITONIC:[2,3,3,3,1],BOLITONIC:[4,2,2,2,2],BOTHITONIC:[2,2,2,2,4],KATADITONIC:[2,2,2,4,2],KODITONIC:[2,2,4,2,2],THOL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.floor(Math.random()*n.length)];return yl[e]},Zi=n=>yl[n.toUpperCase()],Dm=n=>n.toUpperCase()in yl,Nh=(n="")=>{let e=0,t=0,r=0,i=0;function a(){const s=(e^e<<11)>>>0;return e=t,t=r,r=i,i^=(i>>>19^s^s>>>8)>>>0,(i>>>0)/4294967296}for(let s=0;sArray.isArray(n)?n.map(e=>Al(e)):n&&typeof n=="object"?Object.getOwnPropertyNames(n).reduce((e,t)=>(Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t)),e[t]=Al(n[t]),e),Object.create(Object.getPrototypeOf(n))):n,Vk=n=>{try{return new Function(`"use strict";return (${n})`)()}catch(e){throw new Error(`Error in eval: ${e}`)}},By=function(){function n(i,a){function s(){this.constructor=i}s.prototype=a.prototype,i.prototype=new s}function e(i,a,s,o){var l=Error.call(this,i);return Object.setPrototypeOf&&Object.setPrototypeOf(l,e.prototype),l.expected=a,l.found=s,l.location=o,l.name="SyntaxError",l}n(e,Error);function t(i,a,s){return s=s||" ",i.length>a?i:(a-=i.length,s+=s.repeat(a),i+s.slice(0,a))}e.prototype.format=function(i){var a="Error: "+this.message;if(this.location){var s=null,o;for(o=0;onew Promise((e,t)=>setTimeout(()=>t(new Error("Operation took too long")),n)),My=n=>n.replace(/->/g,"&&").replace(/::/g,"&&"),Py=(n,e)=>new Promise((t,r)=>{try{Function(`"use strict";try{${My(e)}} catch (e) {console.log(e); _reportError(e);};`).call(n.api),t(!0)}catch(i){n.error_line.innerHTML=i,console.log(i),t(!1)}}),_a=new Map,xk=20,Lk=(n,e)=>{_a.size>=xk&&_a.delete(_a.keys().next().value),_a.set(n,e)},vl=async(n,e,t=5e3)=>{try{e.evaluations++;const r=e.candidate;if(_a.has(r))_a.get(r).call(n.api);else{const i=`let i = ${e.evaluations};`+r;if(await Promise.race([Py(n,i),ky(t)])){e.committed=e.candidate;const s=new Function(`"use strict";try{${My(i)}} catch (e) {console.log(e)};`);Lk(r,s)}else await kk(n,e,t)}}catch(r){n.error_line.innerHTML=r,console.log(r)}},kk=async(n,e,t=1e3)=>{try{await Promise.race([Py(n,e.committed),ky(t)]),e.evaluations&&e.evaluations++}catch(r){n.error_line.innerHTML=r,console.log(r)}};class Mk extends AudioWorkletNode{constructor(t,r,i){super(t,"transport",r);R(this,"handleMessage",t=>{if(t.data&&t.data.type==="bang"){this.startTime===null&&(this.startTime=t.data.currentTime),this.elapsedTime=t.data.currentTime-this.startTime,this.prevCurrentTime=t.data.currentTime;let{futureTimeStamp:r,timeToNextPulse:i,nextPulsePosition:a}=this.convertTimeToNextBarsBeats(this.elapsedTime);this.nextPulsePosition!==a&&(this.nextPulsePosition=a,setTimeout(()=>{const s=this.app.audioContext.currentTime;this.app.clock.time_position=r,vl(this.app,this.app.global_buffer),this.hasBeenEvaluated=!0,this.currentPulsePosition=a;const o=this.app.audioContext.currentTime;this.lastLatencies[this.indexOfLastLatencies]=o-s,this.indexOfLastLatencies=(this.indexOfLastLatencies+1)%this.lastLatencies.length;const l=this.lastLatencies.reduce((u,d)=>u+d)/this.lastLatencies.length;this.executionLatency=l/1e3},(i+this.executionLatency)*1e3))}});this.app=i,this.port.addEventListener("message",this.handleMessage),this.port.start(),this.$clock=document.getElementById("clockviewer"),this.hasBeenEvaluated=!1,this.currentPulsePosition=0,this.nextPulsePosition=-1,this.executionLatency=0,this.lastLatencies=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.indexOfLastLatencies=0,this.startTime=null,this.elapsedTime=0}start(){this.port.postMessage("start")}pause(){this.port.postMessage("pause")}stop(){this.startTime=null,this.elapsedTime=null,this.app.clock.tick=0,this.port.postMessage("stop")}convertTimeToBarsBeats(t){const r=60/this.app.clock.bpm,i=t/r,a=this.app.clock.time_signature[0],s=Math.floor(i/a)+1,o=Math.floor(i%a)+1,l=Math.floor(i%1*this.app.clock.ppqn);return this.app.clock.tick++,{bar:s,beat:o,ppqn:l}}convertTimeToNextBarsBeats(t){const r=60/this.app.clock.bpm,i=t/r,a=this.app.clock.time_signature[0];this.currentPulsePosition=i*this.app.clock.ppqn;const s=Math.ceil(this.currentPulsePosition),o=this.app.clock.convertPulseToSecond(this.nextPulsePosition-this.currentPulsePosition),l=this.nextPulsePosition/this.app.clock.ppqn,u=l/a,d={bar:Math.floor(u)+1,beat:Math.floor(l)%a+1,pulse:Math.floor(this.nextPulsePosition)%this.app.clock.ppqn};return this.app.clock.tick++,{futureTimeStamp:d,timeToNextPulse:o,nextPulsePosition:s}}}const Pk="/assets/TransportProcessor-9e6f56da.js";class Bk{constructor(e,t){R(this,"ctx");R(this,"transportNode");R(this,"bpm");R(this,"time_signature");R(this,"time_position");R(this,"ppqn");R(this,"tick");this.app=e,this.time_position={bar:0,beat:0,pulse:0},this.time_signature=[4,4],this.tick=0,this.bpm=120,this.ppqn=48,this.transportNode=null,this.ctx=t,t.audioWorklet.addModule(Pk).then(r=>(this.transportNode=new Mk(t,{},this.app),this.transportNode.connect(t.destination),r)).catch(r=>{console.log("Error loading TransportProcessor.js:",r)})}get ticks_before_new_bar(){const e=(this.app.clock.beats_since_origin-1)*48+this.time_position.pulse+1;return this.beats_per_bar*this.ppqn*this.time_position.bar+1-e}get beats_per_bar(){return this.time_signature[0]}get beats_since_origin(){return(this.time_position.bar-1)*this.beats_per_bar+this.time_position.beat}get pulses_since_origin(){return this.beats_since_origin*this.ppqn+this.time_position.pulse}get pulse_duration(){return 60/this.bpm/this.ppqn}convertPulseToSecond(e){return e*this.pulse_duration}start(){var e,t;((e=this.transportNode)==null?void 0:e.state)==="running"?console.log("Already started"):(this.app.audioContext.resume(),(t=this.transportNode)==null||t.start())}pause(){var e;(e=this.transportNode)==null||e.pause()}stop(){var e;(e=this.transportNode)==null||e.stop()}}const Uk={"+":(n,e)=>n+e,"-":(n,e)=>n-e,"*":(n,e)=>n*e,"/":(n,e)=>n/e,"%":(n,e)=>n%e,"^":(n,e)=>n**e,"<<":(n,e)=>n<>":(n,e)=>n>>e,"&":(n,e)=>n&e,"|":(n,e)=>n|e},Fk={octave:0,duration:.25,key:"C4",scale:"IONIAN",measure:0,degrees:!1},Yk={m:8,k:10240/1920,l:4,"d.":3,p:5120/1920,d:2,"w.":1.5,c:2560/1920,w:1,"h..":.875,"h.":.75,y:1280/1920,h:.5,"q..":840/1920,"q.":.375,n:640/1920,q:.25,"e..":420/1920,"e.":.1875,a:320/1920,e:.125,"s..":210/1920,"s.":180/1920,f:160/1920,s:.0625,"t..":105/1920,"t.":90/1920,x:80/1920,t:60/1920,"u.":45/1920,g:40/1920,u:30/1920,j:15/1920,o:8/1920,z:0},Gk={C:0,Cs:1,D:2,Eb:3,E:4,F:5,Fs:6,G:7,Ab:8,A:9,Bb:10,B:11},Qk={"#":1,b:-1,s:1},$k=()=>{const n=[2,1,2,2,1,2,2],e=[2,2,1,2,2,2,1],t=[2,1,2,2,1,3,1],r=[2,2,1,2,1,3,1],i=[3,2,2,3,2],a=[2,3,2,3,2],s=[2,2,2,2,2,2],o=[2,1,1,3,2,3],l=[3,2,1,1,3,2],u=[2,1,2,2,2,2,1],d=[2,2,1,2,1,2,2],f=[1,2,2,2,1,3,1],m=[1,2,2,2,2,2,1],g=[1,2,1,2,1,2,1,2],b=[2,2,1,2,1,1,2,1],v=[2,1,2,2,1,1,2,1],y=[2,2,1,2,2,1,1,1];return{MAJOR:e,MINOR:n,"HARMONIC MINOR":t,"HARMONIC MAJOR":r,"MINOR PENTATONIC":i,"SUSPENDED PENTATONIC":a,"BLUES MAJOR":o,"BLUES MINOR":l,WHOLE:s,"MELODIC MINOR":u,"MELODIC MAJOR":d,MINORIC:[4,4,4],THAPTIC:[4,3,4,1],LOTHIC:[3,4,1,4],PHRATIC:[4,1,4,3],AERATHIC:[1,4,3,4],EPATHIC:[4,3,2,3],MYNIC:[3,2,3,4],ROTHIC:[2,3,4,3],EPORIC:[3,4,3,2],ZYPHIC:[4,4,3,1],EPOGIC:[4,3,1,4],LANIC:[3,1,4,4],PYRRIC:[1,4,4,3],AEOLORIC:[4,4,1,3],GONIC:[4,1,3,4],DALIC:[1,3,4,4],DYGIC:[3,4,4,1],DARIC:[4,3,3,2],LONIC:[3,3,2,4],PHRADIC:[3,2,4,3],BOLIC:[2,4,3,3],SARIC:[4,2,3,3],ZOPTIC:[2,3,3,4],AERAPHIC:[3,3,4,2],BYPTIC:[3,4,2,3],AEOLIC:[4,4,2,2],KOPTIC:[4,2,2,4],MIXOLYRIC:[2,2,4,4],LYDIC:[2,4,4,2],STATHIC:[4,2,4,2],DADIC:[2,4,2,4],PHRYNIC:[3,3,3,3],EPATHITONIC:[3,2,3,2,2],MYNITONIC:[2,3,2,2,3],ROCRITONIC:i,PENTATONIC:[2,2,3,2,3],THAPTITONIC:a,MAGITONIC:[4,3,2,2,1],DADITONIC:[3,2,2,1,4],AEOLYPHRITONIC:[2,2,1,4,3],GYCRITONIC:[2,1,4,3,2],PYRITONIC:[1,4,3,2,2],GATHITONIC:[4,2,3,2,1],IONITONIC:[2,3,2,1,4],PHRYNITONIC:[3,2,1,4,2],STATHITONIC:[2,1,4,2,3],THALITONIC:[1,4,2,3,2],ZOLITONIC:[4,2,1,4,1],EPOGITONIC:[2,1,4,1,4],LANITONIC:[1,4,1,4,2],PAPTITONIC:[4,1,4,2,1],IONACRITONIC:[1,4,2,1,4],PHRADITONIC:[4,1,4,1,2],AEOLORITONIC:[1,4,1,2,4],GONITONIC:[4,1,2,4,1],DALITONIC:[1,2,4,1,4],DYGITONIC:[2,4,1,4,1],AERACRITONIC:[4,1,2,3,2],BYPTITONIC:[1,2,3,2,4],DARITONIC:[2,3,2,4,1],LONITONIC:[3,2,4,1,2],IONYCRITONIC:[2,4,1,2,3],LOTHITONIC:[4,1,2,2,3],PHRATONIC:[1,2,2,3,4],AERATHITONIC:[2,2,3,4,1],SARITONIC:[2,3,4,1,2],ZOPTITONIC:[3,4,1,2,2],DOLITONIC:[4,4,1,2,1],PORITONIC:[4,1,2,1,4],AERYLITONIC:[1,2,1,4,4],ZAGITONIC:[2,1,4,4,1],LAGITONIC:[1,4,4,1,2],MOLITONIC:[4,3,3,1,1],STAPTITONIC:[3,3,1,1,4],MOTHITONIC:[3,1,1,4,3],AERITONIC:[1,1,4,3,3],RAGITONIC:[1,4,3,3,1],IONADITONIC:[4,3,2,1,2],BOCRITONIC:[3,2,1,2,4],GYTHITONIC:[2,1,2,4,3],PAGITONIC:[1,2,4,3,2],AEOLYTHITONIC:[2,4,3,2,1],ZACRITONIC:[4,3,1,3,1],LARITONIC:[3,1,3,1,4],THACRITONIC:[1,3,1,4,3],STYDITONIC:[3,1,4,3,1],LORITONIC:[1,4,3,1,3],AEOLYRITONIC:[4,3,1,1,3],GORITONIC:[3,1,1,3,4],AEOLODITONIC:[1,1,3,4,3],DOPTITONIC:[1,3,4,3,1],AERAPHITONIC:[3,4,3,1,1],ZATHITONIC:[4,2,4,1,1],RADITONIC:[2,4,1,1,4],STONITONIC:[4,1,1,4,2],SYPTITONIC:[1,1,4,2,4],IONYTHITONIC:[1,4,2,4,1],AEOLANITONIC:[4,2,2,3,1],DANITONIC:[2,2,3,1,4],IONARITONIC:[2,3,1,4,2],DYNITONIC:[3,1,4,2,2],ZYDITONIC:[1,4,2,2,3],AEOLACRITONIC:[4,2,1,2,3],ZYTHITONIC:[2,1,2,3,4],DYRITONIC:[1,2,3,4,2],KOPTITONIC:[2,3,4,2,1],THOCRITONIC:[3,4,2,1,2],LYCRITONIC:[4,1,3,3,1],DAPTITONIC:[1,3,3,1,4],KYGITONIC:[3,3,1,4,1],MOCRITONIC:[3,1,4,1,3],ZYNITONIC:[1,4,1,3,3],EPYGITONIC:[4,1,3,2,2],ZAPTITONIC:[1,3,2,2,4],KAGITONIC:[3,2,2,4,1],ZOGITONIC:[2,2,4,1,3],EPYRITONIC:[2,4,1,3,2],ZOTHITONIC:[4,1,3,1,3],PHROLITONIC:[1,3,1,3,4],IONAGITONIC:[3,1,3,4,1],AEOLAPRITONIC:[1,3,4,1,3],KYRITONIC:[3,4,1,3,1],IONYPTITONIC:[4,1,1,3,3],GYRITONIC:[1,1,3,3,4],ZALITONIC:[1,3,3,4,1],STOLITONIC:[3,3,4,1,1],BYLITONIC:[3,4,1,1,3],THODITONIC:[3,3,2,3,1],DOGITONIC:[3,2,3,1,3],PHRALITONIC:[2,3,1,3,3],GARITONIC:[3,1,3,3,2],SOPTITONIC:[1,3,3,2,3],KATARITONIC:[3,3,2,2,2],SYLITONIC:[3,2,2,2,3],THONITONIC:[2,2,2,3,3],PHROPITONIC:[2,2,3,3,2],STADITONIC:[2,3,3,2,2],LYDITONIC:[3,3,1,3,2],MYTHITONIC:[3,1,3,2,3],SOGITONIC:[1,3,2,3,3],GOTHITONIC:[3,2,3,3,1],ROTHITONIC:[2,3,3,1,3],ZYLITONIC:[4,4,2,1,1],ZODITONIC:[4,2,1,1,4],ZARITONIC:[2,1,1,4,4],PHRYTHITONIC:[1,1,4,4,2],ROLITONIC:[1,4,4,2,1],RANITONIC:[4,4,1,1,2],LADITONIC:[4,1,1,2,4],PODITONIC:[1,1,2,4,4],IONOTHITONIC:[1,2,4,4,1],KANITONIC:[2,4,4,1,1],RYPHITONIC:[4,3,1,2,2],GYLITONIC:[3,1,2,2,4],AEOLYCRITONIC:[1,2,2,4,3],PYNITONIC:[2,2,4,3,1],ZANITONIC:[2,4,3,1,2],PHRONITONIC:[4,2,3,1,2],BANITONIC:[2,3,1,2,4],AERONITONIC:[3,1,2,4,2],GOLITONIC:[1,2,4,2,3],DYPTITONIC:[2,4,2,3,1],AERYNITONIC:[4,2,2,1,3],PALITONIC:[2,2,1,3,4],STOTHITONIC:[2,1,3,4,2],AEROPHITONIC:[1,3,4,2,2],KATAGITONIC:[3,4,2,2,1],IONODITONIC:[4,2,1,3,2],BOGITONIC:[2,1,3,2,4],MOGITONIC:[1,3,2,4,2],DOCRITONIC:[3,2,4,2,1],EPADITONIC:[2,4,2,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,1],MIXOLATIC:[1,1,1,1,1,1,1,2,1,1,1],SORATIC:[1,1,1,1,1,1,2,1,1,1,1],GODATIC:[1,1,1,1,1,2,1,1,1,1,1],EPTATIC:[1,1,1,1,2,1,1,1,1,1,1],IONATIC:[1,1,1,2,1,1,1,1,1,1,1],AEOLATIC:[1,1,2,1,1,1,1,1,1,1,1],THYDATIC:[1,2,1,1,1,1,1,1,1,1,1],CHROMATIC:[1,1,1,1,1,1,1,1,1,1,1,1]}},yl=$k(),qk=()=>{const n=Object.keys(yl),e=n[Math.floor(Math.random()*n.length)];return yl[e]},Zi=n=>yl[n.toUpperCase()],Dm=n=>n.toUpperCase()in yl,Nh=(n="")=>{let e=0,t=0,r=0,i=0;function a(){const s=(e^e<<11)>>>0;return e=t,t=r,r=i,i^=(i>>>19^s^s>>>8)>>>0,(i>>>0)/4294967296}for(let s=0;sArray.isArray(n)?n.map(e=>Al(e)):n&&typeof n=="object"?Object.getOwnPropertyNames(n).reduce((e,t)=>(Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t)),e[t]=Al(n[t]),e),Object.create(Object.getPrototypeOf(n))):n,Vk=n=>{try{return new Function(`"use strict";return (${n})`)()}catch(e){throw new Error(`Error in eval: ${e}`)}},By=function(){function n(i,a){function s(){this.constructor=i}s.prototype=a.prototype,i.prototype=new s}function e(i,a,s,o){var l=Error.call(this,i);return Object.setPrototypeOf&&Object.setPrototypeOf(l,e.prototype),l.expected=a,l.found=s,l.location=o,l.name="SyntaxError",l}n(e,Error);function t(i,a,s){return s=s||" ",i.length>a?i:(a-=i.length,s+=s.repeat(a),i+s.slice(0,a))}e.prototype.format=function(i){var a="Error: "+this.message;if(this.location){var s=null,o;for(o=0;o `+d+` `+m+` | `+u.line+" | "+g+` `+m+" | "+t("",l.column-1," ")+t("",v,"^")}else a+=` at `+d}return a},e.buildMessage=function(i,a){var s={literal:function(g){return'"'+l(g.text)+'"'},class:function(g){var b=g.parts.map(function(v){return Array.isArray(v)?u(v[0])+"-"+u(v[1]):u(v)});return"["+(g.inverted?"^":"")+b.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(g){return g.description}};function o(g){return g.charCodeAt(0).toString(16).toUpperCase()}function l(g){return g.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(b){return"\\x0"+o(b)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(b){return"\\x"+o(b)})}function u(g){return g.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(b){return"\\x0"+o(b)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(b){return"\\x"+o(b)})}function d(g){return s[g.type](g)}function f(g){var b=g.map(d),v,y;if(b.sort(),b.length>0){for(v=1,y=1;v",X="[",p="+",E="*",O="%",A="&",D="|",M="<<",w=">>",B=/^[' '\t\r\n]/,re=/^[0-9]/,ie=en(["'"," ","'"," ","\r",` -`],!1,!1),j=bt("(",!1),J=bt(",",!1),L=bt(")",!1),G=en([["0","9"]],!1,!1),Z=bt(".",!1),z=bt("-",!1),ce=bt("/",!1),ue=bt("\\",!1),Te=bt("<",!1),Pe=bt(">",!1),Ve=bt("[",!1),Re=bt("+",!1),Ie=bt("*",!1),le=bt("%",!1),Me=bt("&",!1),je=bt("|",!1),He=bt("<<",!1),rt=bt(">>",!1),ft=function(Y){return Kk(Y.filter(ee=>ee))},Ct=function(){},Vt=function(Y,ee){return Math.floor(Math.random()*(ee-Y+1)+Y)},ht=function(Y,ee){return Math.random()*(ee-Y)+Y},Nt=function(){return parseFloat(ot())},kt=function(){return parseInt(ot())},Qr=function(Y){return Fy(Y)},Fe=function(Y,ee){return Y/ee},Mr=function(Y,ee){return Math.pow(2,Y/ee)},st=function(Y,ee,se,fe){var Se=fe?se/fe:se;return Math.pow(Se,Y/ee)},$e=function(Y,ee){return parseFloat(Y.toString()+"."+ee.toString())},Pr=function(Y){return Y.filter(ee=>ee)},nr=function(Y){return Zk(Y)},mr=function(){return Vk(ot())},V=0,he=0,ve=[{line:1,column:1}],Ce=0,Ke=[],Ee={},Gt;if("startRule"in a){if(!(a.startRule in l))throw new Error(`Can't start parsing from rule "`+a.startRule+'".');u=l[a.startRule]}function ot(){return i.substring(he,V)}function bt(Y,ee){return{type:"literal",text:Y,ignoreCase:ee}}function en(Y,ee,se){return{type:"class",parts:Y,inverted:ee,ignoreCase:se}}function lt(){return{type:"end"}}function Wt(Y){var ee=ve[Y],se;if(ee)return ee;for(se=Y-1;!ve[se];)se--;for(ee=ve[se],ee={line:ee.line,column:ee.column};seCe&&(Ce=V,Ke=[]),Ke.push(Y))}function H(Y,ee,se){return new e(e.buildMessage(Y,ee),Y,ee,se)}function Ot(){var Y,ee,se,fe=V*17+0,Se=Ee[fe];if(Se)return V=Se.nextPos,Se.result;if(Y=V,ee=[],se=Tr(),se===s&&(se=Qt(),se===s&&(se=rn(),se===s&&(se=$t(),se===s&&(se=nt())))),se!==s)for(;se!==s;)ee.push(se),se=Tr(),se===s&&(se=Qt(),se===s&&(se=rn(),se===s&&(se=$t(),se===s&&(se=nt()))));else ee=s;return ee!==s&&(he=Y,ee=ft(ee)),Y=ee,Ee[fe]={nextPos:V,result:Y},Y}function nt(){var Y,ee,se=V*17+1,fe=Ee[se];return fe?(V=fe.nextPos,fe.result):(Y=V,B.test(i.charAt(V))?(ee=i.charAt(V),V++):(ee=s,we(ie)),ee!==s&&(he=Y,ee=Ct()),Y=ee,Ee[se]={nextPos:V,result:Y},Y)}function Qt(){var Y,ee=V*17+2,se=Ee[ee];return se?(V=se.nextPos,se.result):(Y=Ge(),Y===s&&(Y=Dt(),Y===s&&(Y=cr(),Y===s&&(Y=ze()))),Ee[ee]={nextPos:V,result:Y},Y)}function cr(){var Y,ee,se,fe,Se,xe,ye=V*17+3,dt=Ee[ye];return dt?(V=dt.nextPos,dt.result):(Y=V,i.charCodeAt(V)===40?(ee=d,V++):(ee=s,we(j)),ee!==s?(se=Dt(),se!==s?(i.charCodeAt(V)===44?(fe=f,V++):(fe=s,we(J)),fe!==s?(Se=Dt(),Se!==s?(i.charCodeAt(V)===41?(xe=m,V++):(xe=s,we(L)),xe!==s?(he=Y,Y=Vt(se,Se)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s),Ee[ye]={nextPos:V,result:Y},Y)}function ze(){var Y,ee,se,fe,Se,xe,ye=V*17+4,dt=Ee[ye];return dt?(V=dt.nextPos,dt.result):(Y=V,i.charCodeAt(V)===40?(ee=d,V++):(ee=s,we(j)),ee!==s?(se=Ge(),se!==s?(i.charCodeAt(V)===44?(fe=f,V++):(fe=s,we(J)),fe!==s?(Se=Ge(),Se!==s?(i.charCodeAt(V)===41?(xe=m,V++):(xe=s,we(L)),xe!==s?(he=Y,Y=ht(se,Se)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s),Ee[ye]={nextPos:V,result:Y},Y)}function Ge(){var Y,ee,se,fe,Se,xe,ye,dt=V*17+5,_r=Ee[dt];if(_r)return V=_r.nextPos,_r.result;if(Y=V,ee=V,se=[],re.test(i.charAt(V))?(fe=i.charAt(V),V++):(fe=s,we(G)),fe!==s)for(;fe!==s;)se.push(fe),re.test(i.charAt(V))?(fe=i.charAt(V),V++):(fe=s,we(G));else se=s;if(se!==s?(i.charCodeAt(V)===46?(fe=g,V++):(fe=s,we(Z)),fe!==s?(se=[se,fe],ee=se):(V=ee,ee=s)):(V=ee,ee=s),ee===s){for(ee=V,i.charCodeAt(V)===45?(se=b,V++):(se=s,we(z)),se===s&&(se=null),fe=[],re.test(i.charAt(V))?(Se=i.charAt(V),V++):(Se=s,we(G));Se!==s;)fe.push(Se),re.test(i.charAt(V))?(Se=i.charAt(V),V++):(Se=s,we(G));if(i.charCodeAt(V)===46?(Se=g,V++):(Se=s,we(Z)),Se!==s){if(xe=[],re.test(i.charAt(V))?(ye=i.charAt(V),V++):(ye=s,we(G)),ye!==s)for(;ye!==s;)xe.push(ye),re.test(i.charAt(V))?(ye=i.charAt(V),V++):(ye=s,we(G));else xe=s;xe!==s?(se=[se,fe,Se,xe],ee=se):(V=ee,ee=s)}else V=ee,ee=s;if(ee===s)if(ee=V,i.charCodeAt(V)===46?(se=g,V++):(se=s,we(Z)),se!==s){if(fe=[],re.test(i.charAt(V))?(Se=i.charAt(V),V++):(Se=s,we(G)),Se!==s)for(;Se!==s;)fe.push(Se),re.test(i.charAt(V))?(Se=i.charAt(V),V++):(Se=s,we(G));else fe=s;fe!==s?(se=[se,fe],ee=se):(V=ee,ee=s)}else V=ee,ee=s}return ee!==s&&(he=Y,ee=Nt()),Y=ee,Ee[dt]={nextPos:V,result:Y},Y}function Dt(){var Y,ee,se,fe=V*17+6,Se=Ee[fe];if(Se)return V=Se.nextPos,Se.result;if(Y=V,i.charCodeAt(V)===45?V++:we(z),ee=[],re.test(i.charAt(V))?(se=i.charAt(V),V++):(se=s,we(G)),se!==s)for(;se!==s;)ee.push(se),re.test(i.charAt(V))?(se=i.charAt(V),V++):(se=s,we(G));else ee=s;return ee!==s?(he=Y,Y=kt()):(V=Y,Y=s),Ee[fe]={nextPos:V,result:Y},Y}function Tr(){var Y,ee,se=V*17+7,fe=Ee[se];return fe?(V=fe.nextPos,fe.result):(Y=V,ee=$n(),ee===s&&(ee=vt(),ee===s&&(ee=yi(),ee===s&&(ee=tn()))),ee!==s&&(he=Y,ee=Qr(ee)),Y=ee,Ee[se]={nextPos:V,result:Y},Y)}function yi(){var Y,ee,se,fe,Se=V*17+8,xe=Ee[Se];return xe?(V=xe.nextPos,xe.result):(Y=V,ee=Dt(),ee===s&&(ee=cr()),ee!==s?(i.charCodeAt(V)===47?(se=v,V++):(se=s,we(ce)),se!==s?(fe=Dt(),fe===s&&(fe=cr()),fe!==s?(he=Y,Y=Fe(ee,fe)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s),Ee[Se]={nextPos:V,result:Y},Y)}function vt(){var Y,ee,se,fe,Se=V*17+9,xe=Ee[Se];return xe?(V=xe.nextPos,xe.result):(Y=V,ee=Dt(),ee===s&&(ee=cr()),ee!==s?(i.charCodeAt(V)===92?(se=y,V++):(se=s,we(ue)),se!==s?(fe=Dt(),fe===s&&(fe=cr()),fe!==s?(he=Y,Y=Mr(ee,fe)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s),Ee[Se]={nextPos:V,result:Y},Y)}function $n(){var Y,ee,se,fe,Se,xe,ye,dt,_r=V*17+10,$r=Ee[_r];return $r?(V=$r.nextPos,$r.result):(Y=V,ee=Dt(),ee===s&&(ee=cr()),ee!==s?(i.charCodeAt(V)===92?(se=y,V++):(se=s,we(ue)),se!==s?(fe=Dt(),fe===s&&(fe=cr()),fe!==s?(i.charCodeAt(V)===60?(Se=N,V++):(Se=s,we(Te)),Se!==s?(xe=Dt(),xe===s&&(xe=cr()),xe!==s?(i.charCodeAt(V)===47?V++:we(ce),ye=Dt(),ye===s&&(ye=cr()),ye===s&&(ye=null),i.charCodeAt(V)===62?(dt=F,V++):(dt=s,we(Pe)),dt!==s?(he=Y,Y=st(ee,fe,xe,ye)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s),Ee[_r]={nextPos:V,result:Y},Y)}function tn(){var Y,ee,se,fe,Se=V*17+11,xe=Ee[Se];return xe?(V=xe.nextPos,xe.result):(Y=V,ee=Dt(),ee!==s?(i.charCodeAt(V)===44?(se=f,V++):(se=s,we(J)),se!==s?(fe=Dt(),fe!==s?(he=Y,Y=$e(ee,fe)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s),Ee[Se]={nextPos:V,result:Y},Y)}function qn(){var Y,ee,se,fe=V*17+12,Se=Ee[fe];if(Se)return V=Se.nextPos,Se.result;if(Y=V,ee=[],se=Dt(),se===s&&(se=nt()),se!==s)for(;se!==s;)ee.push(se),se=Dt(),se===s&&(se=nt());else ee=s;return ee!==s&&(he=Y,ee=Pr(ee)),Y=ee,Ee[fe]={nextPos:V,result:Y},Y}function rn(){var Y,ee,se,fe,Se=V*17+13,xe=Ee[Se];return xe?(V=xe.nextPos,xe.result):(Y=V,i.charCodeAt(V)===91?(ee=X,V++):(ee=s,we(Ve)),ee!==s?(se=qn(),se!==s?(i.charCodeAt(V)===62?(fe=F,V++):(fe=s,we(Pe)),fe!==s?(he=Y,Y=nr(se)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s),Ee[Se]={nextPos:V,result:Y},Y)}function $t(){var Y,ee,se,fe,Se,xe,ye,dt,_r=V*17+14,$r=Ee[_r];if($r)return V=$r.nextPos,$r.result;if(Y=V,ee=Qt(),ee===s&&(ee=Tr(),ee===s&&(ee=rn(),ee===s)))for(ee=[],se=nt();se!==s;)ee.push(se),se=nt();if(ee!==s){if(se=[],fe=V,Se=We(),Se!==s){for(xe=[],ye=nt();ye!==s;)xe.push(ye),ye=nt();if(ye=Qt(),ye===s&&(ye=Tr(),ye===s&&(ye=rn(),ye===s&&(ye=ni(),ye===s&&(ye=$t(),ye===s)))))for(ye=[],dt=nt();dt!==s;)ye.push(dt),dt=nt();ye!==s?(Se=[Se,xe,ye],fe=Se):(V=fe,fe=s)}else V=fe,fe=s;if(fe!==s)for(;fe!==s;)if(se.push(fe),fe=V,Se=We(),Se!==s){for(xe=[],ye=nt();ye!==s;)xe.push(ye),ye=nt();if(ye=Qt(),ye===s&&(ye=Tr(),ye===s&&(ye=rn(),ye===s&&(ye=ni(),ye===s&&(ye=$t(),ye===s)))))for(ye=[],dt=nt();dt!==s;)ye.push(dt),dt=nt();ye!==s?(Se=[Se,xe,ye],fe=Se):(V=fe,fe=s)}else V=fe,fe=s;else se=s;se!==s?(he=Y,Y=mr()):(V=Y,Y=s)}else V=Y,Y=s;return Ee[_r]={nextPos:V,result:Y},Y}function We(){var Y,ee=V*17+15,se=Ee[ee];return se?(V=se.nextPos,se.result):(i.charCodeAt(V)===43?(Y=p,V++):(Y=s,we(Re)),Y===s&&(i.charCodeAt(V)===45?(Y=b,V++):(Y=s,we(z)),Y===s&&(i.charCodeAt(V)===42?(Y=E,V++):(Y=s,we(Ie)),Y===s&&(i.charCodeAt(V)===37?(Y=O,V++):(Y=s,we(le)),Y===s&&(i.charCodeAt(V)===38?(Y=A,V++):(Y=s,we(Me)),Y===s&&(i.charCodeAt(V)===124?(Y=D,V++):(Y=s,we(je)),Y===s&&(i.substr(V,2)===M?(Y=M,V+=2):(Y=s,we(He)),Y===s&&(i.substr(V,2)===w?(Y=w,V+=2):(Y=s,we(rt))))))))),Ee[ee]={nextPos:V,result:Y},Y)}function ni(){var Y,ee,se,fe,Se=V*17+16,xe=Ee[Se];return xe?(V=xe.nextPos,xe.result):(Y=V,i.charCodeAt(V)===40?(ee=d,V++):(ee=s,we(j)),ee!==s?(se=$t(),se!==s?(i.charCodeAt(V)===41?(fe=m,V++):(fe=s,we(L)),fe!==s?(ee=[ee,se,fe],Y=ee):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s),Ee[Se]={nextPos:V,result:Y},Y)}if(Gt=u(),Gt!==s&&V===i.length)return Gt;throw Gt!==s&&V{e=a&&e>0?e-1:e,n=typeof n=="string"?Hk(n):n;const s=typeof t=="string"?Zi(t):t,o=s.length;(e>=o||e<0)&&(r+=Math.floor(e/o),e=e<0?o-Math.abs(e)%o:e%o,e===o&&(e=0));let l=n+s.slice(0,e).reduce((u,d)=>u+d,0);return l=l+r*s.reduce((u,d)=>u+d,0)+i,Number.isInteger(l)?[l,void 0]:Uy(l)},Hk=n=>{const e=n.match(/^([a-gA-G])([#bs])?([1-9])?$/);if(e===null)return 60;const[,t,r,i]=e,a=i?parseInt(i,10):4,s=Qk[r]||0,o=Gk[t.toUpperCase()];return 12+a*12+o+s},Uy=(n,e=1)=>{let t=8192;if(n%1!==0){const r=n>Math.round(n)?n:Math.round(n),i=n>Math.round(n)?Math.round(n):n,a=Ps(r)/Ps(i),s=1200*Math.log2(a);t=t+Math.floor(8191*(s/(100*e)))}return[n,t]},Ps=n=>440/32*2**((n-9)/12),zk=n=>12/Math.log(2)*Math.log(n/440)+69,Fy=n=>1200*Math.log2(n),Wk=function*(){var t;const n={};let e=2;for(;;){if(!(e in n))yield e,n[e*e]=[e];else{for(const r of n[e])(n[t=r+e]||(n[t]=[])).push(r);delete n[e]}e++}},Xk=n=>{const e=Wk();return Array.from({length:n},()=>e.next().value)},Zk=n=>{const e=n.length,t=Xk(e+1);let r=1;for(let i=0;i{n[0]!==0&&(n=[0,...n]);const e=[];for(let t=0;ttypeof n=="string"?Zi(n).length:n.length,Jk=n=>((n<0||n>4095)&&(console.log("Input number must be odd and between 0 and 4095. Using major (2741) instead."),n=2741),n%2===0&&console.log("Odd number doesnt create real scale"),(n>>>0).toString(2).padStart(12,"0").split("").reduce((t,r,i)=>r==="1"?[11-i,...t]:t,[])),eM=n=>{try{return wm(n)}catch{return[]}},tM=n=>{if(typeof n=="string"){if(Dm(n))return Zi(n);{const e=eM(n);return e&&e.length>0?e:Zi("MAJOR")}}else if(typeof n=="number")return Jk(n);return n},rM=["retrograde"];class Ji{constructor(e){I(this,"type");I(this,"text");I(this,"location");this.type=this.constructor.name,Object.assign(this,e)}clone(){return Al(this)}collect(e){return this[e]}refresh(){}evaluate(e={}){}}let Xl=class extends Ji{constructor(t){super(t);I(this,"duration");I(this,"_next");I(this,"_prev");I(this,"modifiedEvent");I(this,"globalOptions");Object.assign(this,t)}next(){return this._next}previous(){return this._prev}collect(t){return this[t]}sometimesBy(t,r){return Math.random()(Object.prototype.hasOwnProperty.call(this,a)&&(i[a]=this[a]),i),{})}};class Ki extends Xl{constructor(t){super(t);I(this,"pitch");I(this,"freq");I(this,"note");I(this,"octave");I(this,"bend");I(this,"key");I(this,"parsedScale");I(this,"scaleName");Object.assign(this,t)}static createTracked(t){const r={set(a,s,o){return a[s]!==o&&(a[s]=o,(s==="pitch"||s==="key"||s==="parsedScale"||s==="octave")&&(console.log(`${s} has changed to ${o}`),a.refresh())),!0}},i=new Ki(t);return new Proxy(i,r)}refresh(){this.evaluate()}evaluate(t={}){t.octave&&(this.octave=t.octave+(this.octave||0)),(t.duration||t.duration===0)&&(this.duration=t.duration),t.scale&&(this.parsedScale=tM(t.scale)),t.key&&(this.key=t.key);const[r,i]=xm(this.key,this.pitch,this.parsedScale,this.octave);return this.note=r,this.freq=Ps(this.note),i&&(this.bend=i),this}collect(t){return this[t]}scale(t){return this.scaleName!==t?(this.scaleName=t,this.parsedScale=Zi(t),this.evaluate()):this}randomScale(){return this.parsedScale=qk(),this.evaluate()}}class nM extends Xl{constructor(t){super(t);I(this,"pitches");Object.assign(this,t),this.duration=Math.max(...this.pitches.map(r=>r.duration))}evaluate(t={}){return this.pitches.map(r=>r.evaluate(t))}collect(t){return this.pitches.map(i=>i.collect(t))}scale(t){return this.pitches.forEach(r=>r.scale(t)),this}}let Dh=class extends Xl{constructor(e){super(e)}evaluate(e={}){return e.duration&&(this.duration=e.duration),this}};class FS extends Ki{constructor(t){super(t);I(this,"min");I(this,"max");I(this,"randomSeed");I(this,"seededRandom");I(this,"random");Object.assign(this,t),t.min||(this.min=0),t.max||(this.max=jk(this.parsedScale)),this.seededRandom?this.random=this.seededRandom:this.random=Math.random}evaluate(t={}){const r=this.random();return this.pitch=Math.floor(r*(this.max-this.min+1))+this.min,new Ki(this).evaluate(t)}}class iM extends Ji{constructor(t){super(t);I(this,"octave");Object.assign(this,t)}evaluate(t={}){t.octave=this.octave+(t.octave||0)}}class aM extends Ji{constructor(t){super(t);I(this,"duration");Object.assign(this,t)}evaluate(t={}){t.duration=this.duration}}class sM extends Ji{constructor(t){super(t);I(this,"times");I(this,"item");Object.assign(this,t)}evaluate(t={}){return[...Array(this.times)].map(()=>this.item).flat(1/0).map(i=>i.evaluate(t))}}class oM extends Ji{constructor(t){super(t);I(this,"items");Object.assign(this,t)}evaluate(t={}){return this.items.map(r=>r.evaluate(t))}}class lM extends Ji{constructor(t){super(t);I(this,"left");I(this,"right");I(this,"operation");Object.assign(this,t)}evaluate(t={}){this.left.evaluate(t),this.right.evaluate(t);const r=Uk[this.operation];return this.right.items.flatMap(s=>this.left.items.map(o=>[s.clone(),o.clone()])).map(s=>(s[0].pitch=r(s[0].pitch,s[1].pitch),s[0].evaluate(t)))}}class Lm extends Xl{constructor(t){super(t);I(this,"items");I(this,"index");Object.assign(this,t),this.index=0}nextItem(t={}){let r=this.items[this.index%this.items.length];for(;r instanceof Lm;)r=r.nextItem(t);return this.index=this.index+1,r instanceof Ji?r.evaluate(t):r}evaluate(t={}){return this.nextItem(t)}}const Yy=function(){function n(i,a){function s(){this.constructor=i}s.prototype=a.prototype,i.prototype=new s}function e(i,a,s,o){var l=Error.call(this,i);return Object.setPrototypeOf&&Object.setPrototypeOf(l,e.prototype),l.expected=a,l.found=s,l.location=o,l.name="SyntaxError",l}n(e,Error);function t(i,a,s){return s=s||" ",i.length>a?i:(a-=i.length,s+=s.repeat(a),i+s.slice(0,a))}e.prototype.format=function(i){var a="Error: "+this.message;if(this.location){var s=null,o;for(o=0;o",!1),Ve=bt("[",!1),Re=bt("+",!1),Ie=bt("*",!1),le=bt("%",!1),Me=bt("&",!1),je=bt("|",!1),He=bt("<<",!1),rt=bt(">>",!1),ft=function(Y){return Kk(Y.filter(ee=>ee))},Ct=function(){},Vt=function(Y,ee){return Math.floor(Math.random()*(ee-Y+1)+Y)},ht=function(Y,ee){return Math.random()*(ee-Y)+Y},Nt=function(){return parseFloat(ot())},kt=function(){return parseInt(ot())},Qr=function(Y){return Fy(Y)},Fe=function(Y,ee){return Y/ee},Mr=function(Y,ee){return Math.pow(2,Y/ee)},st=function(Y,ee,se,fe){var Se=fe?se/fe:se;return Math.pow(Se,Y/ee)},$e=function(Y,ee){return parseFloat(Y.toString()+"."+ee.toString())},Pr=function(Y){return Y.filter(ee=>ee)},nr=function(Y){return Zk(Y)},mr=function(){return Vk(ot())},V=0,he=0,ve=[{line:1,column:1}],Ce=0,Ke=[],Ee={},Gt;if("startRule"in a){if(!(a.startRule in l))throw new Error(`Can't start parsing from rule "`+a.startRule+'".');u=l[a.startRule]}function ot(){return i.substring(he,V)}function bt(Y,ee){return{type:"literal",text:Y,ignoreCase:ee}}function en(Y,ee,se){return{type:"class",parts:Y,inverted:ee,ignoreCase:se}}function lt(){return{type:"end"}}function Wt(Y){var ee=ve[Y],se;if(ee)return ee;for(se=Y-1;!ve[se];)se--;for(ee=ve[se],ee={line:ee.line,column:ee.column};seCe&&(Ce=V,Ke=[]),Ke.push(Y))}function H(Y,ee,se){return new e(e.buildMessage(Y,ee),Y,ee,se)}function Ot(){var Y,ee,se,fe=V*17+0,Se=Ee[fe];if(Se)return V=Se.nextPos,Se.result;if(Y=V,ee=[],se=Tr(),se===s&&(se=Qt(),se===s&&(se=rn(),se===s&&(se=$t(),se===s&&(se=nt())))),se!==s)for(;se!==s;)ee.push(se),se=Tr(),se===s&&(se=Qt(),se===s&&(se=rn(),se===s&&(se=$t(),se===s&&(se=nt()))));else ee=s;return ee!==s&&(he=Y,ee=ft(ee)),Y=ee,Ee[fe]={nextPos:V,result:Y},Y}function nt(){var Y,ee,se=V*17+1,fe=Ee[se];return fe?(V=fe.nextPos,fe.result):(Y=V,B.test(i.charAt(V))?(ee=i.charAt(V),V++):(ee=s,we(ie)),ee!==s&&(he=Y,ee=Ct()),Y=ee,Ee[se]={nextPos:V,result:Y},Y)}function Qt(){var Y,ee=V*17+2,se=Ee[ee];return se?(V=se.nextPos,se.result):(Y=Ge(),Y===s&&(Y=Dt(),Y===s&&(Y=cr(),Y===s&&(Y=ze()))),Ee[ee]={nextPos:V,result:Y},Y)}function cr(){var Y,ee,se,fe,Se,xe,ye=V*17+3,dt=Ee[ye];return dt?(V=dt.nextPos,dt.result):(Y=V,i.charCodeAt(V)===40?(ee=d,V++):(ee=s,we(j)),ee!==s?(se=Dt(),se!==s?(i.charCodeAt(V)===44?(fe=f,V++):(fe=s,we(J)),fe!==s?(Se=Dt(),Se!==s?(i.charCodeAt(V)===41?(xe=m,V++):(xe=s,we(L)),xe!==s?(he=Y,Y=Vt(se,Se)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s),Ee[ye]={nextPos:V,result:Y},Y)}function ze(){var Y,ee,se,fe,Se,xe,ye=V*17+4,dt=Ee[ye];return dt?(V=dt.nextPos,dt.result):(Y=V,i.charCodeAt(V)===40?(ee=d,V++):(ee=s,we(j)),ee!==s?(se=Ge(),se!==s?(i.charCodeAt(V)===44?(fe=f,V++):(fe=s,we(J)),fe!==s?(Se=Ge(),Se!==s?(i.charCodeAt(V)===41?(xe=m,V++):(xe=s,we(L)),xe!==s?(he=Y,Y=ht(se,Se)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s),Ee[ye]={nextPos:V,result:Y},Y)}function Ge(){var Y,ee,se,fe,Se,xe,ye,dt=V*17+5,_r=Ee[dt];if(_r)return V=_r.nextPos,_r.result;if(Y=V,ee=V,se=[],re.test(i.charAt(V))?(fe=i.charAt(V),V++):(fe=s,we(G)),fe!==s)for(;fe!==s;)se.push(fe),re.test(i.charAt(V))?(fe=i.charAt(V),V++):(fe=s,we(G));else se=s;if(se!==s?(i.charCodeAt(V)===46?(fe=g,V++):(fe=s,we(Z)),fe!==s?(se=[se,fe],ee=se):(V=ee,ee=s)):(V=ee,ee=s),ee===s){for(ee=V,i.charCodeAt(V)===45?(se=b,V++):(se=s,we(z)),se===s&&(se=null),fe=[],re.test(i.charAt(V))?(Se=i.charAt(V),V++):(Se=s,we(G));Se!==s;)fe.push(Se),re.test(i.charAt(V))?(Se=i.charAt(V),V++):(Se=s,we(G));if(i.charCodeAt(V)===46?(Se=g,V++):(Se=s,we(Z)),Se!==s){if(xe=[],re.test(i.charAt(V))?(ye=i.charAt(V),V++):(ye=s,we(G)),ye!==s)for(;ye!==s;)xe.push(ye),re.test(i.charAt(V))?(ye=i.charAt(V),V++):(ye=s,we(G));else xe=s;xe!==s?(se=[se,fe,Se,xe],ee=se):(V=ee,ee=s)}else V=ee,ee=s;if(ee===s)if(ee=V,i.charCodeAt(V)===46?(se=g,V++):(se=s,we(Z)),se!==s){if(fe=[],re.test(i.charAt(V))?(Se=i.charAt(V),V++):(Se=s,we(G)),Se!==s)for(;Se!==s;)fe.push(Se),re.test(i.charAt(V))?(Se=i.charAt(V),V++):(Se=s,we(G));else fe=s;fe!==s?(se=[se,fe],ee=se):(V=ee,ee=s)}else V=ee,ee=s}return ee!==s&&(he=Y,ee=Nt()),Y=ee,Ee[dt]={nextPos:V,result:Y},Y}function Dt(){var Y,ee,se,fe=V*17+6,Se=Ee[fe];if(Se)return V=Se.nextPos,Se.result;if(Y=V,i.charCodeAt(V)===45?V++:we(z),ee=[],re.test(i.charAt(V))?(se=i.charAt(V),V++):(se=s,we(G)),se!==s)for(;se!==s;)ee.push(se),re.test(i.charAt(V))?(se=i.charAt(V),V++):(se=s,we(G));else ee=s;return ee!==s?(he=Y,Y=kt()):(V=Y,Y=s),Ee[fe]={nextPos:V,result:Y},Y}function Tr(){var Y,ee,se=V*17+7,fe=Ee[se];return fe?(V=fe.nextPos,fe.result):(Y=V,ee=$n(),ee===s&&(ee=vt(),ee===s&&(ee=yi(),ee===s&&(ee=tn()))),ee!==s&&(he=Y,ee=Qr(ee)),Y=ee,Ee[se]={nextPos:V,result:Y},Y)}function yi(){var Y,ee,se,fe,Se=V*17+8,xe=Ee[Se];return xe?(V=xe.nextPos,xe.result):(Y=V,ee=Dt(),ee===s&&(ee=cr()),ee!==s?(i.charCodeAt(V)===47?(se=v,V++):(se=s,we(ce)),se!==s?(fe=Dt(),fe===s&&(fe=cr()),fe!==s?(he=Y,Y=Fe(ee,fe)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s),Ee[Se]={nextPos:V,result:Y},Y)}function vt(){var Y,ee,se,fe,Se=V*17+9,xe=Ee[Se];return xe?(V=xe.nextPos,xe.result):(Y=V,ee=Dt(),ee===s&&(ee=cr()),ee!==s?(i.charCodeAt(V)===92?(se=y,V++):(se=s,we(ue)),se!==s?(fe=Dt(),fe===s&&(fe=cr()),fe!==s?(he=Y,Y=Mr(ee,fe)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s),Ee[Se]={nextPos:V,result:Y},Y)}function $n(){var Y,ee,se,fe,Se,xe,ye,dt,_r=V*17+10,$r=Ee[_r];return $r?(V=$r.nextPos,$r.result):(Y=V,ee=Dt(),ee===s&&(ee=cr()),ee!==s?(i.charCodeAt(V)===92?(se=y,V++):(se=s,we(ue)),se!==s?(fe=Dt(),fe===s&&(fe=cr()),fe!==s?(i.charCodeAt(V)===60?(Se=N,V++):(Se=s,we(Te)),Se!==s?(xe=Dt(),xe===s&&(xe=cr()),xe!==s?(i.charCodeAt(V)===47?V++:we(ce),ye=Dt(),ye===s&&(ye=cr()),ye===s&&(ye=null),i.charCodeAt(V)===62?(dt=F,V++):(dt=s,we(Pe)),dt!==s?(he=Y,Y=st(ee,fe,xe,ye)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s),Ee[_r]={nextPos:V,result:Y},Y)}function tn(){var Y,ee,se,fe,Se=V*17+11,xe=Ee[Se];return xe?(V=xe.nextPos,xe.result):(Y=V,ee=Dt(),ee!==s?(i.charCodeAt(V)===44?(se=f,V++):(se=s,we(J)),se!==s?(fe=Dt(),fe!==s?(he=Y,Y=$e(ee,fe)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s),Ee[Se]={nextPos:V,result:Y},Y)}function qn(){var Y,ee,se,fe=V*17+12,Se=Ee[fe];if(Se)return V=Se.nextPos,Se.result;if(Y=V,ee=[],se=Dt(),se===s&&(se=nt()),se!==s)for(;se!==s;)ee.push(se),se=Dt(),se===s&&(se=nt());else ee=s;return ee!==s&&(he=Y,ee=Pr(ee)),Y=ee,Ee[fe]={nextPos:V,result:Y},Y}function rn(){var Y,ee,se,fe,Se=V*17+13,xe=Ee[Se];return xe?(V=xe.nextPos,xe.result):(Y=V,i.charCodeAt(V)===91?(ee=X,V++):(ee=s,we(Ve)),ee!==s?(se=qn(),se!==s?(i.charCodeAt(V)===62?(fe=F,V++):(fe=s,we(Pe)),fe!==s?(he=Y,Y=nr(se)):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s),Ee[Se]={nextPos:V,result:Y},Y)}function $t(){var Y,ee,se,fe,Se,xe,ye,dt,_r=V*17+14,$r=Ee[_r];if($r)return V=$r.nextPos,$r.result;if(Y=V,ee=Qt(),ee===s&&(ee=Tr(),ee===s&&(ee=rn(),ee===s)))for(ee=[],se=nt();se!==s;)ee.push(se),se=nt();if(ee!==s){if(se=[],fe=V,Se=We(),Se!==s){for(xe=[],ye=nt();ye!==s;)xe.push(ye),ye=nt();if(ye=Qt(),ye===s&&(ye=Tr(),ye===s&&(ye=rn(),ye===s&&(ye=ni(),ye===s&&(ye=$t(),ye===s)))))for(ye=[],dt=nt();dt!==s;)ye.push(dt),dt=nt();ye!==s?(Se=[Se,xe,ye],fe=Se):(V=fe,fe=s)}else V=fe,fe=s;if(fe!==s)for(;fe!==s;)if(se.push(fe),fe=V,Se=We(),Se!==s){for(xe=[],ye=nt();ye!==s;)xe.push(ye),ye=nt();if(ye=Qt(),ye===s&&(ye=Tr(),ye===s&&(ye=rn(),ye===s&&(ye=ni(),ye===s&&(ye=$t(),ye===s)))))for(ye=[],dt=nt();dt!==s;)ye.push(dt),dt=nt();ye!==s?(Se=[Se,xe,ye],fe=Se):(V=fe,fe=s)}else V=fe,fe=s;else se=s;se!==s?(he=Y,Y=mr()):(V=Y,Y=s)}else V=Y,Y=s;return Ee[_r]={nextPos:V,result:Y},Y}function We(){var Y,ee=V*17+15,se=Ee[ee];return se?(V=se.nextPos,se.result):(i.charCodeAt(V)===43?(Y=p,V++):(Y=s,we(Re)),Y===s&&(i.charCodeAt(V)===45?(Y=b,V++):(Y=s,we(z)),Y===s&&(i.charCodeAt(V)===42?(Y=E,V++):(Y=s,we(Ie)),Y===s&&(i.charCodeAt(V)===37?(Y=O,V++):(Y=s,we(le)),Y===s&&(i.charCodeAt(V)===38?(Y=A,V++):(Y=s,we(Me)),Y===s&&(i.charCodeAt(V)===124?(Y=D,V++):(Y=s,we(je)),Y===s&&(i.substr(V,2)===M?(Y=M,V+=2):(Y=s,we(He)),Y===s&&(i.substr(V,2)===w?(Y=w,V+=2):(Y=s,we(rt))))))))),Ee[ee]={nextPos:V,result:Y},Y)}function ni(){var Y,ee,se,fe,Se=V*17+16,xe=Ee[Se];return xe?(V=xe.nextPos,xe.result):(Y=V,i.charCodeAt(V)===40?(ee=d,V++):(ee=s,we(j)),ee!==s?(se=$t(),se!==s?(i.charCodeAt(V)===41?(fe=m,V++):(fe=s,we(L)),fe!==s?(ee=[ee,se,fe],Y=ee):(V=Y,Y=s)):(V=Y,Y=s)):(V=Y,Y=s),Ee[Se]={nextPos:V,result:Y},Y)}if(Gt=u(),Gt!==s&&V===i.length)return Gt;throw Gt!==s&&V{e=a&&e>0?e-1:e,n=typeof n=="string"?Hk(n):n;const s=typeof t=="string"?Zi(t):t,o=s.length;(e>=o||e<0)&&(r+=Math.floor(e/o),e=e<0?o-Math.abs(e)%o:e%o,e===o&&(e=0));let l=n+s.slice(0,e).reduce((u,d)=>u+d,0);return l=l+r*s.reduce((u,d)=>u+d,0)+i,Number.isInteger(l)?[l,void 0]:Uy(l)},Hk=n=>{const e=n.match(/^([a-gA-G])([#bs])?([1-9])?$/);if(e===null)return 60;const[,t,r,i]=e,a=i?parseInt(i,10):4,s=Qk[r]||0,o=Gk[t.toUpperCase()];return 12+a*12+o+s},Uy=(n,e=1)=>{let t=8192;if(n%1!==0){const r=n>Math.round(n)?n:Math.round(n),i=n>Math.round(n)?Math.round(n):n,a=Ps(r)/Ps(i),s=1200*Math.log2(a);t=t+Math.floor(8191*(s/(100*e)))}return[n,t]},Ps=n=>440/32*2**((n-9)/12),zk=n=>12/Math.log(2)*Math.log(n/440)+69,Fy=n=>1200*Math.log2(n),Wk=function*(){var t;const n={};let e=2;for(;;){if(!(e in n))yield e,n[e*e]=[e];else{for(const r of n[e])(n[t=r+e]||(n[t]=[])).push(r);delete n[e]}e++}},Xk=n=>{const e=Wk();return Array.from({length:n},()=>e.next().value)},Zk=n=>{const e=n.length,t=Xk(e+1);let r=1;for(let i=0;i{n[0]!==0&&(n=[0,...n]);const e=[];for(let t=0;ttypeof n=="string"?Zi(n).length:n.length,Jk=n=>((n<0||n>4095)&&(console.log("Input number must be odd and between 0 and 4095. Using major (2741) instead."),n=2741),n%2===0&&console.log("Odd number doesnt create real scale"),(n>>>0).toString(2).padStart(12,"0").split("").reduce((t,r,i)=>r==="1"?[11-i,...t]:t,[])),eM=n=>{try{return wm(n)}catch{return[]}},tM=n=>{if(typeof n=="string"){if(Dm(n))return Zi(n);{const e=eM(n);return e&&e.length>0?e:Zi("MAJOR")}}else if(typeof n=="number")return Jk(n);return n},rM=["retrograde"];class Ji{constructor(e){R(this,"type");R(this,"text");R(this,"location");this.type=this.constructor.name,Object.assign(this,e)}clone(){return Al(this)}collect(e){return this[e]}refresh(){}evaluate(e={}){}}let Xl=class extends Ji{constructor(t){super(t);R(this,"duration");R(this,"_next");R(this,"_prev");R(this,"modifiedEvent");R(this,"globalOptions");Object.assign(this,t)}next(){return this._next}previous(){return this._prev}collect(t){return this[t]}sometimesBy(t,r){return Math.random()(Object.prototype.hasOwnProperty.call(this,a)&&(i[a]=this[a]),i),{})}};class Ki extends Xl{constructor(t){super(t);R(this,"pitch");R(this,"freq");R(this,"note");R(this,"octave");R(this,"bend");R(this,"key");R(this,"parsedScale");R(this,"scaleName");Object.assign(this,t)}static createTracked(t){const r={set(a,s,o){return a[s]!==o&&(a[s]=o,(s==="pitch"||s==="key"||s==="parsedScale"||s==="octave")&&(console.log(`${s} has changed to ${o}`),a.refresh())),!0}},i=new Ki(t);return new Proxy(i,r)}refresh(){this.evaluate()}evaluate(t={}){t.octave&&(this.octave=t.octave+(this.octave||0)),(t.duration||t.duration===0)&&(this.duration=t.duration),t.scale&&(this.parsedScale=tM(t.scale)),t.key&&(this.key=t.key);const[r,i]=xm(this.key,this.pitch,this.parsedScale,this.octave);return this.note=r,this.freq=Ps(this.note),i&&(this.bend=i),this}collect(t){return this[t]}scale(t){return this.scaleName!==t?(this.scaleName=t,this.parsedScale=Zi(t),this.evaluate()):this}randomScale(){return this.parsedScale=qk(),this.evaluate()}}class nM extends Xl{constructor(t){super(t);R(this,"pitches");Object.assign(this,t),this.duration=Math.max(...this.pitches.map(r=>r.duration))}evaluate(t={}){return this.pitches.map(r=>r.evaluate(t))}collect(t){return this.pitches.map(i=>i.collect(t))}scale(t){return this.pitches.forEach(r=>r.scale(t)),this}}let Dh=class extends Xl{constructor(e){super(e)}evaluate(e={}){return e.duration&&(this.duration=e.duration),this}};class FS extends Ki{constructor(t){super(t);R(this,"min");R(this,"max");R(this,"randomSeed");R(this,"seededRandom");R(this,"random");Object.assign(this,t),t.min||(this.min=0),t.max||(this.max=jk(this.parsedScale)),this.seededRandom?this.random=this.seededRandom:this.random=Math.random}evaluate(t={}){const r=this.random();return this.pitch=Math.floor(r*(this.max-this.min+1))+this.min,new Ki(this).evaluate(t)}}class iM extends Ji{constructor(t){super(t);R(this,"octave");Object.assign(this,t)}evaluate(t={}){t.octave=this.octave+(t.octave||0)}}class aM extends Ji{constructor(t){super(t);R(this,"duration");Object.assign(this,t)}evaluate(t={}){t.duration=this.duration}}class sM extends Ji{constructor(t){super(t);R(this,"times");R(this,"item");Object.assign(this,t)}evaluate(t={}){return[...Array(this.times)].map(()=>this.item).flat(1/0).map(i=>i.evaluate(t))}}class oM extends Ji{constructor(t){super(t);R(this,"items");Object.assign(this,t)}evaluate(t={}){return this.items.map(r=>r.evaluate(t))}}class lM extends Ji{constructor(t){super(t);R(this,"left");R(this,"right");R(this,"operation");Object.assign(this,t)}evaluate(t={}){this.left.evaluate(t),this.right.evaluate(t);const r=Uk[this.operation];return this.right.items.flatMap(s=>this.left.items.map(o=>[s.clone(),o.clone()])).map(s=>(s[0].pitch=r(s[0].pitch,s[1].pitch),s[0].evaluate(t)))}}class Lm extends Xl{constructor(t){super(t);R(this,"items");R(this,"index");Object.assign(this,t),this.index=0}nextItem(t={}){let r=this.items[this.index%this.items.length];for(;r instanceof Lm;)r=r.nextItem(t);return this.index=this.index+1,r instanceof Ji?r.evaluate(t):r}evaluate(t={}){return this.nextItem(t)}}const Yy=function(){function n(i,a){function s(){this.constructor=i}s.prototype=a.prototype,i.prototype=new s}function e(i,a,s,o){var l=Error.call(this,i);return Object.setPrototypeOf&&Object.setPrototypeOf(l,e.prototype),l.expected=a,l.found=s,l.location=o,l.name="SyntaxError",l}n(e,Error);function t(i,a,s){return s=s||" ",i.length>a?i:(a-=i.length,s+=s.repeat(a),i+s.slice(0,a))}e.prototype.format=function(i){var a="Error: "+this.message;if(this.location){var s=null,o;for(o=0;o `+d+` `+m+` | `+u.line+" | "+g+` `+m+" | "+t("",l.column-1," ")+t("",v,"^")}else a+=` at `+d}return a},e.buildMessage=function(i,a){var s={literal:function(g){return'"'+l(g.text)+'"'},class:function(g){var b=g.parts.map(function(v){return Array.isArray(v)?u(v[0])+"-"+u(v[1]):u(v)});return"["+(g.inverted?"^":"")+b.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(g){return g.description}};function o(g){return g.charCodeAt(0).toString(16).toUpperCase()}function l(g){return g.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(b){return"\\x0"+o(b)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(b){return"\\x"+o(b)})}function u(g){return g.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(b){return"\\x0"+o(b)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(b){return"\\x"+o(b)})}function d(g){return s[g.type](g)}function f(g){var b=g.map(d),v,y;if(b.sort(),b.length>0){for(v=1,y=1;v>",A="<<",D="<",M=">",w="_",B="?",re=":",ie="r",j=/^[0-9]/,J=/^[ \n\r\t]/,L=/^[mklpdcwyhnqaefsxtgujzo]/,G=vt("-",!1),Z=$n([["0","9"]],!1,!1),z=vt(".",!1),ce=qn("whitespace"),ue=$n([" ",` -`,"\r"," "],!1,!1),Te=vt(",",!1),Pe=vt("|",!1),Ve=$n(["m","k","l","p","d","c","w","y","h","n","q","a","e","f","s","x","t","g","u","j","z","o"],!1,!1),Re=vt("(",!1),Ie=vt(")",!1),le=vt("+",!1),Me=vt("*",!1),je=vt("/",!1),He=vt("%",!1),rt=vt("^",!1),ft=vt("&",!1),Ct=vt(">>",!1),Vt=vt("<<",!1),ht=vt("<",!1),Nt=vt(">",!1),kt=vt("_",!1),Qr=vt("?",!1),Fe=vt(":",!1),Mr=vt("r",!1),st=function(U){return U.filter(K=>K)},$e=function(){return parseFloat(Tr())},Pr=function(){return parseInt(Tr())},nr=function(){},mr=function(){return Yk[Tr()]},V=function(U){return U.filter(K=>K)},he=function(U){return vr(oM,{items:U})},ve=function(U,K,ae){return vr(lM,{left:U,operation:K,right:ae})},Ce=function(U){return U},Ke=function(U){return vr(Lm,{items:U})},Ee=function(U){return vr(iM,{octave:U})},Gt=function(){return Tr().split("").reduce((U,K)=>U+(K==="^"?1:-1),0)},ot=function(){return vr(FS,{seededRandom:a.seededRandom})},bt=function(U,K){return vr(FS,{min:U,max:K,seededRandom:a.seededRandom})},en=function(U,K){return vr(sM,{item:U,times:K})},lt=function(U){return vr(aM,{duration:U})},Wt=function(U){return vr(Dh,{duration:U})},St=function(U,K,ae){const _e=U?a.nodeOptions.octave+U:a.nodeOptions.octave;return vr(Ki,{duration:K,pitch:ae,octave:_e})},we=function(U,K){return vr(nM,{pitches:[U].concat(K)})},H=0,Ot=0,nt=[{line:1,column:1}],Qt=0,cr=[],ze=0,Ge={},Dt;if("startRule"in a){if(!(a.startRule in l))throw new Error(`Can't start parsing from rule "`+a.startRule+'".');u=l[a.startRule]}function Tr(){return i.substring(Ot,H)}function yi(){return $t(Ot,H)}function vt(U,K){return{type:"literal",text:U,ignoreCase:K}}function $n(U,K,ae){return{type:"class",parts:U,inverted:K,ignoreCase:ae}}function tn(){return{type:"end"}}function qn(U){return{type:"other",description:U}}function rn(U){var K=nt[U],ae;if(K)return K;for(ae=U-1;!nt[ae];)ae--;for(K=nt[ae],K={line:K.line,column:K.column};aeQt&&(Qt=H,cr=[]),cr.push(U))}function ni(U,K,ae){return new e(e.buildMessage(U,K),U,K,ae)}function Y(){var U,K,ae=H*24+0,_e=Ge[ae];return _e?(H=_e.nextPos,_e.result):(U=H,K=ye(),K!==s&&(Ot=U,K=st(K)),U=K,Ge[ae]={nextPos:H,result:U},U)}function ee(){var U,K,ae,_e,Le,Je,yr,An=H*24+1,Ri=Ge[An];if(Ri)return H=Ri.nextPos,Ri.result;for(U=H,K=H,i.charCodeAt(H)===45?(ae=d,H++):(ae=s,ze===0&&We(G)),ae===s&&(ae=null),_e=[],j.test(i.charAt(H))?(Le=i.charAt(H),H++):(Le=s,ze===0&&We(Z));Le!==s;)_e.push(Le),j.test(i.charAt(H))?(Le=i.charAt(H),H++):(Le=s,ze===0&&We(Z));if(i.charCodeAt(H)===46?(Le=f,H++):(Le=s,ze===0&&We(z)),Le!==s){if(Je=[],j.test(i.charAt(H))?(yr=i.charAt(H),H++):(yr=s,ze===0&&We(Z)),yr!==s)for(;yr!==s;)Je.push(yr),j.test(i.charAt(H))?(yr=i.charAt(H),H++):(yr=s,ze===0&&We(Z));else Je=s;Je!==s?(ae=[ae,_e,Le,Je],K=ae):(H=K,K=s)}else H=K,K=s;if(K===s)if(K=H,i.charCodeAt(H)===46?(ae=f,H++):(ae=s,ze===0&&We(z)),ae!==s){if(_e=[],j.test(i.charAt(H))?(Le=i.charAt(H),H++):(Le=s,ze===0&&We(Z)),Le!==s)for(;Le!==s;)_e.push(Le),j.test(i.charAt(H))?(Le=i.charAt(H),H++):(Le=s,ze===0&&We(Z));else _e=s;_e!==s?(ae=[ae,_e],K=ae):(H=K,K=s)}else H=K,K=s;return K!==s&&(Ot=U,K=$e()),U=K,Ge[An]={nextPos:H,result:U},U}function se(){var U,K,ae=H*24+2,_e=Ge[ae];return _e?(H=_e.nextPos,_e.result):(U=H,i.charCodeAt(H)===45?H++:ze===0&&We(G),j.test(i.charAt(H))?(K=i.charAt(H),H++):(K=s,ze===0&&We(Z)),K!==s?(Ot=U,U=Pr()):(H=U,U=s),Ge[ae]={nextPos:H,result:U},U)}function fe(){var U,K,ae=H*24+3,_e=Ge[ae];return _e?(H=_e.nextPos,_e.result):(ze++,U=H,J.test(i.charAt(H))?(K=i.charAt(H),H++):(K=s,ze===0&&We(ue)),K!==s&&(Ot=U,K=nr()),U=K,ze--,U===s&&(K=s,ze===0&&We(ce)),Ge[ae]={nextPos:H,result:U},U)}function Se(){var U,K,ae=H*24+7,_e=Ge[ae];return _e?(H=_e.nextPos,_e.result):(U=H,L.test(i.charAt(H))?(K=i.charAt(H),H++):(K=s,ze===0&&We(Ve)),K!==s&&(Ot=U,K=mr()),U=K,Ge[ae]={nextPos:H,result:U},U)}function xe(){var U,K=H*24+8,ae=Ge[K];return ae?(H=ae.nextPos,ae.result):(U=Se(),U===s&&(U=ee()),Ge[K]={nextPos:H,result:U},U)}function ye(){var U,K,ae,_e=H*24+9,Le=Ge[_e];if(Le)return H=Le.nextPos,Le.result;if(U=H,K=[],ae=Ai(),ae===s&&(ae=_r(),ae===s&&(ae=dt(),ae===s&&(ae=ii(),ae===s&&(ae=ai())))),ae!==s)for(;ae!==s;)K.push(ae),ae=Ai(),ae===s&&(ae=_r(),ae===s&&(ae=dt(),ae===s&&(ae=ii(),ae===s&&(ae=ai()))));else K=s;return K!==s&&(Ot=U,K=V(K)),U=K,Ge[_e]={nextPos:H,result:U},U}function dt(){var U,K,ae,_e,Le=H*24+10,Je=Ge[Le];return Je?(H=Je.nextPos,Je.result):(U=H,i.charCodeAt(H)===40?(K=b,H++):(K=s,ze===0&&We(Re)),K!==s?(ae=ye(),ae!==s?(i.charCodeAt(H)===41?(_e=v,H++):(_e=s,ze===0&&We(Ie)),_e!==s?(Ot=U,U=he(ae)):(H=U,U=s)):(H=U,U=s)):(H=U,U=s),Ge[Le]={nextPos:H,result:U},U)}function _r(){var U,K,ae,_e,Le=H*24+11,Je=Ge[Le];return Je?(H=Je.nextPos,Je.result):(U=H,K=dt(),K!==s?(ae=$r(),ae!==s?(_e=dt(),_e!==s?(Ot=U,U=ve(K,ae,_e)):(H=U,U=s)):(H=U,U=s)):(H=U,U=s),Ge[Le]={nextPos:H,result:U},U)}function $r(){var U,K=H*24+12,ae=Ge[K];return ae?(H=ae.nextPos,ae.result):(i.charCodeAt(H)===43?(U=y,H++):(U=s,ze===0&&We(le)),U===s&&(i.charCodeAt(H)===45?(U=d,H++):(U=s,ze===0&&We(G)),U===s&&(i.charCodeAt(H)===42?(U=N,H++):(U=s,ze===0&&We(Me)),U===s&&(i.charCodeAt(H)===47?(U=F,H++):(U=s,ze===0&&We(je)),U===s&&(i.charCodeAt(H)===37?(U=X,H++):(U=s,ze===0&&We(He)),U===s&&(i.charCodeAt(H)===94?(U=p,H++):(U=s,ze===0&&We(rt)),U===s&&(i.charCodeAt(H)===124?(U=g,H++):(U=s,ze===0&&We(Pe)),U===s&&(i.charCodeAt(H)===38?(U=E,H++):(U=s,ze===0&&We(ft)),U===s&&(i.substr(H,2)===O?(U=O,H+=2):(U=s,ze===0&&We(Ct)),U===s&&(i.substr(H,2)===A?(U=A,H+=2):(U=s,ze===0&&We(Vt))))))))))),Ge[K]={nextPos:H,result:U},U)}function ii(){var U,K,ae=H*24+13,_e=Ge[ae];return _e?(H=_e.nextPos,_e.result):(U=H,K=ra(),K===s&&(K=na(),K===s&&(K=si(),K===s&&(K=Va(),K===s&&(K=fe(),K===s&&(K=za(),K===s&&(K=Ha(),K===s&&(K=ta(),K===s&&(K=dt())))))))),K!==s&&(Ot=U,K=Ce(K)),U=K,Ge[ae]={nextPos:H,result:U},U)}function ai(){var U,K,ae,_e,Le=H*24+14,Je=Ge[Le];return Je?(H=Je.nextPos,Je.result):(U=H,i.charCodeAt(H)===60?(K=D,H++):(K=s,ze===0&&We(ht)),K!==s?(ae=ye(),ae!==s?(i.charCodeAt(H)===62?(_e=M,H++):(_e=s,ze===0&&We(Nt)),_e!==s?(Ot=U,U=Ke(ae)):(H=U,U=s)):(H=U,U=s)):(H=U,U=s),Ge[Le]={nextPos:H,result:U},U)}function Va(){var U,K,ae=H*24+15,_e=Ge[ae];return _e?(H=_e.nextPos,_e.result):(U=H,K=Br(),K!==s&&(Ot=U,K=Ee(K)),U=K,Ge[ae]={nextPos:H,result:U},U)}function Br(){var U,K,ae,_e=H*24+16,Le=Ge[_e];if(Le)return H=Le.nextPos,Le.result;if(U=H,K=[],i.charCodeAt(H)===94?(ae=p,H++):(ae=s,ze===0&&We(rt)),ae===s&&(i.charCodeAt(H)===95?(ae=w,H++):(ae=s,ze===0&&We(kt))),ae!==s)for(;ae!==s;)K.push(ae),i.charCodeAt(H)===94?(ae=p,H++):(ae=s,ze===0&&We(rt)),ae===s&&(i.charCodeAt(H)===95?(ae=w,H++):(ae=s,ze===0&&We(kt)));else K=s;return K!==s&&(Ot=U,K=Gt()),U=K,Ge[_e]={nextPos:H,result:U},U}function Ha(){var U,K,ae=H*24+17,_e=Ge[ae];return _e?(H=_e.nextPos,_e.result):(U=H,i.charCodeAt(H)===63?(K=B,H++):(K=s,ze===0&&We(Qr)),K!==s&&(Ot=U,K=ot()),U=K,Ge[ae]={nextPos:H,result:U},U)}function ta(){var U,K,ae,_e,Le,Je,yr=H*24+18,An=Ge[yr];return An?(H=An.nextPos,An.result):(U=H,i.charCodeAt(H)===40?(K=b,H++):(K=s,ze===0&&We(Re)),K!==s?(ae=se(),ae!==s?(i.charCodeAt(H)===44?(_e=m,H++):(_e=s,ze===0&&We(Te)),_e!==s?(Le=se(),Le!==s?(i.charCodeAt(H)===41?(Je=v,H++):(Je=s,ze===0&&We(Ie)),Je!==s?(Ot=U,U=bt(ae,Le)):(H=U,U=s)):(H=U,U=s)):(H=U,U=s)):(H=U,U=s)):(H=U,U=s),Ge[yr]={nextPos:H,result:U},U)}function Ai(){var U,K,ae,_e,Le=H*24+19,Je=Ge[Le];return Je?(H=Je.nextPos,Je.result):(U=H,K=ii(),K!==s?(i.charCodeAt(H)===58?(ae=re,H++):(ae=s,ze===0&&We(Fe)),ae!==s?(_e=se(),_e!==s?(Ot=U,U=en(K,_e)):(H=U,U=s)):(H=U,U=s)):(H=U,U=s),Ge[Le]={nextPos:H,result:U},U)}function za(){var U,K,ae=H*24+20,_e=Ge[ae];return _e?(H=_e.nextPos,_e.result):(U=H,K=xe(),K!==s&&(Ot=U,K=lt(K)),U=K,Ge[ae]={nextPos:H,result:U},U)}function ra(){var U,K,ae,_e=H*24+21,Le=Ge[_e];return Le?(H=Le.nextPos,Le.result):(U=H,K=xe(),K===s&&(K=null),i.charCodeAt(H)===114?(ae=ie,H++):(ae=s,ze===0&&We(Mr)),ae!==s?(Ot=U,U=Wt(K)):(H=U,U=s),Ge[_e]={nextPos:H,result:U},U)}function si(){var U,K,ae,_e,Le=H*24+22,Je=Ge[Le];return Je?(H=Je.nextPos,Je.result):(U=H,K=Br(),K===s&&(K=null),ae=xe(),ae===s&&(ae=null),_e=se(),_e!==s?(Ot=U,U=St(K,ae,_e)):(H=U,U=s),Ge[Le]={nextPos:H,result:U},U)}function na(){var U,K,ae,_e,Le=H*24+23,Je=Ge[Le];if(Je)return H=Je.nextPos,Je.result;if(U=H,K=si(),K!==s){if(ae=[],_e=si(),_e!==s)for(;_e!==s;)ae.push(_e),_e=si();else ae=s;ae!==s?(Ot=U,U=we(K,ae)):(H=U,U=s)}else H=U,U=s;return Ge[Le]={nextPos:H,result:U},U}var Cr=a.nodeOptions||{};function vr(U,K){K.text=Tr(),K.location=yi();for(var ae in Cr)(K[ae]===void 0||K[ae]===null)&&(K[ae]=Cr[ae]);return new U(K)}if(Dt=u(),Dt!==s&&H===i.length)return Dt;throw Dt!==s&&He.collect("pitch"))}notes(){return this.evaluated.map(e=>e.collect("note"))}freqs(){return this.evaluated.map(e=>e.collect("freq"))}durations(){return this.evaluated.map(e=>e.collect("duration"))}retrograde(){return this.evaluated=this.evaluated.reverse(),this}scale(e){return this.isInOptions("scaleName",e)?this:(this.update({scale:e}),this)}key(e){return console.log("KEY?",this.isInOptions("key",e)),this.isInOptions("key",e)?this:(this.update({key:e}),this)}octave(e){return this.isInOptions("octave",e)?this:(this.update({octave:e}),this)}isInOptions(e,t){return this.options.nodeOptions&&this.options.nodeOptions[e]===t}next(){this.index++,this.counter++;const e=this.evaluated[this.index%this.evaluated.length];return this.redo>0&&this.index>=this.evaluated.length*this.redo&&(this.update(),this.index=0),e}applyTransformations(){var e;(e=this.globalOptions)!=null&&e.retrograde&&(this.evaluated=this.evaluated.reverse())}clone(){return Al(this)}notStarted(){return this.index<0}peek(){return this.evaluated[this.index-1||0]}hasStarted(){return this.index>=0}evaluate(e={}){const t=this.values.map(r=>r.evaluate(e)).flat(1/0).filter(r=>r!==void 0);return t.forEach((r,i)=>{r._next=i0?i-1:t.length-1}),t}}const dM=n=>{let e={};return rM.forEach(t=>{if(n[t]!==void 0){const r=n[t];e[t]=r,delete n[t]}}),e};class pM{constructor(){I(this,"midiAccess",null);I(this,"midiOutputs",[]);I(this,"currentOutputIndex",0);I(this,"scheduledNotes",{});this.initializeMidiAccess()}async initializeMidiAccess(){try{this.midiAccess=await navigator.requestMIDIAccess(),this.midiOutputs=Array.from(this.midiAccess.outputs.values()),this.midiOutputs.length===0&&(console.warn("No MIDI outputs available."),this.currentOutputIndex=-1)}catch(e){console.error("Failed to initialize MIDI:",e)}}getCurrentMidiPort(){return this.midiOutputs.length>0&&this.currentOutputIndex>=0&&this.currentOutputIndex0&&this.currentOutputIndex>=0&&this.currentOutputIndex=this.midiOutputs.length?(console.error(`Invalid MIDI output index. Index must be in the range 0-${this.midiOutputs.length-1}.`),this.currentOutputIndex):e;{const t=this.midiOutputs.findIndex(r=>r.name===e);return t!==-1?t:(console.error(`MIDI output "${e}" not found.`),this.currentOutputIndex)}}listMidiOutputs(){console.log("Available MIDI Outputs:"),this.midiOutputs.forEach((e,t)=>{console.log(`${t+1}. ${e.name}`)})}sendMidiNote(e,t,r,i,a=this.currentOutputIndex,s=void 0){typeof a=="string"&&(a=this.getMidiOutputIndex(a));const o=this.midiOutputs[a];if(e=Math.min(Math.max(e,0),127),o){const l=[144+t,e,r],u=[128+t,e,0];o.send(l),s&&this.sendPitchBend(s,t,a);const d=setTimeout(()=>{o.send(u),s&&this.sendPitchBend(8192,t,a),delete this.scheduledNotes[e]},(i-.02)*1e3);this.scheduledNotes[e]=d}else console.error("MIDI output not available.")}sendSysExMessage(e){const t=this.midiOutputs[this.currentOutputIndex];t?t.send(e):console.error("MIDI output not available.")}sendPitchBend(e,t,r=this.currentOutputIndex){(e<0||e>16383)&&console.error("Invalid pitch bend value. Value must be in the range 0-16383."),(t<0||t>15)&&console.error("Invalid MIDI channel. Channel must be in the range 0-15."),typeof r=="string"&&(r=this.getMidiOutputIndex(r));const i=this.midiOutputs[r];if(i){const a=e&127,s=e>>7&127;i.send([224|t,a,s])}else console.error("MIDI output not available.")}sendProgramChange(e,t){const r=this.midiOutputs[this.currentOutputIndex];r?r.send([192+t,e]):console.error("MIDI output not available.")}sendMidiControlChange(e,t,r){const i=this.midiOutputs[this.currentOutputIndex];i?i.send([176+r,e,t]):console.error("MIDI output not available.")}panic(){const e=this.midiOutputs[this.currentOutputIndex];if(e){for(const t in this.scheduledNotes){const r=this.scheduledNotes[t];clearTimeout(r),e.send([128,parseInt(t),0])}this.scheduledNotes={}}else console.error("MIDI output not available.")}}class fM{constructor(e,t,r){I(this,"min");I(this,"max");I(this,"wrap");I(this,"position");this.min=e,this.max=t,this.wrap=r,this.position=0}step(){const e=Math.floor(Math.random()*3)-1;this.position+=e,this.wrap?this.position>this.max?this.position=this.min:this.positionthis.max&&(this.position=this.max)}getPosition(){return this.position}toggleWrap(e){this.wrap=e}}const hM={major:[0,2,4,5,7,9,11],naturalMinor:[0,2,3,5,7,8,10],harmonicMinor:[0,2,3,5,7,8,11],melodicMinor:[0,2,3,5,7,9,11],dorian:[0,2,3,5,7,9,10],phrygian:[0,1,3,5,7,8,10],lydian:[0,2,4,6,7,9,11],mixolydian:[0,2,4,5,7,9,10],aeolian:[0,2,3,5,7,8,10],locrian:[0,1,3,5,6,8,10],wholeTone:[0,2,4,6,8,10],majorPentatonic:[0,2,4,7,9],minorPentatonic:[0,3,5,7,10],chromatic:[0,1,2,3,4,5,6,7,8,9,10,11],blues:[0,3,5,6,7,10],diminished:[0,2,3,5,6,8,9,11],neapolitanMinor:[0,1,3,5,7,8,11],neapolitanMajor:[0,1,3,5,7,9,11],enigmatic:[0,1,4,6,8,10,11],doubleHarmonic:[0,1,4,5,7,8,11],octatonic:[0,2,3,5,6,8,9,11],bebopDominant:[0,2,4,5,7,9,10,11],bebopMajor:[0,2,4,5,7,8,9,11],bebopMinor:[0,2,3,5,7,8,9,11],bebopDorian:[0,2,3,4,5,7,9,10],harmonicMajor:[0,2,4,5,7,8,11],hungarianMinor:[0,2,3,6,7,8,11],hungarianMajor:[0,3,4,6,7,9,10],oriental:[0,1,4,5,6,9,10],romanianMinor:[0,2,3,6,7,9,10],spanishGypsy:[0,1,4,5,7,8,10],jewish:[0,1,4,5,7,8,10],hindu:[0,2,4,5,7,8,10],japanese:[0,1,5,7,8],hirajoshi:[0,2,3,7,8],kumoi:[0,2,3,7,9],inSen:[0,1,5,7,10],iwato:[0,1,5,6,10],yo:[0,2,5,7,9],minorBlues:[0,3,5,6,7,10],algerian:[0,2,3,5,6,7,8,11],augmented:[0,3,4,7,8,11],balinese:[0,1,3,7,8],byzantine:[0,1,4,5,7,8,11],chinese:[0,4,6,7,11],egyptian:[0,2,5,7,10],eightToneSpanish:[0,1,3,4,5,6,8,10],hawaiian:[0,2,3,5,7,9,10],hindustan:[0,2,4,5,7,8,10],persian:[0,1,4,5,6,8,11],eastIndianPurvi:[0,1,4,6,7,8,11],orientalA:[0,1,4,5,6,9,10]};function mM(n,e="major",t=4){const r=hM[e];if(!r)throw new Error(`Unknown scale ${e}`);let i=n%r.length;i<0&&(i+=r.length);let a=Math.floor(n/r.length);return 60+(t+a)*12+r[i]}class km{constructor(e){I(this,"seedValue");I(this,"randomGen",Math.random);I(this,"app");I(this,"values",{});I(this,"odds",(e,t)=>this.randomGen()this.odds(.025,e));I(this,"rarely",e=>this.odds(.1,e));I(this,"scarcely",e=>this.odds(.25,e));I(this,"sometimes",e=>this.odds(.5,e));I(this,"often",e=>this.odds(.75,e));I(this,"frequently",e=>this.odds(.9,e));I(this,"almostAlways",e=>this.odds(.985,e));I(this,"modify",e=>e(this));I(this,"seed",e=>(this.seedValue=e.toString(),this.randomGen=this.app.api.localSeededRandom(this.seedValue),this));I(this,"clear",()=>(this.app.api.clearLocalSeed(this.seedValue),this));I(this,"apply",e=>this.modify(e));I(this,"duration",e=>(this.values.duration=e,this));this.app=e,this.app.api.currentSeed&&(this.randomGen=this.app.api.randomGen)}}class Gy extends km{constructor(t){super(t);I(this,"octave",t=>(this.values.octave=t,this.update(),this));I(this,"key",t=>(this.values.key=t,this.update(),this));I(this,"scale",t=>(Dm(t)?(this.values.scaleName=t,this.values.parsedScale=Zi(t)):this.values.parsedScale=wm(t),this.update(),this));I(this,"freq",t=>{this.values.freq=t;const r=zk(t);return r%1!==0?(this.values.note=Math.floor(r),this.values.bend=Uy(r)[1]):this.values.note=r,this});I(this,"update",()=>{})}}const Ml=class Ml{constructor(){I(this,"_fallbackMethod",()=>this);I(this,"out",()=>{})}};I(Ml,"createRestProxy",()=>{const e=new Ml;return new Proxy(e,{get(t,r,i){return typeof t[r]>"u"?t._fallbackMethod:t[r]},set(t,r,i,a){return!1}})});let Rl=Ml,Nr=[],_M=(n,e)=>{let t,r=[],i={lc:0,l:e||0,value:n,set(a){i.value=a,i.notify()},get(){return i.lc||i.listen(()=>{})(),i.value},notify(a){t=r;let s=!Nr.length;for(let o=0;o{r===t&&(r=r.slice());let o=r.indexOf(a);~o&&(r.splice(o,2),i.lc--,i.lc||i.off())}},subscribe(a,s){let o=i.listen(a,s);return a(i.value),o},off(){}};return i},gM=(n={})=>{let e=_M(n);return e.setKey=function(t,r){typeof r>"u"?t in e.value&&(e.value={...e.value},delete e.value[t],e.notify(t)):e.value[t]!==r&&(e.value={...e.value,[t]:r},e.notify(t))},e};if(typeof DelayNode<"u"){class n extends DelayNode{constructor(t,r,i,a){super(t),r=Math.abs(r),this.delayTime.value=i;const s=t.createGain();s.gain.value=Math.min(Math.abs(a),.995),this.feedback=s.gain;const o=t.createGain();return o.gain.value=r,this.delayGain=o,this.connect(s),this.connect(o),s.connect(this),this.connect=l=>o.connect(l),this}start(t){this.delayGain.gain.setValueAtTime(this.delayGain.gain.value,t+this.delayTime.value)}}AudioContext.prototype.createFeedbackDelay=function(e,t,r){return new n(this,e,t,r)}}typeof AudioContext<"u"&&(AudioContext.prototype.impulseResponse=function(n,e=1){const t=this.sampleRate*n,r=this.createBuffer(e,t,this.sampleRate),i=r.getChannelData(0);for(let a=0;a(e.buffer=this.impulseResponse(t),e.duration=n,e),e.setDuration(n),e});var YS={a:{freqs:[660,1120,2750,3e3,3350],gains:[1,.5012,.0708,.0631,.0126],qs:[80,90,120,130,140]},e:{freqs:[440,1800,2700,3e3,3300],gains:[1,.1995,.1259,.1,.1],qs:[70,80,100,120,120]},i:{freqs:[270,1850,2900,3350,3590],gains:[1,.0631,.0631,.0158,.0158],qs:[40,90,100,120,120]},o:{freqs:[430,820,2700,3e3,3300],gains:[1,.3162,.0501,.0794,.01995],qs:[40,80,100,120,120]},u:{freqs:[370,630,2750,3e3,3400],gains:[1,.1,.0708,.0316,.01995],qs:[40,60,100,120,120]}};if(typeof GainNode<"u"){class n extends GainNode{constructor(t,r){if(super(t),!YS[r])throw new Error("vowel: unknown vowel "+r);const{gains:i,qs:a,freqs:s}=YS[r],o=t.createGain();for(let l=0;l<5;l++){const u=t.createGain();u.gain.value=i[l];const d=t.createBiquadFilter();d.type="bandpass",d.Q.value=a[l],d.frequency.value=s[l],this.connect(d),d.connect(u),u.connect(o)}return o.gain.value=8,this.connect=l=>o.connect(l),this}}AudioContext.prototype.createVowelFilter=function(e){return new n(this,e)}}const SM=n=>{var i;if(typeof n!="string")return[];const[e,t="",r]=((i=n.match(/^([a-gA-G])([#bsf]*)([0-9]*)$/))==null?void 0:i.slice(1))||[];return e?[e,t,r?Number(r):void 0]:[]},OM={c:0,d:2,e:4,f:5,g:7,a:9,b:11},EM={"#":1,b:-1,s:1,f:-1},Mm=(n,e=3)=>{const[t,r,i=e]=SM(n);if(!t)throw new Error('not a note: "'+n+'"');const a=OM[t.toLowerCase()],s=(r==null?void 0:r.split("").reduce((o,l)=>o+EM[l],0))||0;return(Number(i)+1)*12+a+s},bM=n=>Math.pow(2,(n-69)/12)*440,TM=(n,e,t)=>Math.min(Math.max(n,e),t),CM=n=>12*Math.log(n/440)/Math.LN2+69,vM=(n,e)=>{if(typeof n!="object")throw new Error("valueToMidi: expected object value");let{freq:t,note:r}=n;if(typeof t=="number")return CM(t);if(typeof r=="string")return Mm(r);if(typeof r=="number")return r;if(!e)throw new Error("valueToMidi: expected freq or note to be set");return e},yM="data:application/javascript;base64,Ly8gTElDRU5TRSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2My4wIHNlZSBodHRwczovL2dpdGh1Yi5jb20vZGt0cjAvV2ViRGlydC9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zBdOwogICAgY29uc3Qgc2hhcGUxID0gc2hhcGUwIDwgMSA/IHNoYXBlMCA6IDEuMCAtIDRlLTEwOwogICAgY29uc3Qgc2hhcGUgPSAoMi4wICogc2hhcGUxKSAvICgxLjAgLSBzaGFwZTEpOwogICAgY29uc3QgYmxvY2tTaXplID0gMTI4OwogICAgY29uc3QgaGFzSW5wdXQgPSAhKGlucHV0WzBdID09PSB1bmRlZmluZWQpOwogICAgaWYgKGhhc0lucHV0KSB7CiAgICAgIHRoaXMubm90U3RhcnRlZCA9IGZhbHNlOwogICAgICBmb3IgKGxldCBuID0gMDsgbiA8IGJsb2NrU2l6ZTsgbisrKSB7CiAgICAgICAgY29uc3QgdmFsdWUgPSAoKDEgKyBzaGFwZSkgKiBpbnB1dFswXVtuXSkgLyAoMSArIHNoYXBlICogTWF0aC5hYnMoaW5wdXRbMF1bbl0pKTsKICAgICAgICBmb3IgKGxldCBvID0gMDsgbyA8IG91dHB1dC5sZW5ndGg7IG8rKykgewogICAgICAgICAgb3V0cHV0W29dW25dID0gdmFsdWU7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQoKcmVnaXN0ZXJQcm9jZXNzb3IoJ3NoYXBlLXByb2Nlc3NvcicsIFNoYXBlUHJvY2Vzc29yKTsK";function Il(n){const e=Gr().createGain();return e.gain.value=n,e}const AM=({s:n,freq:e,t})=>{const r=Gr().createOscillator();return r.type=n||"triangle",r.frequency.value=Number(e),r.start(t),{node:r,stop:i=>r.stop(i)}},Qy=(n,e,t,r,i,a)=>{const s=Gr().createGain();return s.gain.setValueAtTime(0,a),s.gain.linearRampToValueAtTime(i,a+n),s.gain.linearRampToValueAtTime(t*i,a+n+e),{node:s,stop:o=>{s.gain.setValueAtTime(t*i,o),s.gain.linearRampToValueAtTime(0,o+r)}}},Yc=(n,e,t)=>{const r=Gr().createBiquadFilter();return r.type=n,r.frequency.value=e,r.Q.value=t,r};let RM=n=>console.log(n);const Ya=(...n)=>RM(...n),Pm=gM();function $y(n,e,t={}){Pm.setKey(n,{onTrigger:e,data:t})}function GS(n){return Pm.get()[n]}let Gc;const Gr=()=>(Gc||(Gc=new AudioContext),Gc);let Io;const Bm=()=>{const n=Gr();return Io||(Io=n.createGain(),Io.connect(n.destination)),Io};let Qc;function IM(){return Qc||(Qc=Gr().audioWorklet.addModule(yM),Qc)}function $c(n,e,t){const r=new AudioWorkletNode(n,e);return Object.entries(t).forEach(([i,a])=>{r.parameters.get(i).value=a}),r}async function NM(n={}){const{disableWorklets:e=!1}=n;typeof window<"u"&&(await Gr().resume(),e?console.log("disableWorklets: AudioWorklet effects coarse, crush and shape are skipped!"):await IM().catch(t=>{console.warn("could not load AudioWorklet effects coarse, crush and shape",t)}))}async function DM(n){return new Promise(e=>{document.addEventListener("click",async function t(){await NM(n),e(),document.removeEventListener("click",t)})})}let xi={};function wM(n,e,t,r){var i;if(t=TM(t,0,.98),!xi[n]){const a=Gr().createFeedbackDelay(1,e,t);(i=a.start)==null||i.call(a,r),a.connect(Bm()),xi[n]=a}return xi[n].delayTime.value!==e&&xi[n].delayTime.setValueAtTime(e,r),xi[n].feedback.value!==t&&xi[n].feedback.setValueAtTime(t,r),xi[n]}let Li={};function xM(n,e=2){if(!Li[n]){const t=Gr().createReverb(e);t.connect(Bm()),Li[n]=t}return Li[n].duration!==e&&(Li[n]=Li[n].setDuration(e),Li[n].duration=e),Li[n]}function QS(n,e,t){const r=Il(t);return n.connect(r),r.connect(e),r}const LM=async(n,e,t)=>{const r=Gr();if(typeof n!="object")throw new Error(`expected hap.value to be an object, but got "${n}". Hint: append .note() or .s() to the end`,"error");let i=r.currentTime+e,{s:a="triangle",bank:s,source:o,gain:l=.8,cutoff:u,resonance:d=1,hcutoff:f,hresonance:m=1,bandf:g,bandq:b=1,coarse:v,crush:y,shape:N,pan:F,vowel:X,delay:p=0,delayfeedback:E=.5,delaytime:O=.25,orbit:A=1,room:D,size:M=2,velocity:w=1}=n;l*=w;let B=[];const re=()=>{B.forEach(Z=>Z==null?void 0:Z.disconnect())};s&&a&&(a=`${s}_${a}`);let ie;if(o)ie=o(i,n,t);else if(GS(a)){const{onTrigger:Z}=GS(a),z=await Z(i,n,re);z&&(ie=z.node,z.stop(i+t))}else throw new Error(`sound ${a} not found! Is it loaded?`);if(!ie)return;if(r.currentTime>i){Ya("[webaudio] skip hap: still loading",r.currentTime-i);return}const j=[];if(j.push(ie),j.push(Il(l)),u!==void 0&&j.push(Yc("lowpass",u,d)),f!==void 0&&j.push(Yc("highpass",f,m)),g!==void 0&&j.push(Yc("bandpass",g,b)),X!==void 0&&j.push(r.createVowelFilter(X)),v!==void 0&&j.push($c(r,"coarse-processor",{coarse:v})),y!==void 0&&j.push($c(r,"crush-processor",{crush:y})),N!==void 0&&j.push($c(r,"shape-processor",{shape:N})),F!==void 0){const Z=r.createStereoPanner();Z.pan.value=2*F-1,j.push(Z)}const J=Il(1);j.push(J),J.connect(Bm());let L;if(p>0&&O>0&&E>0){const Z=wM(A,O,E,i);L=QS(J,Z,p)}let G;if(D>0&&M>0){const Z=xM(A,M);G=QS(J,Z,D)}j.slice(1).reduce((Z,z)=>Z.connect(z),j[0]),B=j.concat([L,G])},qc={};function kM(n,e){var t=e?1e3:1024;if(n=t);return n.toFixed(1)+" "+r[i]}const MM=async(n,e,t,r,i,a,s)=>{let o=0;i!==void 0&&t!==void 0&&Ya("[sampler] hap has note and freq. ignoring note","warning");let l=vM({freq:i,note:t},36);o=l-36;const u=Gr();let d;if(Array.isArray(a))d=a[e%a.length];else{const b=y=>Mm(y)-l,v=Object.keys(a).filter(y=>!y.startsWith("_")).reduce((y,N,F)=>!y||Math.abs(b(N)){const i=t?`sound "${t}:${r}"`:"sample";if(!qc[n]){Ya(`[sampler] load ${i}..`,"load-sample",{url:n});const a=Date.now();qc[n]=fetch(n).then(s=>s.arrayBuffer()).then(async s=>{const o=Date.now()-a,l=kM(s.byteLength);return Ya(`[sampler] load ${i}... done! loaded ${l} in ${o}ms`,"loaded-sample",{url:n}),await e.decodeAudioData(s)})}return qc[n]};function BM(n){const e=Gr(),t=e.createBuffer(n.numberOfChannels,n.length,e.sampleRate);for(let r=0;rObject.entries(n).forEach(([r,i])=>{if(typeof i=="string"&&(i=[i]),typeof i!="object")throw new Error("wrong sample map format for "+r);t=i._base||t;const a=s=>(t+s).replace("github:","https://raw.githubusercontent.com/");Array.isArray(i)?i=i.map(a):i=Object.fromEntries(Object.entries(i).map(([s,o])=>[s,(typeof o=="string"?[o]:o).map(a)])),e(r,i)});let FM={};function YM(n){const e=Object.entries(FM).find(([t])=>n.startsWith(t));if(e)return e[1]}const Nl=async(n,e=n._base||"",t={})=>{if(typeof n=="string"){const a=YM(n);if(a)return a(n);if(n.startsWith("github:")){let[o,l]=n.split("github:");l=l.endsWith("/")?l.slice(0,-1):l,n=`https://raw.githubusercontent.com/${l}/strudel.json`}if(typeof fetch!="function")return;const s=n.split("/").slice(0,-1).join("/");return typeof fetch>"u"?void 0:fetch(n).then(o=>o.json()).then(o=>Nl(o,e||o._base||s,t)).catch(o=>{throw console.error(o),new Error(`error loading "${n}"`)})}const{prebake:r,tag:i}=t;UM(n,(a,s)=>$y(a,(o,l,u)=>GM(o,l,u,s),{type:"sample",samples:s,baseUrl:e,prebake:r,tag:i}),e)},$S=[];async function GM(n,e,t,r,i){const{s:a,freq:s,unit:o,nudge:l=0,cut:u,loop:d,clip:f=void 0,n:m=0,note:g,speed:b=1,begin:v=0,end:y=1}=e;if(b===0)return;const N=Gr(),{attack:F=.001,decay:X=.001,sustain:p=1,release:E=.001}=e,O=n+l,A=await MM(a,m,g,b,s,r,i);if(N.currentTime>n){Ya(`[sampler] still loading sound "${a}:${m}"`,"highlight");return}if(!A){Ya(`[sampler] could not load "${a}:${m}"`,"error");return}A.playbackRate.value=Math.abs(b)*A.playbackRate.value,o==="c"&&(A.playbackRate.value=A.playbackRate.value*A.buffer.duration*1);const D=v*A.buffer.duration;A.start(O,D);const M=A.buffer.duration/A.playbackRate.value,{node:w,stop:B}=Qy(F,X,p,E,1,n);A.connect(w);const re=N.createGain();w.connect(re),A.onended=function(){A.disconnect(),w.disconnect(),re.disconnect(),t()};const ie={node:re,bufferSource:A,stop:(j,J=f===void 0)=>{let L=j;J&&(L=n+(y-v)*M),A.stop(L+E),B(L)}};if(u!==void 0){const j=$S[u];j&&(j.node.gain.setValueAtTime(1,O),j.node.gain.linearRampToValueAtTime(0,O+.01)),$S[u]=ie}return ie}const QM=(n,e=1,t="sine")=>{const r=Gr(),i=r.createOscillator();i.type=t,i.frequency.value=n,i.start();const a=new GainNode(r,{gain:e});return i.connect(a),{node:a,stop:s=>i.stop(s)}},$M=(n,e,t,r="sine")=>{const i=n.frequency.value*e,a=i*t;return QM(i,a,r)};function qM(){["sine","square","triangle","sawtooth"].forEach(n=>{$y(n,(e,t,r)=>{const{attack:i=.001,decay:a=.05,sustain:s=.6,release:o=.01,fmh:l=1,fmi:u}=t;let{n:d,note:f,freq:m}=t;d=f||d||36,typeof d=="string"&&(d=Mm(d)),!m&&typeof d=="number"&&(m=bM(d));const{node:g,stop:b}=AM({t:e,s:n,freq:m});let v;if(u){const{node:X,stop:p}=$M(g,l,u);X.connect(g.frequency),v=p}const y=Il(.3),{node:N,stop:F}=Qy(i,a,s,o,1,e);return g.onended=()=>{g.disconnect(),y.disconnect(),r()},{node:g.connect(y).connect(N),stop:X=>{F(X);let p=X+o;b(p),v==null||v(p)}}},{type:"synth",prebake:!0})})}class qy extends Gy{constructor(t,r){super(r);I(this,"attack",t=>(this.values.attack=t,this));I(this,"atk",this.attack);I(this,"decay",t=>(this.values.decay=t,this));I(this,"dec",this.decay);I(this,"release",t=>(this.values.release=t,this));I(this,"rel",this.release);I(this,"unit",t=>(this.values.unit=t,this));I(this,"freq",t=>(this.values.freq=t,this));I(this,"fm",t=>{if(typeof t=="number")this.values.fmi=t;else{let r=t.split(":");this.values.fmi=parseFloat(r[0]),r.length>1&&(this.values.fmh=parseFloat(r[1]))}return this});I(this,"sound",t=>(this.values.s=t,this));I(this,"fmi",t=>(this.values.fmi=t,this));I(this,"fmh",t=>(this.values.fmh=t,this));I(this,"nudge",t=>(this.values.nudge=t,this));I(this,"cut",t=>(this.values.cut=t,this));I(this,"loop",t=>(this.values.loop=t,this));I(this,"clip",t=>(this.values.clip=t,this));I(this,"n",t=>(this.values.n=t,this));I(this,"note",t=>(this.values.note=t,this));I(this,"speed",t=>(this.values.speed=t,this));I(this,"begin",t=>(this.values.begin=t,this));I(this,"end",t=>(this.values.end=t,this));I(this,"gain",t=>(this.values.gain=t,this));I(this,"cutoff",t=>(this.values.cutoff=t,this));I(this,"resonance",t=>(this.values.resonance=t,this));I(this,"hcutoff",t=>(this.values.hcutoff=t,this));I(this,"hresonance",t=>(this.values.hresonance=t,this));I(this,"bandf",t=>(this.values.bandf=t,this));I(this,"bandq",t=>(this.values.bandq=t,this));I(this,"coarse",t=>(this.values.coarse=t,this));I(this,"crush",t=>(this.values.crush=t,this));I(this,"shape",t=>(this.values.shape=t,this));I(this,"pan",t=>(this.values.pan=t,this));I(this,"vowel",t=>(this.values.vowel=t,this));I(this,"delay",t=>(this.values.delay=t,this));I(this,"delayfeedback",t=>(this.values.delayfeedback=t,this));I(this,"delaytime",t=>(this.values.delaytime=t,this));I(this,"orbit",t=>(this.values.orbit=t,this));I(this,"room",t=>(this.values.room=t,this));I(this,"size",t=>(this.values.size=t,this));I(this,"velocity",t=>(this.values.velocity=t,this));I(this,"modify",t=>{const r=t(this);return r instanceof Object?r:(t(this.values),this)});I(this,"sustain",t=>(this.values.dur=t,this));I(this,"sus",this.sustain);I(this,"update",()=>{if(this.values.key&&this.values.pitch&&this.values.parsedScale&&this.values.octave){const[t,r]=xm(this.values.key,this.values.pitch,this.values.parsedScale,this.values.octave);this.values.freq=Ps(t)}});I(this,"out",()=>LM(this.values,this.app.clock.pulse_duration,this.values.dur));this.app=r,typeof t=="string"?this.values={s:t,dur:.5}:this.values=t}}class Vy extends Gy{constructor(t,r){super(r);I(this,"midiConnection");I(this,"note",t=>(this.values.note=t,this));I(this,"sustain",t=>(this.values.sustain=t,this));I(this,"channel",t=>(this.values.channel=t,this));I(this,"port",t=>(this.values.port=this.midiConnection.getMidiOutputIndex(t),this));I(this,"add",t=>(this.values.note+=t,this));I(this,"modify",t=>{const r=t(this);return r instanceof Object?r:(t(this.values),this)});I(this,"bend",t=>(this.values.bend=t,this));I(this,"random",(t=0,r=127)=>(t=Math.min(Math.max(t,0),127),r=Math.min(Math.max(r,0),127),this.values.note=Math.floor(this.randomGen()*(r-t+1))+t,this));I(this,"update",()=>{if(this.values.key&&this.values.pitch&&this.values.parsedScale&&this.values.octave){const[t,r]=xm(this.values.key,this.values.pitch,this.values.parsedScale,this.values.octave);this.values.note=t,this.values.freq=Ps(t),r&&(this.values.bend=r)}});I(this,"out",()=>{const t=this.values.note?this.values.note:60,r=this.values.channel?this.values.channel:0,i=this.values.velocity?this.values.velocity:100,a=this.values.sustain?this.values.sustain*this.app.clock.pulse_duration*this.app.api.ppqn():this.app.clock.pulse_duration*this.app.api.ppqn(),s=this.values.bend?this.values.bend:void 0,o=this.values.port?this.midiConnection.getMidiOutputIndex(this.values.port):this.midiConnection.getCurrentMidiPortIndex();this.midiConnection.sendMidiNote(t,r,i,a,o,s)});this.app=r,typeof t=="number"?this.values.note=t:this.values=t,this.midiConnection=r.api.MidiConnection}}const ss=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Hy=new Set,wh=typeof process=="object"&&process?process:{},zy=(n,e,t,r)=>{typeof wh.emitWarning=="function"?wh.emitWarning(n,e,t,r):console.error(`[${t}] ${e}: ${n}`)};let Dl=globalThis.AbortController,qS=globalThis.AbortSignal;var DT;if(typeof Dl>"u"){qS=class{constructor(){I(this,"onabort");I(this,"_onabort",[]);I(this,"reason");I(this,"aborted",!1)}addEventListener(r,i){this._onabort.push(i)}},Dl=class{constructor(){I(this,"signal",new qS);e()}abort(r){var i,a;if(!this.signal.aborted){this.signal.reason=r,this.signal.aborted=!0;for(const s of this.signal._onabort)s(r);(a=(i=this.signal).onabort)==null||a.call(i,r)}}};let n=((DT=wh.env)==null?void 0:DT.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{n&&(n=!1,zy("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const VM=n=>!Hy.has(n),ci=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),Wy=n=>ci(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Vo:null:null;class Vo extends Array{constructor(e){super(e),this.fill(0)}}var va;const Pi=class Pi{constructor(e,t){I(this,"heap");I(this,"length");if(!Q(Pi,va))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}static create(e){const t=Wy(e);if(!t)return[];Qe(Pi,va,!0);const r=new Pi(e,t);return Qe(Pi,va,!1),r}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};va=new WeakMap,tt(Pi,va,!1);let xh=Pi;var _n,Hr,gn,Sn,ya,Kt,On,jt,xt,et,Dr,zr,Sr,sr,En,or,Hn,zn,bn,Tn,mi,wr,Fs,kh,Gi,Wn,Ys,Wr,Pl,Xy,Qi,Aa,Gs,xn,ui,Ln,di,Qs,Mh,Ra,Ho,Ia,zo,At,Mt,$s,Ph,$i,fs;const Qm=class Qm{constructor(e){tt(this,Fs);tt(this,Pl);tt(this,xn);tt(this,Ln);tt(this,Qs);tt(this,Ra);tt(this,Ia);tt(this,At);tt(this,$s);tt(this,$i);tt(this,_n,void 0);tt(this,Hr,void 0);tt(this,gn,void 0);tt(this,Sn,void 0);tt(this,ya,void 0);I(this,"ttl");I(this,"ttlResolution");I(this,"ttlAutopurge");I(this,"updateAgeOnGet");I(this,"updateAgeOnHas");I(this,"allowStale");I(this,"noDisposeOnSet");I(this,"noUpdateTTL");I(this,"maxEntrySize");I(this,"sizeCalculation");I(this,"noDeleteOnFetchRejection");I(this,"noDeleteOnStaleGet");I(this,"allowStaleOnFetchAbort");I(this,"allowStaleOnFetchRejection");I(this,"ignoreFetchAbort");tt(this,Kt,void 0);tt(this,On,void 0);tt(this,jt,void 0);tt(this,xt,void 0);tt(this,et,void 0);tt(this,Dr,void 0);tt(this,zr,void 0);tt(this,Sr,void 0);tt(this,sr,void 0);tt(this,En,void 0);tt(this,or,void 0);tt(this,Hn,void 0);tt(this,zn,void 0);tt(this,bn,void 0);tt(this,Tn,void 0);tt(this,mi,void 0);tt(this,wr,void 0);tt(this,Gi,()=>{});tt(this,Wn,()=>{});tt(this,Ys,()=>{});tt(this,Wr,()=>!1);tt(this,Qi,e=>{});tt(this,Aa,(e,t,r)=>{});tt(this,Gs,(e,t,r,i)=>{if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});const{max:t=0,ttl:r,ttlResolution:i=1,ttlAutopurge:a,updateAgeOnGet:s,updateAgeOnHas:o,allowStale:l,dispose:u,disposeAfter:d,noDisposeOnSet:f,noUpdateTTL:m,maxSize:g=0,maxEntrySize:b=0,sizeCalculation:v,fetchMethod:y,noDeleteOnFetchRejection:N,noDeleteOnStaleGet:F,allowStaleOnFetchRejection:X,allowStaleOnFetchAbort:p,ignoreFetchAbort:E}=e;if(t!==0&&!ci(t))throw new TypeError("max option must be a nonnegative integer");const O=t?Wy(t):Array;if(!O)throw new Error("invalid max value: "+t);if(Qe(this,_n,t),Qe(this,Hr,g),this.maxEntrySize=b||Q(this,Hr),this.sizeCalculation=v,this.sizeCalculation){if(!Q(this,Hr)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(y!==void 0&&typeof y!="function")throw new TypeError("fetchMethod must be a function if specified");if(Qe(this,ya,y),Qe(this,mi,!!y),Qe(this,jt,new Map),Qe(this,xt,new Array(t).fill(void 0)),Qe(this,et,new Array(t).fill(void 0)),Qe(this,Dr,new O(t)),Qe(this,zr,new O(t)),Qe(this,Sr,0),Qe(this,sr,0),Qe(this,En,xh.create(t)),Qe(this,Kt,0),Qe(this,On,0),typeof u=="function"&&Qe(this,gn,u),typeof d=="function"?(Qe(this,Sn,d),Qe(this,or,[])):(Qe(this,Sn,void 0),Qe(this,or,void 0)),Qe(this,Tn,!!Q(this,gn)),Qe(this,wr,!!Q(this,Sn)),this.noDisposeOnSet=!!f,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!N,this.allowStaleOnFetchRejection=!!X,this.allowStaleOnFetchAbort=!!p,this.ignoreFetchAbort=!!E,this.maxEntrySize!==0){if(Q(this,Hr)!==0&&!ci(Q(this,Hr)))throw new TypeError("maxSize must be a positive integer if specified");if(!ci(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");Ue(this,Pl,Xy).call(this)}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!F,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!o,this.ttlResolution=ci(i)||i===0?i:1,this.ttlAutopurge=!!a,this.ttl=r||0,this.ttl){if(!ci(this.ttl))throw new TypeError("ttl must be a positive integer if specified");Ue(this,Fs,kh).call(this)}if(Q(this,_n)===0&&this.ttl===0&&Q(this,Hr)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!Q(this,_n)&&!Q(this,Hr)){const A="LRU_CACHE_UNBOUNDED";VM(A)&&(Hy.add(A),zy("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",A,Qm))}}static unsafeExposeInternals(e){return{starts:Q(e,zn),ttls:Q(e,bn),sizes:Q(e,Hn),keyMap:Q(e,jt),keyList:Q(e,xt),valList:Q(e,et),next:Q(e,Dr),prev:Q(e,zr),get head(){return Q(e,Sr)},get tail(){return Q(e,sr)},free:Q(e,En),isBackgroundFetch:t=>{var r;return Ue(r=e,At,Mt).call(r,t)},backgroundFetch:(t,r,i,a)=>{var s;return Ue(s=e,Ia,zo).call(s,t,r,i,a)},moveToTail:t=>{var r;return Ue(r=e,$i,fs).call(r,t)},indexes:t=>{var r;return Ue(r=e,xn,ui).call(r,t)},rindexes:t=>{var r;return Ue(r=e,Ln,di).call(r,t)},isStale:t=>{var r;return Q(r=e,Wr).call(r,t)}}}get max(){return Q(this,_n)}get maxSize(){return Q(this,Hr)}get calculatedSize(){return Q(this,On)}get size(){return Q(this,Kt)}get fetchMethod(){return Q(this,ya)}get dispose(){return Q(this,gn)}get disposeAfter(){return Q(this,Sn)}getRemainingTTL(e){return Q(this,jt).has(e)?1/0:0}*entries(){for(const e of Ue(this,xn,ui).call(this))Q(this,et)[e]!==void 0&&Q(this,xt)[e]!==void 0&&!Ue(this,At,Mt).call(this,Q(this,et)[e])&&(yield[Q(this,xt)[e],Q(this,et)[e]])}*rentries(){for(const e of Ue(this,Ln,di).call(this))Q(this,et)[e]!==void 0&&Q(this,xt)[e]!==void 0&&!Ue(this,At,Mt).call(this,Q(this,et)[e])&&(yield[Q(this,xt)[e],Q(this,et)[e]])}*keys(){for(const e of Ue(this,xn,ui).call(this)){const t=Q(this,xt)[e];t!==void 0&&!Ue(this,At,Mt).call(this,Q(this,et)[e])&&(yield t)}}*rkeys(){for(const e of Ue(this,Ln,di).call(this)){const t=Q(this,xt)[e];t!==void 0&&!Ue(this,At,Mt).call(this,Q(this,et)[e])&&(yield t)}}*values(){for(const e of Ue(this,xn,ui).call(this))Q(this,et)[e]!==void 0&&!Ue(this,At,Mt).call(this,Q(this,et)[e])&&(yield Q(this,et)[e])}*rvalues(){for(const e of Ue(this,Ln,di).call(this))Q(this,et)[e]!==void 0&&!Ue(this,At,Mt).call(this,Q(this,et)[e])&&(yield Q(this,et)[e])}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const r of Ue(this,xn,ui).call(this)){const i=Q(this,et)[r],a=Ue(this,At,Mt).call(this,i)?i.__staleWhileFetching:i;if(a!==void 0&&e(a,Q(this,xt)[r],this))return this.get(Q(this,xt)[r],t)}}forEach(e,t=this){for(const r of Ue(this,xn,ui).call(this)){const i=Q(this,et)[r],a=Ue(this,At,Mt).call(this,i)?i.__staleWhileFetching:i;a!==void 0&&e.call(t,a,Q(this,xt)[r],this)}}rforEach(e,t=this){for(const r of Ue(this,Ln,di).call(this)){const i=Q(this,et)[r],a=Ue(this,At,Mt).call(this,i)?i.__staleWhileFetching:i;a!==void 0&&e.call(t,a,Q(this,xt)[r],this)}}purgeStale(){let e=!1;for(const t of Ue(this,Ln,di).call(this,{allowStale:!0}))Q(this,Wr).call(this,t)&&(this.delete(Q(this,xt)[t]),e=!0);return e}dump(){const e=[];for(const t of Ue(this,xn,ui).call(this,{allowStale:!0})){const r=Q(this,xt)[t],i=Q(this,et)[t],a=Ue(this,At,Mt).call(this,i)?i.__staleWhileFetching:i;if(a===void 0||r===void 0)continue;const s={value:a};if(Q(this,bn)&&Q(this,zn)){s.ttl=Q(this,bn)[t];const o=ss.now()-Q(this,zn)[t];s.start=Math.floor(Date.now()-o)}Q(this,Hn)&&(s.size=Q(this,Hn)[t]),e.unshift([r,s])}return e}load(e){this.clear();for(const[t,r]of e){if(r.start){const i=Date.now()-r.start;r.start=ss.now()-i}this.set(t,r.value,r)}}set(e,t,r={}){var m,g,b,v,y;if(t===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:a,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:l}=r;let{noUpdateTTL:u=this.noUpdateTTL}=r;const d=Q(this,Gs).call(this,e,t,r.size||0,o);if(this.maxEntrySize&&d>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let f=Q(this,Kt)===0?void 0:Q(this,jt).get(e);if(f===void 0)f=Q(this,Kt)===0?Q(this,sr):Q(this,En).length!==0?Q(this,En).pop():Q(this,Kt)===Q(this,_n)?Ue(this,Ra,Ho).call(this,!1):Q(this,Kt),Q(this,xt)[f]=e,Q(this,et)[f]=t,Q(this,jt).set(e,f),Q(this,Dr)[Q(this,sr)]=f,Q(this,zr)[f]=Q(this,sr),Qe(this,sr,f),io(this,Kt)._++,Q(this,Aa).call(this,f,d,l),l&&(l.set="add"),u=!1;else{Ue(this,$i,fs).call(this,f);const N=Q(this,et)[f];if(t!==N){if(Q(this,mi)&&Ue(this,At,Mt).call(this,N)){N.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:F}=N;F!==void 0&&!s&&(Q(this,Tn)&&((m=Q(this,gn))==null||m.call(this,F,e,"set")),Q(this,wr)&&((g=Q(this,or))==null||g.push([F,e,"set"])))}else s||(Q(this,Tn)&&((b=Q(this,gn))==null||b.call(this,N,e,"set")),Q(this,wr)&&((v=Q(this,or))==null||v.push([N,e,"set"])));if(Q(this,Qi).call(this,f),Q(this,Aa).call(this,f,d,l),Q(this,et)[f]=t,l){l.set="replace";const F=N&&Ue(this,At,Mt).call(this,N)?N.__staleWhileFetching:N;F!==void 0&&(l.oldValue=F)}}else l&&(l.set="update")}if(i!==0&&!Q(this,bn)&&Ue(this,Fs,kh).call(this),Q(this,bn)&&(u||Q(this,Ys).call(this,f,i,a),l&&Q(this,Wn).call(this,l,f)),!s&&Q(this,wr)&&Q(this,or)){const N=Q(this,or);let F;for(;F=N==null?void 0:N.shift();)(y=Q(this,Sn))==null||y.call(this,...F)}return this}pop(){var e;try{for(;Q(this,Kt);){const t=Q(this,et)[Q(this,Sr)];if(Ue(this,Ra,Ho).call(this,!0),Ue(this,At,Mt).call(this,t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(Q(this,wr)&&Q(this,or)){const t=Q(this,or);let r;for(;r=t==null?void 0:t.shift();)(e=Q(this,Sn))==null||e.call(this,...r)}}}has(e,t={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:i}=t,a=Q(this,jt).get(e);if(a!==void 0){const s=Q(this,et)[a];if(Ue(this,At,Mt).call(this,s)&&s.__staleWhileFetching===void 0)return!1;if(Q(this,Wr).call(this,a))i&&(i.has="stale",Q(this,Wn).call(this,i,a));else return r&&Q(this,Gi).call(this,a),i&&(i.has="hit",Q(this,Wn).call(this,i,a)),!0}else i&&(i.has="miss");return!1}peek(e,t={}){const{allowStale:r=this.allowStale}=t,i=Q(this,jt).get(e);if(i!==void 0&&(r||!Q(this,Wr).call(this,i))){const a=Q(this,et)[i];return Ue(this,At,Mt).call(this,a)?a.__staleWhileFetching:a}}async fetch(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:m=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:b=this.allowStaleOnFetchAbort,context:v,forceRefresh:y=!1,status:N,signal:F}=t;if(!Q(this,mi))return N&&(N.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:a,status:N});const X={allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:a,ttl:s,noDisposeOnSet:o,size:l,sizeCalculation:u,noUpdateTTL:d,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:b,ignoreFetchAbort:g,status:N,signal:F};let p=Q(this,jt).get(e);if(p===void 0){N&&(N.fetch="miss");const E=Ue(this,Ia,zo).call(this,e,p,X,v);return E.__returned=E}else{const E=Q(this,et)[p];if(Ue(this,At,Mt).call(this,E)){const w=r&&E.__staleWhileFetching!==void 0;return N&&(N.fetch="inflight",w&&(N.returnedStale=!0)),w?E.__staleWhileFetching:E.__returned=E}const O=Q(this,Wr).call(this,p);if(!y&&!O)return N&&(N.fetch="hit"),Ue(this,$i,fs).call(this,p),i&&Q(this,Gi).call(this,p),N&&Q(this,Wn).call(this,N,p),E;const A=Ue(this,Ia,zo).call(this,e,p,X,v),M=A.__staleWhileFetching!==void 0&&r;return N&&(N.fetch=O?"stale":"refresh",M&&O&&(N.returnedStale=!0)),M?A.__staleWhileFetching:A.__returned=A}}get(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,status:s}=t,o=Q(this,jt).get(e);if(o!==void 0){const l=Q(this,et)[o],u=Ue(this,At,Mt).call(this,l);return s&&Q(this,Wn).call(this,s,o),Q(this,Wr).call(this,o)?(s&&(s.get="stale"),u?(s&&r&&l.__staleWhileFetching!==void 0&&(s.returnedStale=!0),r?l.__staleWhileFetching:void 0):(a||this.delete(e),s&&r&&(s.returnedStale=!0),r?l:void 0)):(s&&(s.get="hit"),u?l.__staleWhileFetching:(Ue(this,$i,fs).call(this,o),i&&Q(this,Gi).call(this,o),l))}else s&&(s.get="miss")}delete(e){var r,i,a,s;let t=!1;if(Q(this,Kt)!==0){const o=Q(this,jt).get(e);if(o!==void 0)if(t=!0,Q(this,Kt)===1)this.clear();else{Q(this,Qi).call(this,o);const l=Q(this,et)[o];Ue(this,At,Mt).call(this,l)?l.__abortController.abort(new Error("deleted")):(Q(this,Tn)||Q(this,wr))&&(Q(this,Tn)&&((r=Q(this,gn))==null||r.call(this,l,e,"delete")),Q(this,wr)&&((i=Q(this,or))==null||i.push([l,e,"delete"]))),Q(this,jt).delete(e),Q(this,xt)[o]=void 0,Q(this,et)[o]=void 0,o===Q(this,sr)?Qe(this,sr,Q(this,zr)[o]):o===Q(this,Sr)?Qe(this,Sr,Q(this,Dr)[o]):(Q(this,Dr)[Q(this,zr)[o]]=Q(this,Dr)[o],Q(this,zr)[Q(this,Dr)[o]]=Q(this,zr)[o]),io(this,Kt)._--,Q(this,En).push(o)}}if(Q(this,wr)&&((a=Q(this,or))!=null&&a.length)){const o=Q(this,or);let l;for(;l=o==null?void 0:o.shift();)(s=Q(this,Sn))==null||s.call(this,...l)}return t}clear(){var e,t,r;for(const i of Ue(this,Ln,di).call(this,{allowStale:!0})){const a=Q(this,et)[i];if(Ue(this,At,Mt).call(this,a))a.__abortController.abort(new Error("deleted"));else{const s=Q(this,xt)[i];Q(this,Tn)&&((e=Q(this,gn))==null||e.call(this,a,s,"delete")),Q(this,wr)&&((t=Q(this,or))==null||t.push([a,s,"delete"]))}}if(Q(this,jt).clear(),Q(this,et).fill(void 0),Q(this,xt).fill(void 0),Q(this,bn)&&Q(this,zn)&&(Q(this,bn).fill(0),Q(this,zn).fill(0)),Q(this,Hn)&&Q(this,Hn).fill(0),Qe(this,Sr,0),Qe(this,sr,0),Q(this,En).length=0,Qe(this,On,0),Qe(this,Kt,0),Q(this,wr)&&Q(this,or)){const i=Q(this,or);let a;for(;a=i==null?void 0:i.shift();)(r=Q(this,Sn))==null||r.call(this,...a)}}};_n=new WeakMap,Hr=new WeakMap,gn=new WeakMap,Sn=new WeakMap,ya=new WeakMap,Kt=new WeakMap,On=new WeakMap,jt=new WeakMap,xt=new WeakMap,et=new WeakMap,Dr=new WeakMap,zr=new WeakMap,Sr=new WeakMap,sr=new WeakMap,En=new WeakMap,or=new WeakMap,Hn=new WeakMap,zn=new WeakMap,bn=new WeakMap,Tn=new WeakMap,mi=new WeakMap,wr=new WeakMap,Fs=new WeakSet,kh=function(){const e=new Vo(Q(this,_n)),t=new Vo(Q(this,_n));Qe(this,bn,e),Qe(this,zn,t),Qe(this,Ys,(a,s,o=ss.now())=>{if(t[a]=s!==0?o:0,e[a]=s,s!==0&&this.ttlAutopurge){const l=setTimeout(()=>{Q(this,Wr).call(this,a)&&this.delete(Q(this,xt)[a])},s+1);l.unref&&l.unref()}}),Qe(this,Gi,a=>{t[a]=e[a]!==0?ss.now():0}),Qe(this,Wn,(a,s)=>{if(e[s]){const o=e[s],l=t[s];a.ttl=o,a.start=l,a.now=r||i();const u=a.now-l;a.remainingTTL=o-u}});let r=0;const i=()=>{const a=ss.now();if(this.ttlResolution>0){r=a;const s=setTimeout(()=>r=0,this.ttlResolution);s.unref&&s.unref()}return a};this.getRemainingTTL=a=>{const s=Q(this,jt).get(a);if(s===void 0)return 0;const o=e[s],l=t[s];if(o===0||l===0)return 1/0;const u=(r||i())-l;return o-u},Qe(this,Wr,a=>e[a]!==0&&t[a]!==0&&(r||i())-t[a]>e[a])},Gi=new WeakMap,Wn=new WeakMap,Ys=new WeakMap,Wr=new WeakMap,Pl=new WeakSet,Xy=function(){const e=new Vo(Q(this,_n));Qe(this,On,0),Qe(this,Hn,e),Qe(this,Qi,t=>{Qe(this,On,Q(this,On)-e[t]),e[t]=0}),Qe(this,Gs,(t,r,i,a)=>{if(Ue(this,At,Mt).call(this,r))return 0;if(!ci(i))if(a){if(typeof a!="function")throw new TypeError("sizeCalculation must be a function");if(i=a(r,t),!ci(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),Qe(this,Aa,(t,r,i)=>{if(e[t]=r,Q(this,Hr)){const a=Q(this,Hr)-e[t];for(;Q(this,On)>a;)Ue(this,Ra,Ho).call(this,!0)}Qe(this,On,Q(this,On)+e[t]),i&&(i.entrySize=r,i.totalCalculatedSize=Q(this,On))})},Qi=new WeakMap,Aa=new WeakMap,Gs=new WeakMap,xn=new WeakSet,ui=function*({allowStale:e=this.allowStale}={}){if(Q(this,Kt))for(let t=Q(this,sr);!(!Ue(this,Qs,Mh).call(this,t)||((e||!Q(this,Wr).call(this,t))&&(yield t),t===Q(this,Sr)));)t=Q(this,zr)[t]},Ln=new WeakSet,di=function*({allowStale:e=this.allowStale}={}){if(Q(this,Kt))for(let t=Q(this,Sr);!(!Ue(this,Qs,Mh).call(this,t)||((e||!Q(this,Wr).call(this,t))&&(yield t),t===Q(this,sr)));)t=Q(this,Dr)[t]},Qs=new WeakSet,Mh=function(e){return e!==void 0&&Q(this,jt).get(Q(this,xt)[e])===e},Ra=new WeakSet,Ho=function(e){var a,s;const t=Q(this,Sr),r=Q(this,xt)[t],i=Q(this,et)[t];return Q(this,mi)&&Ue(this,At,Mt).call(this,i)?i.__abortController.abort(new Error("evicted")):(Q(this,Tn)||Q(this,wr))&&(Q(this,Tn)&&((a=Q(this,gn))==null||a.call(this,i,r,"evict")),Q(this,wr)&&((s=Q(this,or))==null||s.push([i,r,"evict"]))),Q(this,Qi).call(this,t),e&&(Q(this,xt)[t]=void 0,Q(this,et)[t]=void 0,Q(this,En).push(t)),Q(this,Kt)===1?(Qe(this,Sr,Qe(this,sr,0)),Q(this,En).length=0):Qe(this,Sr,Q(this,Dr)[t]),Q(this,jt).delete(r),io(this,Kt)._--,t},Ia=new WeakSet,zo=function(e,t,r,i){const a=t===void 0?void 0:Q(this,et)[t];if(Ue(this,At,Mt).call(this,a))return a;const s=new Dl,{signal:o}=r;o==null||o.addEventListener("abort",()=>s.abort(o.reason),{signal:s.signal});const l={signal:s.signal,options:r,context:i},u=(v,y=!1)=>{const{aborted:N}=s.signal,F=r.ignoreFetchAbort&&v!==void 0;if(r.status&&(N&&!y?(r.status.fetchAborted=!0,r.status.fetchError=s.signal.reason,F&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),N&&!F&&!y)return f(s.signal.reason);const X=g;return Q(this,et)[t]===g&&(v===void 0?X.__staleWhileFetching?Q(this,et)[t]=X.__staleWhileFetching:this.delete(e):(r.status&&(r.status.fetchUpdated=!0),this.set(e,v,l.options))),v},d=v=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=v),f(v)),f=v=>{const{aborted:y}=s.signal,N=y&&r.allowStaleOnFetchAbort,F=N||r.allowStaleOnFetchRejection,X=F||r.noDeleteOnFetchRejection,p=g;if(Q(this,et)[t]===g&&(!X||p.__staleWhileFetching===void 0?this.delete(e):N||(Q(this,et)[t]=p.__staleWhileFetching)),F)return r.status&&p.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw v},m=(v,y)=>{var F;const N=(F=Q(this,ya))==null?void 0:F.call(this,e,a,l);N&&N instanceof Promise&&N.then(X=>v(X===void 0?void 0:X),y),s.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(v(void 0),r.allowStaleOnFetchAbort&&(v=X=>u(X,!0)))})};r.status&&(r.status.fetchDispatched=!0);const g=new Promise(m).then(u,d),b=Object.assign(g,{__abortController:s,__staleWhileFetching:a,__returned:void 0});return t===void 0?(this.set(e,b,{...l.options,status:void 0}),t=Q(this,jt).get(e)):Q(this,et)[t]=b,b},At=new WeakSet,Mt=function(e){if(!Q(this,mi))return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof Dl},$s=new WeakSet,Ph=function(e,t){Q(this,zr)[t]=e,Q(this,Dr)[e]=t},$i=new WeakSet,fs=function(e){e!==Q(this,sr)&&(e===Q(this,Sr)?Qe(this,Sr,Q(this,Dr)[e]):Ue(this,$s,Ph).call(this,Q(this,zr)[e],Q(this,Dr)[e]),Ue(this,$s,Ph).call(this,Q(this,sr),e),Qe(this,sr,e))};let Lh=Qm;const Bl=class Bl extends km{constructor(t,r){super(r);I(this,"_fallbackMethod",()=>this);I(this,"out",()=>{});this.values.duration=t}};I(Bl,"createRestProxy",(t,r)=>{const i=new Bl(t,r);return new Proxy(i,{get(a,s,o){return typeof a[s]>"u"?a._fallbackMethod:a[s]},set(a,s,o,l){return!1}})});let wl=Bl;class HM extends km{constructor(t,r,i){super(i);I(this,"input");I(this,"ziffers");I(this,"callTime",0);I(this,"played",!1);I(this,"current");I(this,"retro",!1);I(this,"tick",0);I(this,"next",()=>(this.current=this.ziffers.next(),this.played=!0,this.current));I(this,"areWeThereYet",()=>{const t=this.ziffers.notStarted()||this.app.api.epulse()>this.callTime+this.current.duration*this.app.api.ppqn();return t?this.tick=0:this.tick++,t});I(this,"out",()=>{});this.app=i,this.input=t,this.ziffers=new uM(t,r)}sound(t){if(this.areWeThereYet()){const r=this.next();if(r instanceof Ki){const i=r.getExisting("freq","pitch","key","scale","octave");return new qy(i,this.app).sound(t)}else if(r instanceof Dh)return wl.createRestProxy(r.duration,this.app)}else return Rl.createRestProxy()}note(t=void 0){if(this.areWeThereYet()){const r=this.next();if(r instanceof Ki){const i=r.getExisting("note","pitch","bend","key","scale","octave"),a=new Vy(i,this.app);return t?a.note(t):a}else if(r instanceof Dh)return wl.createRestProxy(r.duration,this.app)}else return Rl.createRestProxy()}scale(t){return this.ziffers.scale(t),this}key(t){return this.ziffers.key(t),this}octave(t){return this.ziffers.octave(t),this}retrograde(){return this.tick===0&&this.ziffers.index===0&&this.ziffers.retrograde(),this}}Array.prototype.palindrome=function(n){let e=Array.from(this),t=Array.from(this.reverse());return e.concat(t)};Array.prototype.random=function(n){return this[Math.floor(Math.random()*this.length)]};Array.prototype.loop=function(n){return this[n%this.length]};Array.prototype.rand=Array.prototype.random;Array.prototype.in=function(n){return this.includes(n)};async function zM(){return Promise.all([DM(),Nl("github:Bubobubobubobubo/Topos-Samples/main"),Nl("github:tidalcycles/Dirt-Samples/master").then(()=>qM())])}zM();const WM=(...n)=>n.map(e=>JSON.stringify(e)).join(",");class XM{constructor(e){I(this,"variables",{});I(this,"counters",{});I(this,"_drunk",new fM(-100,100,!1));I(this,"randomGen",Math.random);I(this,"currentSeed");I(this,"localSeeds",new Map);I(this,"patternCache",new Lh({max:1e3,ttl:1e3*60*5}));I(this,"errorTimeoutID",0);I(this,"MidiConnection",new pM);I(this,"load");I(this,"_reportError",e=>{console.log(e),clearTimeout(this.errorTimeoutID),this.app.error_line.innerHTML=e,this.app.error_line.classList.remove("hidden"),this.errorTimeoutID=setTimeout(()=>this.app.error_line.classList.add("hidden"),2e3)});I(this,"time",()=>this.app.audioContext.currentTime);I(this,"play",()=>{this.app.setButtonHighlighting("play",!0),this.app.clock.start()});I(this,"pause",()=>{this.app.setButtonHighlighting("pause",!0),this.app.clock.pause()});I(this,"stop",()=>{this.app.setButtonHighlighting("stop",!0),this.app.clock.stop()});I(this,"silence",this.stop);I(this,"hush",this.stop);I(this,"mouseX",()=>this.app._mouseX);I(this,"mouseY",()=>this.app._mouseY);I(this,"noteX",()=>Math.floor(this.app._mouseX/document.body.clientWidth*127));I(this,"noteY",()=>Math.floor(this.app._mouseY/document.body.clientHeight*127));I(this,"script",(...e)=>{e.forEach(t=>{vl(this.app,this.app.universes[this.app.selected_universe].locals[t])})});I(this,"s",this.script);I(this,"clear_script",e=>{this.app.universes[this.app.selected_universe].locals[e]={candidate:"",committed:"",evaluations:0}});I(this,"cs",this.clear_script);I(this,"copy_script",(e,t)=>{this.app.universes[this.app.selected_universe].locals[t]=this.app.universes[this.app.selected_universe].locals[e]});I(this,"cps",this.copy_script);I(this,"midi_outputs",()=>(console.log(this.MidiConnection.listMidiOutputs()),this.MidiConnection.midiOutputs));I(this,"midi_output",e=>{e?this.MidiConnection.switchMidiOutput(e):console.log(this.MidiConnection.getCurrentMidiPort())});I(this,"note",(e=60)=>new Vy(e,this.app));I(this,"sysex",e=>{this.MidiConnection.sendSysExMessage(e)});I(this,"pitch_bend",(e,t)=>{this.MidiConnection.sendPitchBend(e,t)});I(this,"program_change",(e,t)=>{this.MidiConnection.sendProgramChange(e,t)});I(this,"midi_clock",()=>{this.MidiConnection.sendMidiClock()});I(this,"control_change",({control:e=20,value:t=0,channel:r=0})=>{this.MidiConnection.sendMidiControlChange(e,t,r)});I(this,"midi_panic",()=>{this.MidiConnection.panic()});I(this,"z",(e,t={})=>{const r=WM(e,t);let i;return this.app.api.patternCache.has(r)?i=this.app.api.patternCache.get(r):(i=new HM(e,t,this.app),this.app.api.patternCache.set(r,i)),(i&&i.ziffers.index===-1||i.played)&&(i.callTime=this.epulse(),i.played=!1),i});I(this,"counter",(e,t,r)=>(e in this.counters?(this.counters[e].limit!==t&&(this.counters[e].value=0,this.counters[e].limit=t),this.counters[e].step!==r&&(this.counters[e].step=r??this.counters[e].step),this.counters[e].value+=this.counters[e].step,this.counters[e].limit!==void 0&&this.counters[e].value>this.counters[e].limit&&(this.counters[e].value=0)):this.counters[e]={value:0,step:r??1,limit:t},this.counters[e].value));I(this,"$",this.counter);I(this,"drunk",e=>e!==void 0?(this._drunk.position=e,this._drunk.getPosition()):(this._drunk.step(),this._drunk.getPosition()));I(this,"drunk_max",e=>{this._drunk.max=e});I(this,"drunk_min",e=>{this._drunk.min=e});I(this,"drunk_wrap",e=>{this._drunk.toggleWrap(e)});I(this,"variable",(e,t)=>typeof e=="string"&&t===void 0?this.variables[e]:(this.variables[e]=t,this.variables[e]));I(this,"v",this.variable);I(this,"delete_variable",e=>{delete this.variables[e]});I(this,"dv",this.delete_variable);I(this,"clear_variables",()=>{this.variables={}});I(this,"cv",this.clear_variables);I(this,"div",e=>{const t=this.epulse();return Math.floor(t/Math.floor(e*this.ppqn()))%2===0});I(this,"divbar",e=>{const t=this.bar()-1;return Math.floor(t/e)%2===0});I(this,"divseq",(...e)=>{const t=e[0],r=e.slice(1),i=this.epulse(),a=Math.floor(i/Math.floor(t*this.ppqn()));return r[a%r.length]});I(this,"pick",(...e)=>e[Math.floor(this.randomGen()*e.length)]);I(this,"seqbeat",(...e)=>e[this.ebeat()%e.length]);I(this,"mel",(e,t)=>t[e%t.length]);I(this,"seqbar",(...e)=>e[(this.app.clock.time_position.bar+1)%e.length]);I(this,"seqpulse",(...e)=>e[this.app.clock.time_position.pulse%e.length]);I(this,"randI",(e,t)=>Math.floor(this.randomGen()*(t-e+1))+e);I(this,"rand",(e,t)=>this.randomGen()*(t-e)+e);I(this,"irand",this.randI);I(this,"rI",this.randI);I(this,"r",this.rand);I(this,"ir",this.randI);I(this,"seed",e=>{typeof e=="number"&&(e=e.toString()),this.currentSeed!==e&&(this.currentSeed=e,this.randomGen=Nh(e))});I(this,"localSeededRandom",e=>{if(typeof e=="number"&&(e=e.toString()),this.localSeeds.has(e))return this.localSeeds.get(e);const t=Nh(e);return this.localSeeds.set(e,t),t});I(this,"clearLocalSeed",(e=void 0)=>{e&&this.localSeeds.delete(e.toString()),this.localSeeds.clear()});I(this,"quantize",(e,t)=>{if(t.length===0)return e;let r=t[0];return t.forEach(i=>{Math.abs(i-e)Math.min(Math.max(e,t),r));I(this,"cmp",this.clamp);I(this,"bpm",e=>e===void 0?this.app.clock.bpm:((e<1||e>500)&&console.log(`Setting bpm to ${e}`),this.app.clock.bpm=e,e));I(this,"tempo",this.bpm);I(this,"bpb",e=>e===void 0?this.app.clock.time_signature[0]:(e<1&&console.log(`Setting bpb to ${e}`),this.app.clock.time_signature[0]=e,e));I(this,"ppqn",e=>e===void 0?this.app.clock.ppqn:(e<1&&console.log(`Setting ppqn to ${e}`),this.app.clock.ppqn=e,e));I(this,"time_signature",(e,t)=>{this.app.clock.time_signature=[e,t]});I(this,"odds",(e,t=15)=>this.randomGen()this.randomGen()<.025*this.ppqn()/(this.ppqn()*e));I(this,"rarely",(e=15)=>this.randomGen()<.1*this.ppqn()/(this.ppqn()*e));I(this,"scarcely",(e=15)=>this.randomGen()<.25*this.ppqn()/(this.ppqn()*e));I(this,"sometimes",(e=15)=>this.randomGen()<.5*this.ppqn()/(this.ppqn()*e));I(this,"often",(e=15)=>this.randomGen()<.75*this.ppqn()/(this.ppqn()*e));I(this,"frequently",(e=15)=>this.randomGen()<.9*this.ppqn()/(this.ppqn()*e));I(this,"almostAlways",(e=15)=>this.randomGen()<.985*this.ppqn()/(this.ppqn()*e));I(this,"dice",e=>Math.floor(this.randomGen()*e)+1);I(this,"i",e=>e!==void 0?(this.app.universes[this.app.selected_universe].global.evaluations=e,this.app.universes[this.app.selected_universe]):this.app.universes[this.app.selected_universe].global.evaluations);I(this,"bar",()=>this.app.clock.time_position.bar);I(this,"tick",()=>this.app.clock.tick);I(this,"pulse",()=>this.app.clock.time_position.pulse);I(this,"beat",()=>this.app.clock.time_position.beat);I(this,"ebeat",()=>this.app.clock.beats_since_origin);I(this,"epulse",()=>this.app.clock.pulses_since_origin);I(this,"onbar",(e,...t)=>{const r=[...Array(e).keys()].map(i=>i+1);return console.log(t.some(i=>r.includes(i%e))),t.some(i=>r.includes(i%e))});I(this,"onbeat",(...e)=>{let t=[];return e.forEach(r=>{r=r%this.app.clock.time_signature[0]+1;let i=Math.floor(r),a=r-i;t.push(i===this.app.clock.time_position.beat&&this.app.clock.time_position.pulse===a*this.app.clock.ppqn)}),t.some(r=>r==!0)});I(this,"prob",e=>this.randomGen()*100this.randomGen()>.5);I(this,"min",(...e)=>Math.min(...e));I(this,"max",(...e)=>Math.max(...e));I(this,"mean",(...e)=>e.reduce((r,i)=>r+i,0)/e.length);I(this,"limit",(e,t,r)=>Math.min(Math.max(e,t),r));I(this,"delay",(e,t)=>{setTimeout(t,e)});I(this,"delayr",(e,t,r)=>{[...Array(t).keys()].map(a=>e*a).forEach((a,s)=>{setTimeout(r,a)})});I(this,"mod",(...e)=>e.map(r=>this.epulse()%Math.floor(r*this.ppqn())===0).some(r=>r===!0));I(this,"modpulse",(...e)=>e.map(r=>this.epulse()%r===0).some(r=>r===!0));I(this,"pmod",this.modpulse);I(this,"modbar",(...e)=>e.map(r=>this.bar()%Math.floor(r*this.ppqn())===0).some(r=>r===!0));I(this,"bmod",this.modbar);I(this,"euclid",(e,t,r,i=0)=>this._euclidean_cycle(t,r,i)[e%r]);I(this,"ec",this.euclid);I(this,"bin",(e,t)=>{let i=t.toString(2).split("").map(a=>a==="1");return i[e%i.length]});I(this,"line",(e,t,r=1)=>{const i=[];if(t>e&&r>0||tMath.sin(this.app.clock.ctx.currentTime*Math.PI*2*e)+t);I(this,"usine",(e=1,t=0)=>(this.sine(e,t)+1)/2);I(this,"saw",(e=1,t=0)=>this.app.clock.ctx.currentTime*e%1*2-1+t);I(this,"usaw",(e=1,t=0)=>(this.saw(e,t)+1)/2);I(this,"triangle",(e=1,t=0)=>Math.abs(this.saw(e,t))*2-1);I(this,"utriangle",(e=1,t=0)=>(this.triangle(e,t)+1)/2);I(this,"square",(e=1,t=0,r=.5)=>{const i=1/e;return(Date.now()/1e3+t)%i/i(this.square(e,t,r)+1)/2);I(this,"noise",()=>this.randomGen()*2-1);I(this,"abs",Math.abs);I(this,"sound",e=>new qy(e,this.app));I(this,"snd",this.sound);I(this,"samples",Nl);I(this,"soundMap",Pm);I(this,"log",console.log);I(this,"scale",mM);I(this,"rate",e=>{});this.app=e}_euclidean_cycle(e,t,r=0){if(e==t)return Array.from({length:t},()=>!0);function i(o,l){const u=o.length,d=(l+1)%u;return o[l]>o[d]}if(e>=t)return[!0];const a=Array.from({length:t},(o,l)=>(e*(l-1)%t+t)%t);let s=a.map((o,l)=>i(a,l));return r!=0&&(s=s.slice(r).concat(s.slice(0,r))),s}}var Wo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zy(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ky={exports:{}};(function(n){(function(){function e(p){var E={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:`Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`,type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,describe:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,describe:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,describe:"Parses simple line breaks as
(GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,describe:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex:
foo
",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,describe:"Split adjacent blockquote blocks",type:"boolean"}};if(p===!1)return JSON.parse(JSON.stringify(E));var O={};for(var A in E)E.hasOwnProperty(A)&&(O[A]=E[A].defaultValue);return O}function t(){var p=e(!0),E={};for(var O in p)p.hasOwnProperty(O)&&(E[O]=!0);return E}var r={},i={},a={},s=e(!0),o="vanilla",l={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:e(!0),allOn:t()};r.helper={},r.extensions={},r.setOption=function(p,E){return s[p]=E,this},r.getOption=function(p){return s[p]},r.getOptions=function(){return s},r.resetOptions=function(){s=e(!0)},r.setFlavor=function(p){if(!l.hasOwnProperty(p))throw Error(p+" flavor was not found");r.resetOptions();var E=l[p];o=p;for(var O in E)E.hasOwnProperty(O)&&(s[O]=E[O])},r.getFlavor=function(){return o},r.getFlavorOptions=function(p){if(l.hasOwnProperty(p))return l[p]},r.getDefaultOptions=function(p){return e(p)},r.subParser=function(p,E){if(r.helper.isString(p))if(typeof E<"u")i[p]=E;else{if(i.hasOwnProperty(p))return i[p];throw Error("SubParser named "+p+" not registered!")}},r.extension=function(p,E){if(!r.helper.isString(p))throw Error("Extension 'name' must be a string");if(p=r.helper.stdExtName(p),r.helper.isUndefined(E)){if(!a.hasOwnProperty(p))throw Error("Extension named "+p+" is not registered!");return a[p]}else{typeof E=="function"&&(E=E()),r.helper.isArray(E)||(E=[E]);var O=u(E,p);if(O.valid)a[p]=E;else throw Error(O.error)}},r.getAllExtensions=function(){return a},r.removeExtension=function(p){delete a[p]},r.resetExtensions=function(){a={}};function u(p,E){var O=E?"Error in "+E+" extension->":"Error in unnamed extension",A={valid:!0,error:""};r.helper.isArray(p)||(p=[p]);for(var D=0;D"u"},r.helper.forEach=function(p,E){if(r.helper.isUndefined(p))throw new Error("obj param is required");if(r.helper.isUndefined(E))throw new Error("callback param is required");if(!r.helper.isFunction(E))throw new Error("callback param must be a function/closure");if(typeof p.forEach=="function")p.forEach(E);else if(r.helper.isArray(p))for(var O=0;O").replace(/&/g,"&")};var f=function(p,E,O,A){var D=A||"",M=D.indexOf("g")>-1,w=new RegExp(E+"|"+O,"g"+D.replace(/g/g,"")),B=new RegExp(E,D.replace(/g/g,"")),re=[],ie,j,J,L,G;do for(ie=0;J=w.exec(p);)if(B.test(J[0]))ie++||(j=w.lastIndex,L=j-J[0].length);else if(ie&&!--ie){G=J.index+J[0].length;var Z={left:{start:L,end:j},match:{start:j,end:J.index},right:{start:J.index,end:G},wholeMatch:{start:L,end:G}};if(re.push(Z),!M)return re}while(ie&&(w.lastIndex=j));return re};r.helper.matchRecursiveRegExp=function(p,E,O,A){for(var D=f(p,E,O,A),M=[],w=0;w0){var ie=[];w[0].wholeMatch.start!==0&&ie.push(p.slice(0,w[0].wholeMatch.start));for(var j=0;j=0?A+(O||0):A},r.helper.splitAtIndex=function(p,E){if(!r.helper.isString(p))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[p.substring(0,E),p.substring(E)]},r.helper.encodeEmailAddress=function(p){var E=[function(O){return"&#"+O.charCodeAt(0)+";"},function(O){return"&#x"+O.charCodeAt(0).toString(16)+";"},function(O){return O}];return p=p.replace(/./g,function(O){if(O==="@")O=E[Math.floor(Math.random()*2)](O);else{var A=Math.random();O=A>.9?E[2](O):A>.45?E[1](O):E[0](O)}return O}),p},r.helper.padEnd=function(E,O,A){return O=O>>0,A=String(A||" "),E.length>O?String(E):(O=O-E.length,O>A.length&&(A+=A.repeat(O/A.length)),String(E)+A.slice(0,O))},typeof console>"u"&&(console={warn:function(p){alert(p)},log:function(p){alert(p)},error:function(p){throw p}}),r.helper.regexes={asteriskDashAndColon:/([*_:~])/g},r.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:`S`},r.Converter=function(p){var E={},O=[],A=[],D={},M=o,w={parsed:{},raw:"",format:""};B();function B(){p=p||{};for(var L in s)s.hasOwnProperty(L)&&(E[L]=s[L]);if(typeof p=="object")for(var G in p)p.hasOwnProperty(G)&&(E[G]=p[G]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof p+" was passed instead.");E.extensions&&r.helper.forEach(E.extensions,re)}function re(L,G){if(G=G||null,r.helper.isString(L))if(L=r.helper.stdExtName(L),G=L,r.extensions[L]){console.warn("DEPRECATION WARNING: "+L+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),ie(r.extensions[L],L);return}else if(!r.helper.isUndefined(a[L]))L=a[L];else throw Error('Extension "'+L+'" could not be loaded. It was either not found or is not a valid extension.');typeof L=="function"&&(L=L()),r.helper.isArray(L)||(L=[L]);var Z=u(L,G);if(!Z.valid)throw Error(Z.error);for(var z=0;z>",!1),Vt=vt("<<",!1),ht=vt("<",!1),Nt=vt(">",!1),kt=vt("_",!1),Qr=vt("?",!1),Fe=vt(":",!1),Mr=vt("r",!1),st=function(U){return U.filter(K=>K)},$e=function(){return parseFloat(Tr())},Pr=function(){return parseInt(Tr())},nr=function(){},mr=function(){return Yk[Tr()]},V=function(U){return U.filter(K=>K)},he=function(U){return vr(oM,{items:U})},ve=function(U,K,ae){return vr(lM,{left:U,operation:K,right:ae})},Ce=function(U){return U},Ke=function(U){return vr(Lm,{items:U})},Ee=function(U){return vr(iM,{octave:U})},Gt=function(){return Tr().split("").reduce((U,K)=>U+(K==="^"?1:-1),0)},ot=function(){return vr(FS,{seededRandom:a.seededRandom})},bt=function(U,K){return vr(FS,{min:U,max:K,seededRandom:a.seededRandom})},en=function(U,K){return vr(sM,{item:U,times:K})},lt=function(U){return vr(aM,{duration:U})},Wt=function(U){return vr(Dh,{duration:U})},St=function(U,K,ae){const _e=U?a.nodeOptions.octave+U:a.nodeOptions.octave;return vr(Ki,{duration:K,pitch:ae,octave:_e})},we=function(U,K){return vr(nM,{pitches:[U].concat(K)})},H=0,Ot=0,nt=[{line:1,column:1}],Qt=0,cr=[],ze=0,Ge={},Dt;if("startRule"in a){if(!(a.startRule in l))throw new Error(`Can't start parsing from rule "`+a.startRule+'".');u=l[a.startRule]}function Tr(){return i.substring(Ot,H)}function yi(){return $t(Ot,H)}function vt(U,K){return{type:"literal",text:U,ignoreCase:K}}function $n(U,K,ae){return{type:"class",parts:U,inverted:K,ignoreCase:ae}}function tn(){return{type:"end"}}function qn(U){return{type:"other",description:U}}function rn(U){var K=nt[U],ae;if(K)return K;for(ae=U-1;!nt[ae];)ae--;for(K=nt[ae],K={line:K.line,column:K.column};aeQt&&(Qt=H,cr=[]),cr.push(U))}function ni(U,K,ae){return new e(e.buildMessage(U,K),U,K,ae)}function Y(){var U,K,ae=H*24+0,_e=Ge[ae];return _e?(H=_e.nextPos,_e.result):(U=H,K=ye(),K!==s&&(Ot=U,K=st(K)),U=K,Ge[ae]={nextPos:H,result:U},U)}function ee(){var U,K,ae,_e,Le,Je,yr,An=H*24+1,Ri=Ge[An];if(Ri)return H=Ri.nextPos,Ri.result;for(U=H,K=H,i.charCodeAt(H)===45?(ae=d,H++):(ae=s,ze===0&&We(G)),ae===s&&(ae=null),_e=[],j.test(i.charAt(H))?(Le=i.charAt(H),H++):(Le=s,ze===0&&We(Z));Le!==s;)_e.push(Le),j.test(i.charAt(H))?(Le=i.charAt(H),H++):(Le=s,ze===0&&We(Z));if(i.charCodeAt(H)===46?(Le=f,H++):(Le=s,ze===0&&We(z)),Le!==s){if(Je=[],j.test(i.charAt(H))?(yr=i.charAt(H),H++):(yr=s,ze===0&&We(Z)),yr!==s)for(;yr!==s;)Je.push(yr),j.test(i.charAt(H))?(yr=i.charAt(H),H++):(yr=s,ze===0&&We(Z));else Je=s;Je!==s?(ae=[ae,_e,Le,Je],K=ae):(H=K,K=s)}else H=K,K=s;if(K===s)if(K=H,i.charCodeAt(H)===46?(ae=f,H++):(ae=s,ze===0&&We(z)),ae!==s){if(_e=[],j.test(i.charAt(H))?(Le=i.charAt(H),H++):(Le=s,ze===0&&We(Z)),Le!==s)for(;Le!==s;)_e.push(Le),j.test(i.charAt(H))?(Le=i.charAt(H),H++):(Le=s,ze===0&&We(Z));else _e=s;_e!==s?(ae=[ae,_e],K=ae):(H=K,K=s)}else H=K,K=s;return K!==s&&(Ot=U,K=$e()),U=K,Ge[An]={nextPos:H,result:U},U}function se(){var U,K,ae=H*24+2,_e=Ge[ae];return _e?(H=_e.nextPos,_e.result):(U=H,i.charCodeAt(H)===45?H++:ze===0&&We(G),j.test(i.charAt(H))?(K=i.charAt(H),H++):(K=s,ze===0&&We(Z)),K!==s?(Ot=U,U=Pr()):(H=U,U=s),Ge[ae]={nextPos:H,result:U},U)}function fe(){var U,K,ae=H*24+3,_e=Ge[ae];return _e?(H=_e.nextPos,_e.result):(ze++,U=H,J.test(i.charAt(H))?(K=i.charAt(H),H++):(K=s,ze===0&&We(ue)),K!==s&&(Ot=U,K=nr()),U=K,ze--,U===s&&(K=s,ze===0&&We(ce)),Ge[ae]={nextPos:H,result:U},U)}function Se(){var U,K,ae=H*24+7,_e=Ge[ae];return _e?(H=_e.nextPos,_e.result):(U=H,L.test(i.charAt(H))?(K=i.charAt(H),H++):(K=s,ze===0&&We(Ve)),K!==s&&(Ot=U,K=mr()),U=K,Ge[ae]={nextPos:H,result:U},U)}function xe(){var U,K=H*24+8,ae=Ge[K];return ae?(H=ae.nextPos,ae.result):(U=Se(),U===s&&(U=ee()),Ge[K]={nextPos:H,result:U},U)}function ye(){var U,K,ae,_e=H*24+9,Le=Ge[_e];if(Le)return H=Le.nextPos,Le.result;if(U=H,K=[],ae=Ai(),ae===s&&(ae=_r(),ae===s&&(ae=dt(),ae===s&&(ae=ii(),ae===s&&(ae=ai())))),ae!==s)for(;ae!==s;)K.push(ae),ae=Ai(),ae===s&&(ae=_r(),ae===s&&(ae=dt(),ae===s&&(ae=ii(),ae===s&&(ae=ai()))));else K=s;return K!==s&&(Ot=U,K=V(K)),U=K,Ge[_e]={nextPos:H,result:U},U}function dt(){var U,K,ae,_e,Le=H*24+10,Je=Ge[Le];return Je?(H=Je.nextPos,Je.result):(U=H,i.charCodeAt(H)===40?(K=b,H++):(K=s,ze===0&&We(Re)),K!==s?(ae=ye(),ae!==s?(i.charCodeAt(H)===41?(_e=v,H++):(_e=s,ze===0&&We(Ie)),_e!==s?(Ot=U,U=he(ae)):(H=U,U=s)):(H=U,U=s)):(H=U,U=s),Ge[Le]={nextPos:H,result:U},U)}function _r(){var U,K,ae,_e,Le=H*24+11,Je=Ge[Le];return Je?(H=Je.nextPos,Je.result):(U=H,K=dt(),K!==s?(ae=$r(),ae!==s?(_e=dt(),_e!==s?(Ot=U,U=ve(K,ae,_e)):(H=U,U=s)):(H=U,U=s)):(H=U,U=s),Ge[Le]={nextPos:H,result:U},U)}function $r(){var U,K=H*24+12,ae=Ge[K];return ae?(H=ae.nextPos,ae.result):(i.charCodeAt(H)===43?(U=y,H++):(U=s,ze===0&&We(le)),U===s&&(i.charCodeAt(H)===45?(U=d,H++):(U=s,ze===0&&We(G)),U===s&&(i.charCodeAt(H)===42?(U=N,H++):(U=s,ze===0&&We(Me)),U===s&&(i.charCodeAt(H)===47?(U=F,H++):(U=s,ze===0&&We(je)),U===s&&(i.charCodeAt(H)===37?(U=X,H++):(U=s,ze===0&&We(He)),U===s&&(i.charCodeAt(H)===94?(U=p,H++):(U=s,ze===0&&We(rt)),U===s&&(i.charCodeAt(H)===124?(U=g,H++):(U=s,ze===0&&We(Pe)),U===s&&(i.charCodeAt(H)===38?(U=E,H++):(U=s,ze===0&&We(ft)),U===s&&(i.substr(H,2)===O?(U=O,H+=2):(U=s,ze===0&&We(Ct)),U===s&&(i.substr(H,2)===A?(U=A,H+=2):(U=s,ze===0&&We(Vt))))))))))),Ge[K]={nextPos:H,result:U},U)}function ii(){var U,K,ae=H*24+13,_e=Ge[ae];return _e?(H=_e.nextPos,_e.result):(U=H,K=ra(),K===s&&(K=na(),K===s&&(K=si(),K===s&&(K=Va(),K===s&&(K=fe(),K===s&&(K=za(),K===s&&(K=Ha(),K===s&&(K=ta(),K===s&&(K=dt())))))))),K!==s&&(Ot=U,K=Ce(K)),U=K,Ge[ae]={nextPos:H,result:U},U)}function ai(){var U,K,ae,_e,Le=H*24+14,Je=Ge[Le];return Je?(H=Je.nextPos,Je.result):(U=H,i.charCodeAt(H)===60?(K=D,H++):(K=s,ze===0&&We(ht)),K!==s?(ae=ye(),ae!==s?(i.charCodeAt(H)===62?(_e=M,H++):(_e=s,ze===0&&We(Nt)),_e!==s?(Ot=U,U=Ke(ae)):(H=U,U=s)):(H=U,U=s)):(H=U,U=s),Ge[Le]={nextPos:H,result:U},U)}function Va(){var U,K,ae=H*24+15,_e=Ge[ae];return _e?(H=_e.nextPos,_e.result):(U=H,K=Br(),K!==s&&(Ot=U,K=Ee(K)),U=K,Ge[ae]={nextPos:H,result:U},U)}function Br(){var U,K,ae,_e=H*24+16,Le=Ge[_e];if(Le)return H=Le.nextPos,Le.result;if(U=H,K=[],i.charCodeAt(H)===94?(ae=p,H++):(ae=s,ze===0&&We(rt)),ae===s&&(i.charCodeAt(H)===95?(ae=w,H++):(ae=s,ze===0&&We(kt))),ae!==s)for(;ae!==s;)K.push(ae),i.charCodeAt(H)===94?(ae=p,H++):(ae=s,ze===0&&We(rt)),ae===s&&(i.charCodeAt(H)===95?(ae=w,H++):(ae=s,ze===0&&We(kt)));else K=s;return K!==s&&(Ot=U,K=Gt()),U=K,Ge[_e]={nextPos:H,result:U},U}function Ha(){var U,K,ae=H*24+17,_e=Ge[ae];return _e?(H=_e.nextPos,_e.result):(U=H,i.charCodeAt(H)===63?(K=B,H++):(K=s,ze===0&&We(Qr)),K!==s&&(Ot=U,K=ot()),U=K,Ge[ae]={nextPos:H,result:U},U)}function ta(){var U,K,ae,_e,Le,Je,yr=H*24+18,An=Ge[yr];return An?(H=An.nextPos,An.result):(U=H,i.charCodeAt(H)===40?(K=b,H++):(K=s,ze===0&&We(Re)),K!==s?(ae=se(),ae!==s?(i.charCodeAt(H)===44?(_e=m,H++):(_e=s,ze===0&&We(Te)),_e!==s?(Le=se(),Le!==s?(i.charCodeAt(H)===41?(Je=v,H++):(Je=s,ze===0&&We(Ie)),Je!==s?(Ot=U,U=bt(ae,Le)):(H=U,U=s)):(H=U,U=s)):(H=U,U=s)):(H=U,U=s)):(H=U,U=s),Ge[yr]={nextPos:H,result:U},U)}function Ai(){var U,K,ae,_e,Le=H*24+19,Je=Ge[Le];return Je?(H=Je.nextPos,Je.result):(U=H,K=ii(),K!==s?(i.charCodeAt(H)===58?(ae=re,H++):(ae=s,ze===0&&We(Fe)),ae!==s?(_e=se(),_e!==s?(Ot=U,U=en(K,_e)):(H=U,U=s)):(H=U,U=s)):(H=U,U=s),Ge[Le]={nextPos:H,result:U},U)}function za(){var U,K,ae=H*24+20,_e=Ge[ae];return _e?(H=_e.nextPos,_e.result):(U=H,K=xe(),K!==s&&(Ot=U,K=lt(K)),U=K,Ge[ae]={nextPos:H,result:U},U)}function ra(){var U,K,ae,_e=H*24+21,Le=Ge[_e];return Le?(H=Le.nextPos,Le.result):(U=H,K=xe(),K===s&&(K=null),i.charCodeAt(H)===114?(ae=ie,H++):(ae=s,ze===0&&We(Mr)),ae!==s?(Ot=U,U=Wt(K)):(H=U,U=s),Ge[_e]={nextPos:H,result:U},U)}function si(){var U,K,ae,_e,Le=H*24+22,Je=Ge[Le];return Je?(H=Je.nextPos,Je.result):(U=H,K=Br(),K===s&&(K=null),ae=xe(),ae===s&&(ae=null),_e=se(),_e!==s?(Ot=U,U=St(K,ae,_e)):(H=U,U=s),Ge[Le]={nextPos:H,result:U},U)}function na(){var U,K,ae,_e,Le=H*24+23,Je=Ge[Le];if(Je)return H=Je.nextPos,Je.result;if(U=H,K=si(),K!==s){if(ae=[],_e=si(),_e!==s)for(;_e!==s;)ae.push(_e),_e=si();else ae=s;ae!==s?(Ot=U,U=we(K,ae)):(H=U,U=s)}else H=U,U=s;return Ge[Le]={nextPos:H,result:U},U}var Cr=a.nodeOptions||{};function vr(U,K){K.text=Tr(),K.location=yi();for(var ae in Cr)(K[ae]===void 0||K[ae]===null)&&(K[ae]=Cr[ae]);return new U(K)}if(Dt=u(),Dt!==s&&H===i.length)return Dt;throw Dt!==s&&He.collect("pitch"))}notes(){return this.evaluated.map(e=>e.collect("note"))}freqs(){return this.evaluated.map(e=>e.collect("freq"))}durations(){return this.evaluated.map(e=>e.collect("duration"))}retrograde(){return this.evaluated=this.evaluated.reverse(),this}scale(e){return this.isInOptions("scaleName",e)?this:(this.update({scale:e}),this)}key(e){return console.log("KEY?",this.isInOptions("key",e)),this.isInOptions("key",e)?this:(this.update({key:e}),this)}octave(e){return this.isInOptions("octave",e)?this:(this.update({octave:e}),this)}isInOptions(e,t){return this.options.nodeOptions&&this.options.nodeOptions[e]===t}next(){this.index++,this.counter++;const e=this.evaluated[this.index%this.evaluated.length];return this.redo>0&&this.index>=this.evaluated.length*this.redo&&(this.update(),this.index=0),e}applyTransformations(){var e;(e=this.globalOptions)!=null&&e.retrograde&&(this.evaluated=this.evaluated.reverse())}clone(){return Al(this)}notStarted(){return this.index<0}peek(){return this.evaluated[this.index-1||0]}hasStarted(){return this.index>=0}evaluate(e={}){const t=this.values.map(r=>r.evaluate(e)).flat(1/0).filter(r=>r!==void 0);return t.forEach((r,i)=>{r._next=i0?i-1:t.length-1}),t}}const dM=n=>{let e={};return rM.forEach(t=>{if(n[t]!==void 0){const r=n[t];e[t]=r,delete n[t]}}),e};class pM{constructor(){R(this,"midiAccess",null);R(this,"midiOutputs",[]);R(this,"currentOutputIndex",0);R(this,"scheduledNotes",{});this.initializeMidiAccess()}async initializeMidiAccess(){try{this.midiAccess=await navigator.requestMIDIAccess(),this.midiOutputs=Array.from(this.midiAccess.outputs.values()),this.midiOutputs.length===0&&(console.warn("No MIDI outputs available."),this.currentOutputIndex=-1)}catch(e){console.error("Failed to initialize MIDI:",e)}}getCurrentMidiPort(){return this.midiOutputs.length>0&&this.currentOutputIndex>=0&&this.currentOutputIndex0&&this.currentOutputIndex>=0&&this.currentOutputIndex=this.midiOutputs.length?(console.error(`Invalid MIDI output index. Index must be in the range 0-${this.midiOutputs.length-1}.`),this.currentOutputIndex):e;{const t=this.midiOutputs.findIndex(r=>r.name===e);return t!==-1?t:(console.error(`MIDI output "${e}" not found.`),this.currentOutputIndex)}}listMidiOutputs(){console.log("Available MIDI Outputs:"),this.midiOutputs.forEach((e,t)=>{console.log(`${t+1}. ${e.name}`)})}sendMidiNote(e,t,r,i,a=this.currentOutputIndex,s=void 0){typeof a=="string"&&(a=this.getMidiOutputIndex(a));const o=this.midiOutputs[a];if(e=Math.min(Math.max(e,0),127),o){const l=[144+t,e,r],u=[128+t,e,0];o.send(l),s&&this.sendPitchBend(s,t,a);const d=setTimeout(()=>{o.send(u),s&&this.sendPitchBend(8192,t,a),delete this.scheduledNotes[e]},(i-.02)*1e3);this.scheduledNotes[e]=d}else console.error("MIDI output not available.")}sendSysExMessage(e){const t=this.midiOutputs[this.currentOutputIndex];t?t.send(e):console.error("MIDI output not available.")}sendPitchBend(e,t,r=this.currentOutputIndex){(e<0||e>16383)&&console.error("Invalid pitch bend value. Value must be in the range 0-16383."),(t<0||t>15)&&console.error("Invalid MIDI channel. Channel must be in the range 0-15."),typeof r=="string"&&(r=this.getMidiOutputIndex(r));const i=this.midiOutputs[r];if(i){const a=e&127,s=e>>7&127;i.send([224|t,a,s])}else console.error("MIDI output not available.")}sendProgramChange(e,t){const r=this.midiOutputs[this.currentOutputIndex];r?r.send([192+t,e]):console.error("MIDI output not available.")}sendMidiControlChange(e,t,r){const i=this.midiOutputs[this.currentOutputIndex];i?i.send([176+r,e,t]):console.error("MIDI output not available.")}panic(){const e=this.midiOutputs[this.currentOutputIndex];if(e){for(const t in this.scheduledNotes){const r=this.scheduledNotes[t];clearTimeout(r),e.send([128,parseInt(t),0])}this.scheduledNotes={}}else console.error("MIDI output not available.")}}class fM{constructor(e,t,r){R(this,"min");R(this,"max");R(this,"wrap");R(this,"position");this.min=e,this.max=t,this.wrap=r,this.position=0}step(){const e=Math.floor(Math.random()*3)-1;this.position+=e,this.wrap?this.position>this.max?this.position=this.min:this.positionthis.max&&(this.position=this.max)}getPosition(){return this.position}toggleWrap(e){this.wrap=e}}const hM={major:[0,2,4,5,7,9,11],naturalMinor:[0,2,3,5,7,8,10],harmonicMinor:[0,2,3,5,7,8,11],melodicMinor:[0,2,3,5,7,9,11],dorian:[0,2,3,5,7,9,10],phrygian:[0,1,3,5,7,8,10],lydian:[0,2,4,6,7,9,11],mixolydian:[0,2,4,5,7,9,10],aeolian:[0,2,3,5,7,8,10],locrian:[0,1,3,5,6,8,10],wholeTone:[0,2,4,6,8,10],majorPentatonic:[0,2,4,7,9],minorPentatonic:[0,3,5,7,10],chromatic:[0,1,2,3,4,5,6,7,8,9,10,11],blues:[0,3,5,6,7,10],diminished:[0,2,3,5,6,8,9,11],neapolitanMinor:[0,1,3,5,7,8,11],neapolitanMajor:[0,1,3,5,7,9,11],enigmatic:[0,1,4,6,8,10,11],doubleHarmonic:[0,1,4,5,7,8,11],octatonic:[0,2,3,5,6,8,9,11],bebopDominant:[0,2,4,5,7,9,10,11],bebopMajor:[0,2,4,5,7,8,9,11],bebopMinor:[0,2,3,5,7,8,9,11],bebopDorian:[0,2,3,4,5,7,9,10],harmonicMajor:[0,2,4,5,7,8,11],hungarianMinor:[0,2,3,6,7,8,11],hungarianMajor:[0,3,4,6,7,9,10],oriental:[0,1,4,5,6,9,10],romanianMinor:[0,2,3,6,7,9,10],spanishGypsy:[0,1,4,5,7,8,10],jewish:[0,1,4,5,7,8,10],hindu:[0,2,4,5,7,8,10],japanese:[0,1,5,7,8],hirajoshi:[0,2,3,7,8],kumoi:[0,2,3,7,9],inSen:[0,1,5,7,10],iwato:[0,1,5,6,10],yo:[0,2,5,7,9],minorBlues:[0,3,5,6,7,10],algerian:[0,2,3,5,6,7,8,11],augmented:[0,3,4,7,8,11],balinese:[0,1,3,7,8],byzantine:[0,1,4,5,7,8,11],chinese:[0,4,6,7,11],egyptian:[0,2,5,7,10],eightToneSpanish:[0,1,3,4,5,6,8,10],hawaiian:[0,2,3,5,7,9,10],hindustan:[0,2,4,5,7,8,10],persian:[0,1,4,5,6,8,11],eastIndianPurvi:[0,1,4,6,7,8,11],orientalA:[0,1,4,5,6,9,10]};function mM(n,e="major",t=4){const r=hM[e];if(!r)throw new Error(`Unknown scale ${e}`);let i=n%r.length;i<0&&(i+=r.length);let a=Math.floor(n/r.length);return 60+(t+a)*12+r[i]}class km{constructor(e){R(this,"seedValue");R(this,"randomGen",Math.random);R(this,"app");R(this,"values",{});R(this,"odds",(e,t)=>this.randomGen()this.odds(.025,e));R(this,"rarely",e=>this.odds(.1,e));R(this,"scarcely",e=>this.odds(.25,e));R(this,"sometimes",e=>this.odds(.5,e));R(this,"often",e=>this.odds(.75,e));R(this,"frequently",e=>this.odds(.9,e));R(this,"almostAlways",e=>this.odds(.985,e));R(this,"modify",e=>e(this));R(this,"seed",e=>(this.seedValue=e.toString(),this.randomGen=this.app.api.localSeededRandom(this.seedValue),this));R(this,"clear",()=>(this.app.api.clearLocalSeed(this.seedValue),this));R(this,"apply",e=>this.modify(e));R(this,"duration",e=>(this.values.duration=e,this));this.app=e,this.app.api.currentSeed&&(this.randomGen=this.app.api.randomGen)}}class Gy extends km{constructor(t){super(t);R(this,"octave",t=>(this.values.octave=t,this.update(),this));R(this,"key",t=>(this.values.key=t,this.update(),this));R(this,"scale",t=>(Dm(t)?(this.values.scaleName=t,this.values.parsedScale=Zi(t)):this.values.parsedScale=wm(t),this.update(),this));R(this,"freq",t=>{this.values.freq=t;const r=zk(t);return r%1!==0?(this.values.note=Math.floor(r),this.values.bend=Uy(r)[1]):this.values.note=r,this});R(this,"update",()=>{})}}const Ml=class Ml{constructor(){R(this,"_fallbackMethod",()=>this);R(this,"out",()=>{})}};R(Ml,"createRestProxy",()=>{const e=new Ml;return new Proxy(e,{get(t,r,i){return typeof t[r]>"u"?t._fallbackMethod:t[r]},set(t,r,i,a){return!1}})});let Rl=Ml,Nr=[],_M=(n,e)=>{let t,r=[],i={lc:0,l:e||0,value:n,set(a){i.value=a,i.notify()},get(){return i.lc||i.listen(()=>{})(),i.value},notify(a){t=r;let s=!Nr.length;for(let o=0;o{r===t&&(r=r.slice());let o=r.indexOf(a);~o&&(r.splice(o,2),i.lc--,i.lc||i.off())}},subscribe(a,s){let o=i.listen(a,s);return a(i.value),o},off(){}};return i},gM=(n={})=>{let e=_M(n);return e.setKey=function(t,r){typeof r>"u"?t in e.value&&(e.value={...e.value},delete e.value[t],e.notify(t)):e.value[t]!==r&&(e.value={...e.value,[t]:r},e.notify(t))},e};if(typeof DelayNode<"u"){class n extends DelayNode{constructor(t,r,i,a){super(t),r=Math.abs(r),this.delayTime.value=i;const s=t.createGain();s.gain.value=Math.min(Math.abs(a),.995),this.feedback=s.gain;const o=t.createGain();return o.gain.value=r,this.delayGain=o,this.connect(s),this.connect(o),s.connect(this),this.connect=l=>o.connect(l),this}start(t){this.delayGain.gain.setValueAtTime(this.delayGain.gain.value,t+this.delayTime.value)}}AudioContext.prototype.createFeedbackDelay=function(e,t,r){return new n(this,e,t,r)}}typeof AudioContext<"u"&&(AudioContext.prototype.impulseResponse=function(n,e=1){const t=this.sampleRate*n,r=this.createBuffer(e,t,this.sampleRate),i=r.getChannelData(0);for(let a=0;a(e.buffer=this.impulseResponse(t),e.duration=n,e),e.setDuration(n),e});var YS={a:{freqs:[660,1120,2750,3e3,3350],gains:[1,.5012,.0708,.0631,.0126],qs:[80,90,120,130,140]},e:{freqs:[440,1800,2700,3e3,3300],gains:[1,.1995,.1259,.1,.1],qs:[70,80,100,120,120]},i:{freqs:[270,1850,2900,3350,3590],gains:[1,.0631,.0631,.0158,.0158],qs:[40,90,100,120,120]},o:{freqs:[430,820,2700,3e3,3300],gains:[1,.3162,.0501,.0794,.01995],qs:[40,80,100,120,120]},u:{freqs:[370,630,2750,3e3,3400],gains:[1,.1,.0708,.0316,.01995],qs:[40,60,100,120,120]}};if(typeof GainNode<"u"){class n extends GainNode{constructor(t,r){if(super(t),!YS[r])throw new Error("vowel: unknown vowel "+r);const{gains:i,qs:a,freqs:s}=YS[r],o=t.createGain();for(let l=0;l<5;l++){const u=t.createGain();u.gain.value=i[l];const d=t.createBiquadFilter();d.type="bandpass",d.Q.value=a[l],d.frequency.value=s[l],this.connect(d),d.connect(u),u.connect(o)}return o.gain.value=8,this.connect=l=>o.connect(l),this}}AudioContext.prototype.createVowelFilter=function(e){return new n(this,e)}}const SM=n=>{var i;if(typeof n!="string")return[];const[e,t="",r]=((i=n.match(/^([a-gA-G])([#bsf]*)([0-9]*)$/))==null?void 0:i.slice(1))||[];return e?[e,t,r?Number(r):void 0]:[]},OM={c:0,d:2,e:4,f:5,g:7,a:9,b:11},EM={"#":1,b:-1,s:1,f:-1},Mm=(n,e=3)=>{const[t,r,i=e]=SM(n);if(!t)throw new Error('not a note: "'+n+'"');const a=OM[t.toLowerCase()],s=(r==null?void 0:r.split("").reduce((o,l)=>o+EM[l],0))||0;return(Number(i)+1)*12+a+s},bM=n=>Math.pow(2,(n-69)/12)*440,TM=(n,e,t)=>Math.min(Math.max(n,e),t),CM=n=>12*Math.log(n/440)/Math.LN2+69,vM=(n,e)=>{if(typeof n!="object")throw new Error("valueToMidi: expected object value");let{freq:t,note:r}=n;if(typeof t=="number")return CM(t);if(typeof r=="string")return Mm(r);if(typeof r=="number")return r;if(!e)throw new Error("valueToMidi: expected freq or note to be set");return e},yM="data:application/javascript;base64,Ly8gTElDRU5TRSBHTlUgR2VuZXJhbCBQdWJ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1dCA9IG91dHB1dHNbMF07CiAgICBjb25zdCBzaGFwZTAgPSBwYXJhbWV0ZXJzLnNoYXBlWzBdOwogICAgY29uc3Qgc2hhcGUxID0gc2hhcGUwIDwgMSA/IHNoYXBlMCA6IDEuMCAtIDRlLTEwOwogICAgY29uc3Qgc2hhcGUgPSAoMi4wICogc2hhcGUxKSAvICgxLjAgLSBzaGFwZTEpOwogICAgY29uc3QgYmxvY2tTaXplID0gMTI4OwogICAgY29uc3QgaGFzSW5wdXQgPSAhKGlucHV0WzBdID09PSB1bmRlZmluZWQpOwogICAgaWYgKGhhc0lucHV0KSB7CiAgICAgIHRoaXMubm90U3RhcnRlZCA9IGZhbHNlOwogICAgICBmb3IgKGxldCBuID0gMDsgbiA8IGJsb2NrU2l6ZTsgbisrKSB7CiAgICAgICAgY29uc3QgdmFsdWUgPSAoKDEgKyBzaGFwZSkgKiBpbnB1dFswXVtuXSkgLyAoMSArIHNoYXBlICogTWF0aC5hYnMoaW5wdXRbMF1bbl0pKTsKICAgICAgICBmb3IgKGxldCBvID0gMDsgbyA8IG91dHB1dC5sZW5ndGg7IG8rKykgewogICAgICAgICAgb3V0cHV0W29dW25dID0gdmFsdWU7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQoKcmVnaXN0ZXJQcm9jZXNzb3IoJ3NoYXBlLXByb2Nlc3NvcicsIFNoYXBlUHJvY2Vzc29yKTsK";function Il(n){const e=Gr().createGain();return e.gain.value=n,e}const AM=({s:n,freq:e,t})=>{const r=Gr().createOscillator();return r.type=n||"triangle",r.frequency.value=Number(e),r.start(t),{node:r,stop:i=>r.stop(i)}},Qy=(n,e,t,r,i,a)=>{const s=Gr().createGain();return s.gain.setValueAtTime(0,a),s.gain.linearRampToValueAtTime(i,a+n),s.gain.linearRampToValueAtTime(t*i,a+n+e),{node:s,stop:o=>{s.gain.setValueAtTime(t*i,o),s.gain.linearRampToValueAtTime(0,o+r)}}},Yc=(n,e,t)=>{const r=Gr().createBiquadFilter();return r.type=n,r.frequency.value=e,r.Q.value=t,r};let RM=n=>console.log(n);const Ya=(...n)=>RM(...n),Pm=gM();function $y(n,e,t={}){Pm.setKey(n,{onTrigger:e,data:t})}function GS(n){return Pm.get()[n]}let Gc;const Gr=()=>(Gc||(Gc=new AudioContext),Gc);let Io;const Bm=()=>{const n=Gr();return Io||(Io=n.createGain(),Io.connect(n.destination)),Io};let Qc;function IM(){return Qc||(Qc=Gr().audioWorklet.addModule(yM),Qc)}function $c(n,e,t){const r=new AudioWorkletNode(n,e);return Object.entries(t).forEach(([i,a])=>{r.parameters.get(i).value=a}),r}async function NM(n={}){const{disableWorklets:e=!1}=n;typeof window<"u"&&(await Gr().resume(),e?console.log("disableWorklets: AudioWorklet effects coarse, crush and shape are skipped!"):await IM().catch(t=>{console.warn("could not load AudioWorklet effects coarse, crush and shape",t)}))}async function DM(n){return new Promise(e=>{document.addEventListener("click",async function t(){await NM(n),e(),document.removeEventListener("click",t)})})}let xi={};function wM(n,e,t,r){var i;if(t=TM(t,0,.98),!xi[n]){const a=Gr().createFeedbackDelay(1,e,t);(i=a.start)==null||i.call(a,r),a.connect(Bm()),xi[n]=a}return xi[n].delayTime.value!==e&&xi[n].delayTime.setValueAtTime(e,r),xi[n].feedback.value!==t&&xi[n].feedback.setValueAtTime(t,r),xi[n]}let Li={};function xM(n,e=2){if(!Li[n]){const t=Gr().createReverb(e);t.connect(Bm()),Li[n]=t}return Li[n].duration!==e&&(Li[n]=Li[n].setDuration(e),Li[n].duration=e),Li[n]}function QS(n,e,t){const r=Il(t);return n.connect(r),r.connect(e),r}const LM=async(n,e,t)=>{const r=Gr();if(typeof n!="object")throw new Error(`expected hap.value to be an object, but got "${n}". Hint: append .note() or .s() to the end`,"error");let i=r.currentTime+e,{s:a="triangle",bank:s,source:o,gain:l=.8,cutoff:u,resonance:d=1,hcutoff:f,hresonance:m=1,bandf:g,bandq:b=1,coarse:v,crush:y,shape:N,pan:F,vowel:X,delay:p=0,delayfeedback:E=.5,delaytime:O=.25,orbit:A=1,room:D,size:M=2,velocity:w=1}=n;l*=w;let B=[];const re=()=>{B.forEach(Z=>Z==null?void 0:Z.disconnect())};s&&a&&(a=`${s}_${a}`);let ie;if(o)ie=o(i,n,t);else if(GS(a)){const{onTrigger:Z}=GS(a),z=await Z(i,n,re);z&&(ie=z.node,z.stop(i+t))}else throw new Error(`sound ${a} not found! Is it loaded?`);if(!ie)return;if(r.currentTime>i){Ya("[webaudio] skip hap: still loading",r.currentTime-i);return}const j=[];if(j.push(ie),j.push(Il(l)),u!==void 0&&j.push(Yc("lowpass",u,d)),f!==void 0&&j.push(Yc("highpass",f,m)),g!==void 0&&j.push(Yc("bandpass",g,b)),X!==void 0&&j.push(r.createVowelFilter(X)),v!==void 0&&j.push($c(r,"coarse-processor",{coarse:v})),y!==void 0&&j.push($c(r,"crush-processor",{crush:y})),N!==void 0&&j.push($c(r,"shape-processor",{shape:N})),F!==void 0){const Z=r.createStereoPanner();Z.pan.value=2*F-1,j.push(Z)}const J=Il(1);j.push(J),J.connect(Bm());let L;if(p>0&&O>0&&E>0){const Z=wM(A,O,E,i);L=QS(J,Z,p)}let G;if(D>0&&M>0){const Z=xM(A,M);G=QS(J,Z,D)}j.slice(1).reduce((Z,z)=>Z.connect(z),j[0]),B=j.concat([L,G])},qc={};function kM(n,e){var t=e?1e3:1024;if(n=t);return n.toFixed(1)+" "+r[i]}const MM=async(n,e,t,r,i,a,s)=>{let o=0;i!==void 0&&t!==void 0&&Ya("[sampler] hap has note and freq. ignoring note","warning");let l=vM({freq:i,note:t},36);o=l-36;const u=Gr();let d;if(Array.isArray(a))d=a[e%a.length];else{const b=y=>Mm(y)-l,v=Object.keys(a).filter(y=>!y.startsWith("_")).reduce((y,N,F)=>!y||Math.abs(b(N)){const i=t?`sound "${t}:${r}"`:"sample";if(!qc[n]){Ya(`[sampler] load ${i}..`,"load-sample",{url:n});const a=Date.now();qc[n]=fetch(n).then(s=>s.arrayBuffer()).then(async s=>{const o=Date.now()-a,l=kM(s.byteLength);return Ya(`[sampler] load ${i}... done! loaded ${l} in ${o}ms`,"loaded-sample",{url:n}),await e.decodeAudioData(s)})}return qc[n]};function BM(n){const e=Gr(),t=e.createBuffer(n.numberOfChannels,n.length,e.sampleRate);for(let r=0;rObject.entries(n).forEach(([r,i])=>{if(typeof i=="string"&&(i=[i]),typeof i!="object")throw new Error("wrong sample map format for "+r);t=i._base||t;const a=s=>(t+s).replace("github:","https://raw.githubusercontent.com/");Array.isArray(i)?i=i.map(a):i=Object.fromEntries(Object.entries(i).map(([s,o])=>[s,(typeof o=="string"?[o]:o).map(a)])),e(r,i)});let FM={};function YM(n){const e=Object.entries(FM).find(([t])=>n.startsWith(t));if(e)return e[1]}const Nl=async(n,e=n._base||"",t={})=>{if(typeof n=="string"){const a=YM(n);if(a)return a(n);if(n.startsWith("github:")){let[o,l]=n.split("github:");l=l.endsWith("/")?l.slice(0,-1):l,n=`https://raw.githubusercontent.com/${l}/strudel.json`}if(typeof fetch!="function")return;const s=n.split("/").slice(0,-1).join("/");return typeof fetch>"u"?void 0:fetch(n).then(o=>o.json()).then(o=>Nl(o,e||o._base||s,t)).catch(o=>{throw console.error(o),new Error(`error loading "${n}"`)})}const{prebake:r,tag:i}=t;UM(n,(a,s)=>$y(a,(o,l,u)=>GM(o,l,u,s),{type:"sample",samples:s,baseUrl:e,prebake:r,tag:i}),e)},$S=[];async function GM(n,e,t,r,i){const{s:a,freq:s,unit:o,nudge:l=0,cut:u,loop:d,clip:f=void 0,n:m=0,note:g,speed:b=1,begin:v=0,end:y=1}=e;if(b===0)return;const N=Gr(),{attack:F=.001,decay:X=.001,sustain:p=1,release:E=.001}=e,O=n+l,A=await MM(a,m,g,b,s,r,i);if(N.currentTime>n){Ya(`[sampler] still loading sound "${a}:${m}"`,"highlight");return}if(!A){Ya(`[sampler] could not load "${a}:${m}"`,"error");return}A.playbackRate.value=Math.abs(b)*A.playbackRate.value,o==="c"&&(A.playbackRate.value=A.playbackRate.value*A.buffer.duration*1);const D=v*A.buffer.duration;A.start(O,D);const M=A.buffer.duration/A.playbackRate.value,{node:w,stop:B}=Qy(F,X,p,E,1,n);A.connect(w);const re=N.createGain();w.connect(re),A.onended=function(){A.disconnect(),w.disconnect(),re.disconnect(),t()};const ie={node:re,bufferSource:A,stop:(j,J=f===void 0)=>{let L=j;J&&(L=n+(y-v)*M),A.stop(L+E),B(L)}};if(u!==void 0){const j=$S[u];j&&(j.node.gain.setValueAtTime(1,O),j.node.gain.linearRampToValueAtTime(0,O+.01)),$S[u]=ie}return ie}const QM=(n,e=1,t="sine")=>{const r=Gr(),i=r.createOscillator();i.type=t,i.frequency.value=n,i.start();const a=new GainNode(r,{gain:e});return i.connect(a),{node:a,stop:s=>i.stop(s)}},$M=(n,e,t,r="sine")=>{const i=n.frequency.value*e,a=i*t;return QM(i,a,r)};function qM(){["sine","square","triangle","sawtooth"].forEach(n=>{$y(n,(e,t,r)=>{const{attack:i=.001,decay:a=.05,sustain:s=.6,release:o=.01,fmh:l=1,fmi:u}=t;let{n:d,note:f,freq:m}=t;d=f||d||36,typeof d=="string"&&(d=Mm(d)),!m&&typeof d=="number"&&(m=bM(d));const{node:g,stop:b}=AM({t:e,s:n,freq:m});let v;if(u){const{node:X,stop:p}=$M(g,l,u);X.connect(g.frequency),v=p}const y=Il(.3),{node:N,stop:F}=Qy(i,a,s,o,1,e);return g.onended=()=>{g.disconnect(),y.disconnect(),r()},{node:g.connect(y).connect(N),stop:X=>{F(X);let p=X+o;b(p),v==null||v(p)}}},{type:"synth",prebake:!0})})}class qy extends Gy{constructor(t,r){super(r);R(this,"attack",t=>(this.values.attack=t,this));R(this,"atk",this.attack);R(this,"decay",t=>(this.values.decay=t,this));R(this,"dec",this.decay);R(this,"release",t=>(this.values.release=t,this));R(this,"rel",this.release);R(this,"unit",t=>(this.values.unit=t,this));R(this,"freq",t=>(this.values.freq=t,this));R(this,"fm",t=>{if(typeof t=="number")this.values.fmi=t;else{let r=t.split(":");this.values.fmi=parseFloat(r[0]),r.length>1&&(this.values.fmh=parseFloat(r[1]))}return this});R(this,"sound",t=>(this.values.s=t,this));R(this,"fmi",t=>(this.values.fmi=t,this));R(this,"fmh",t=>(this.values.fmh=t,this));R(this,"nudge",t=>(this.values.nudge=t,this));R(this,"cut",t=>(this.values.cut=t,this));R(this,"loop",t=>(this.values.loop=t,this));R(this,"clip",t=>(this.values.clip=t,this));R(this,"n",t=>(this.values.n=t,this));R(this,"note",t=>(this.values.note=t,this));R(this,"speed",t=>(this.values.speed=t,this));R(this,"begin",t=>(this.values.begin=t,this));R(this,"end",t=>(this.values.end=t,this));R(this,"gain",t=>(this.values.gain=t,this));R(this,"cutoff",t=>(this.values.cutoff=t,this));R(this,"lpf",this.cutoff);R(this,"resonance",t=>(this.values.resonance=t,this));R(this,"lpq",this.resonance);R(this,"hcutoff",t=>(this.values.hcutoff=t,this));R(this,"hpf",this.hcutoff);R(this,"hresonance",t=>(this.values.hresonance=t,this));R(this,"hpq",this.hresonance);R(this,"bandf",t=>(this.values.bandf=t,this));R(this,"bpf",this.bandf);R(this,"bandq",t=>(this.values.bandq=t,this));R(this,"bpq",this.bandq);R(this,"coarse",t=>(this.values.coarse=t,this));R(this,"crush",t=>(this.values.crush=t,this));R(this,"shape",t=>(this.values.shape=t,this));R(this,"pan",t=>(this.values.pan=t,this));R(this,"vowel",t=>(this.values.vowel=t,this));R(this,"delay",t=>(this.values.delay=t,this));R(this,"delayfeedback",t=>(this.values.delayfeedback=t,this));R(this,"delayfb",this.delayfeedback);R(this,"delaytime",t=>(this.values.delaytime=t,this));R(this,"delayt",this.delaytime);R(this,"orbit",t=>(this.values.orbit=t,this));R(this,"room",t=>(this.values.room=t,this));R(this,"size",t=>(this.values.size=t,this));R(this,"velocity",t=>(this.values.velocity=t,this));R(this,"vel",this.velocity);R(this,"modify",t=>{const r=t(this);return r instanceof Object?r:(t(this.values),this)});R(this,"sustain",t=>(this.values.dur=t,this));R(this,"sus",this.sustain);R(this,"update",()=>{if(this.values.key&&this.values.pitch&&this.values.parsedScale&&this.values.octave){const[t,r]=xm(this.values.key,this.values.pitch,this.values.parsedScale,this.values.octave);this.values.freq=Ps(t)}});R(this,"out",()=>LM(this.values,this.app.clock.pulse_duration,this.values.dur));this.app=r,typeof t=="string"?this.values={s:t,dur:.5}:this.values=t}}class Vy extends Gy{constructor(t,r){super(r);R(this,"midiConnection");R(this,"note",t=>(this.values.note=t,this));R(this,"sustain",t=>(this.values.sustain=t,this));R(this,"channel",t=>(this.values.channel=t,this));R(this,"port",t=>(this.values.port=this.midiConnection.getMidiOutputIndex(t),this));R(this,"add",t=>(this.values.note+=t,this));R(this,"modify",t=>{const r=t(this);return r instanceof Object?r:(t(this.values),this)});R(this,"bend",t=>(this.values.bend=t,this));R(this,"random",(t=0,r=127)=>(t=Math.min(Math.max(t,0),127),r=Math.min(Math.max(r,0),127),this.values.note=Math.floor(this.randomGen()*(r-t+1))+t,this));R(this,"update",()=>{if(this.values.key&&this.values.pitch&&this.values.parsedScale&&this.values.octave){const[t,r]=xm(this.values.key,this.values.pitch,this.values.parsedScale,this.values.octave);this.values.note=t,this.values.freq=Ps(t),r&&(this.values.bend=r)}});R(this,"out",()=>{const t=this.values.note?this.values.note:60,r=this.values.channel?this.values.channel:0,i=this.values.velocity?this.values.velocity:100,a=this.values.sustain?this.values.sustain*this.app.clock.pulse_duration*this.app.api.ppqn():this.app.clock.pulse_duration*this.app.api.ppqn(),s=this.values.bend?this.values.bend:void 0,o=this.values.port?this.midiConnection.getMidiOutputIndex(this.values.port):this.midiConnection.getCurrentMidiPortIndex();this.midiConnection.sendMidiNote(t,r,i,a,o,s)});this.app=r,typeof t=="number"?this.values.note=t:this.values=t,this.midiConnection=r.api.MidiConnection}}const ss=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Hy=new Set,wh=typeof process=="object"&&process?process:{},zy=(n,e,t,r)=>{typeof wh.emitWarning=="function"?wh.emitWarning(n,e,t,r):console.error(`[${t}] ${e}: ${n}`)};let Dl=globalThis.AbortController,qS=globalThis.AbortSignal;var DT;if(typeof Dl>"u"){qS=class{constructor(){R(this,"onabort");R(this,"_onabort",[]);R(this,"reason");R(this,"aborted",!1)}addEventListener(r,i){this._onabort.push(i)}},Dl=class{constructor(){R(this,"signal",new qS);e()}abort(r){var i,a;if(!this.signal.aborted){this.signal.reason=r,this.signal.aborted=!0;for(const s of this.signal._onabort)s(r);(a=(i=this.signal).onabort)==null||a.call(i,r)}}};let n=((DT=wh.env)==null?void 0:DT.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{n&&(n=!1,zy("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const VM=n=>!Hy.has(n),ci=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),Wy=n=>ci(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Vo:null:null;class Vo extends Array{constructor(e){super(e),this.fill(0)}}var va;const Pi=class Pi{constructor(e,t){R(this,"heap");R(this,"length");if(!Q(Pi,va))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}static create(e){const t=Wy(e);if(!t)return[];Qe(Pi,va,!0);const r=new Pi(e,t);return Qe(Pi,va,!1),r}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};va=new WeakMap,tt(Pi,va,!1);let xh=Pi;var _n,Hr,gn,Sn,ya,Kt,On,jt,xt,et,Dr,zr,Sr,sr,En,or,Hn,zn,bn,Tn,mi,wr,Fs,kh,Gi,Wn,Ys,Wr,Pl,Xy,Qi,Aa,Gs,xn,ui,Ln,di,Qs,Mh,Ra,Ho,Ia,zo,At,Mt,$s,Ph,$i,fs;const Qm=class Qm{constructor(e){tt(this,Fs);tt(this,Pl);tt(this,xn);tt(this,Ln);tt(this,Qs);tt(this,Ra);tt(this,Ia);tt(this,At);tt(this,$s);tt(this,$i);tt(this,_n,void 0);tt(this,Hr,void 0);tt(this,gn,void 0);tt(this,Sn,void 0);tt(this,ya,void 0);R(this,"ttl");R(this,"ttlResolution");R(this,"ttlAutopurge");R(this,"updateAgeOnGet");R(this,"updateAgeOnHas");R(this,"allowStale");R(this,"noDisposeOnSet");R(this,"noUpdateTTL");R(this,"maxEntrySize");R(this,"sizeCalculation");R(this,"noDeleteOnFetchRejection");R(this,"noDeleteOnStaleGet");R(this,"allowStaleOnFetchAbort");R(this,"allowStaleOnFetchRejection");R(this,"ignoreFetchAbort");tt(this,Kt,void 0);tt(this,On,void 0);tt(this,jt,void 0);tt(this,xt,void 0);tt(this,et,void 0);tt(this,Dr,void 0);tt(this,zr,void 0);tt(this,Sr,void 0);tt(this,sr,void 0);tt(this,En,void 0);tt(this,or,void 0);tt(this,Hn,void 0);tt(this,zn,void 0);tt(this,bn,void 0);tt(this,Tn,void 0);tt(this,mi,void 0);tt(this,wr,void 0);tt(this,Gi,()=>{});tt(this,Wn,()=>{});tt(this,Ys,()=>{});tt(this,Wr,()=>!1);tt(this,Qi,e=>{});tt(this,Aa,(e,t,r)=>{});tt(this,Gs,(e,t,r,i)=>{if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});const{max:t=0,ttl:r,ttlResolution:i=1,ttlAutopurge:a,updateAgeOnGet:s,updateAgeOnHas:o,allowStale:l,dispose:u,disposeAfter:d,noDisposeOnSet:f,noUpdateTTL:m,maxSize:g=0,maxEntrySize:b=0,sizeCalculation:v,fetchMethod:y,noDeleteOnFetchRejection:N,noDeleteOnStaleGet:F,allowStaleOnFetchRejection:X,allowStaleOnFetchAbort:p,ignoreFetchAbort:E}=e;if(t!==0&&!ci(t))throw new TypeError("max option must be a nonnegative integer");const O=t?Wy(t):Array;if(!O)throw new Error("invalid max value: "+t);if(Qe(this,_n,t),Qe(this,Hr,g),this.maxEntrySize=b||Q(this,Hr),this.sizeCalculation=v,this.sizeCalculation){if(!Q(this,Hr)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(y!==void 0&&typeof y!="function")throw new TypeError("fetchMethod must be a function if specified");if(Qe(this,ya,y),Qe(this,mi,!!y),Qe(this,jt,new Map),Qe(this,xt,new Array(t).fill(void 0)),Qe(this,et,new Array(t).fill(void 0)),Qe(this,Dr,new O(t)),Qe(this,zr,new O(t)),Qe(this,Sr,0),Qe(this,sr,0),Qe(this,En,xh.create(t)),Qe(this,Kt,0),Qe(this,On,0),typeof u=="function"&&Qe(this,gn,u),typeof d=="function"?(Qe(this,Sn,d),Qe(this,or,[])):(Qe(this,Sn,void 0),Qe(this,or,void 0)),Qe(this,Tn,!!Q(this,gn)),Qe(this,wr,!!Q(this,Sn)),this.noDisposeOnSet=!!f,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!N,this.allowStaleOnFetchRejection=!!X,this.allowStaleOnFetchAbort=!!p,this.ignoreFetchAbort=!!E,this.maxEntrySize!==0){if(Q(this,Hr)!==0&&!ci(Q(this,Hr)))throw new TypeError("maxSize must be a positive integer if specified");if(!ci(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");Ue(this,Pl,Xy).call(this)}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!F,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!o,this.ttlResolution=ci(i)||i===0?i:1,this.ttlAutopurge=!!a,this.ttl=r||0,this.ttl){if(!ci(this.ttl))throw new TypeError("ttl must be a positive integer if specified");Ue(this,Fs,kh).call(this)}if(Q(this,_n)===0&&this.ttl===0&&Q(this,Hr)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!Q(this,_n)&&!Q(this,Hr)){const A="LRU_CACHE_UNBOUNDED";VM(A)&&(Hy.add(A),zy("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",A,Qm))}}static unsafeExposeInternals(e){return{starts:Q(e,zn),ttls:Q(e,bn),sizes:Q(e,Hn),keyMap:Q(e,jt),keyList:Q(e,xt),valList:Q(e,et),next:Q(e,Dr),prev:Q(e,zr),get head(){return Q(e,Sr)},get tail(){return Q(e,sr)},free:Q(e,En),isBackgroundFetch:t=>{var r;return Ue(r=e,At,Mt).call(r,t)},backgroundFetch:(t,r,i,a)=>{var s;return Ue(s=e,Ia,zo).call(s,t,r,i,a)},moveToTail:t=>{var r;return Ue(r=e,$i,fs).call(r,t)},indexes:t=>{var r;return Ue(r=e,xn,ui).call(r,t)},rindexes:t=>{var r;return Ue(r=e,Ln,di).call(r,t)},isStale:t=>{var r;return Q(r=e,Wr).call(r,t)}}}get max(){return Q(this,_n)}get maxSize(){return Q(this,Hr)}get calculatedSize(){return Q(this,On)}get size(){return Q(this,Kt)}get fetchMethod(){return Q(this,ya)}get dispose(){return Q(this,gn)}get disposeAfter(){return Q(this,Sn)}getRemainingTTL(e){return Q(this,jt).has(e)?1/0:0}*entries(){for(const e of Ue(this,xn,ui).call(this))Q(this,et)[e]!==void 0&&Q(this,xt)[e]!==void 0&&!Ue(this,At,Mt).call(this,Q(this,et)[e])&&(yield[Q(this,xt)[e],Q(this,et)[e]])}*rentries(){for(const e of Ue(this,Ln,di).call(this))Q(this,et)[e]!==void 0&&Q(this,xt)[e]!==void 0&&!Ue(this,At,Mt).call(this,Q(this,et)[e])&&(yield[Q(this,xt)[e],Q(this,et)[e]])}*keys(){for(const e of Ue(this,xn,ui).call(this)){const t=Q(this,xt)[e];t!==void 0&&!Ue(this,At,Mt).call(this,Q(this,et)[e])&&(yield t)}}*rkeys(){for(const e of Ue(this,Ln,di).call(this)){const t=Q(this,xt)[e];t!==void 0&&!Ue(this,At,Mt).call(this,Q(this,et)[e])&&(yield t)}}*values(){for(const e of Ue(this,xn,ui).call(this))Q(this,et)[e]!==void 0&&!Ue(this,At,Mt).call(this,Q(this,et)[e])&&(yield Q(this,et)[e])}*rvalues(){for(const e of Ue(this,Ln,di).call(this))Q(this,et)[e]!==void 0&&!Ue(this,At,Mt).call(this,Q(this,et)[e])&&(yield Q(this,et)[e])}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const r of Ue(this,xn,ui).call(this)){const i=Q(this,et)[r],a=Ue(this,At,Mt).call(this,i)?i.__staleWhileFetching:i;if(a!==void 0&&e(a,Q(this,xt)[r],this))return this.get(Q(this,xt)[r],t)}}forEach(e,t=this){for(const r of Ue(this,xn,ui).call(this)){const i=Q(this,et)[r],a=Ue(this,At,Mt).call(this,i)?i.__staleWhileFetching:i;a!==void 0&&e.call(t,a,Q(this,xt)[r],this)}}rforEach(e,t=this){for(const r of Ue(this,Ln,di).call(this)){const i=Q(this,et)[r],a=Ue(this,At,Mt).call(this,i)?i.__staleWhileFetching:i;a!==void 0&&e.call(t,a,Q(this,xt)[r],this)}}purgeStale(){let e=!1;for(const t of Ue(this,Ln,di).call(this,{allowStale:!0}))Q(this,Wr).call(this,t)&&(this.delete(Q(this,xt)[t]),e=!0);return e}dump(){const e=[];for(const t of Ue(this,xn,ui).call(this,{allowStale:!0})){const r=Q(this,xt)[t],i=Q(this,et)[t],a=Ue(this,At,Mt).call(this,i)?i.__staleWhileFetching:i;if(a===void 0||r===void 0)continue;const s={value:a};if(Q(this,bn)&&Q(this,zn)){s.ttl=Q(this,bn)[t];const o=ss.now()-Q(this,zn)[t];s.start=Math.floor(Date.now()-o)}Q(this,Hn)&&(s.size=Q(this,Hn)[t]),e.unshift([r,s])}return e}load(e){this.clear();for(const[t,r]of e){if(r.start){const i=Date.now()-r.start;r.start=ss.now()-i}this.set(t,r.value,r)}}set(e,t,r={}){var m,g,b,v,y;if(t===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:a,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:l}=r;let{noUpdateTTL:u=this.noUpdateTTL}=r;const d=Q(this,Gs).call(this,e,t,r.size||0,o);if(this.maxEntrySize&&d>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let f=Q(this,Kt)===0?void 0:Q(this,jt).get(e);if(f===void 0)f=Q(this,Kt)===0?Q(this,sr):Q(this,En).length!==0?Q(this,En).pop():Q(this,Kt)===Q(this,_n)?Ue(this,Ra,Ho).call(this,!1):Q(this,Kt),Q(this,xt)[f]=e,Q(this,et)[f]=t,Q(this,jt).set(e,f),Q(this,Dr)[Q(this,sr)]=f,Q(this,zr)[f]=Q(this,sr),Qe(this,sr,f),io(this,Kt)._++,Q(this,Aa).call(this,f,d,l),l&&(l.set="add"),u=!1;else{Ue(this,$i,fs).call(this,f);const N=Q(this,et)[f];if(t!==N){if(Q(this,mi)&&Ue(this,At,Mt).call(this,N)){N.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:F}=N;F!==void 0&&!s&&(Q(this,Tn)&&((m=Q(this,gn))==null||m.call(this,F,e,"set")),Q(this,wr)&&((g=Q(this,or))==null||g.push([F,e,"set"])))}else s||(Q(this,Tn)&&((b=Q(this,gn))==null||b.call(this,N,e,"set")),Q(this,wr)&&((v=Q(this,or))==null||v.push([N,e,"set"])));if(Q(this,Qi).call(this,f),Q(this,Aa).call(this,f,d,l),Q(this,et)[f]=t,l){l.set="replace";const F=N&&Ue(this,At,Mt).call(this,N)?N.__staleWhileFetching:N;F!==void 0&&(l.oldValue=F)}}else l&&(l.set="update")}if(i!==0&&!Q(this,bn)&&Ue(this,Fs,kh).call(this),Q(this,bn)&&(u||Q(this,Ys).call(this,f,i,a),l&&Q(this,Wn).call(this,l,f)),!s&&Q(this,wr)&&Q(this,or)){const N=Q(this,or);let F;for(;F=N==null?void 0:N.shift();)(y=Q(this,Sn))==null||y.call(this,...F)}return this}pop(){var e;try{for(;Q(this,Kt);){const t=Q(this,et)[Q(this,Sr)];if(Ue(this,Ra,Ho).call(this,!0),Ue(this,At,Mt).call(this,t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(Q(this,wr)&&Q(this,or)){const t=Q(this,or);let r;for(;r=t==null?void 0:t.shift();)(e=Q(this,Sn))==null||e.call(this,...r)}}}has(e,t={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:i}=t,a=Q(this,jt).get(e);if(a!==void 0){const s=Q(this,et)[a];if(Ue(this,At,Mt).call(this,s)&&s.__staleWhileFetching===void 0)return!1;if(Q(this,Wr).call(this,a))i&&(i.has="stale",Q(this,Wn).call(this,i,a));else return r&&Q(this,Gi).call(this,a),i&&(i.has="hit",Q(this,Wn).call(this,i,a)),!0}else i&&(i.has="miss");return!1}peek(e,t={}){const{allowStale:r=this.allowStale}=t,i=Q(this,jt).get(e);if(i!==void 0&&(r||!Q(this,Wr).call(this,i))){const a=Q(this,et)[i];return Ue(this,At,Mt).call(this,a)?a.__staleWhileFetching:a}}async fetch(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:m=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:b=this.allowStaleOnFetchAbort,context:v,forceRefresh:y=!1,status:N,signal:F}=t;if(!Q(this,mi))return N&&(N.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:a,status:N});const X={allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:a,ttl:s,noDisposeOnSet:o,size:l,sizeCalculation:u,noUpdateTTL:d,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:b,ignoreFetchAbort:g,status:N,signal:F};let p=Q(this,jt).get(e);if(p===void 0){N&&(N.fetch="miss");const E=Ue(this,Ia,zo).call(this,e,p,X,v);return E.__returned=E}else{const E=Q(this,et)[p];if(Ue(this,At,Mt).call(this,E)){const w=r&&E.__staleWhileFetching!==void 0;return N&&(N.fetch="inflight",w&&(N.returnedStale=!0)),w?E.__staleWhileFetching:E.__returned=E}const O=Q(this,Wr).call(this,p);if(!y&&!O)return N&&(N.fetch="hit"),Ue(this,$i,fs).call(this,p),i&&Q(this,Gi).call(this,p),N&&Q(this,Wn).call(this,N,p),E;const A=Ue(this,Ia,zo).call(this,e,p,X,v),M=A.__staleWhileFetching!==void 0&&r;return N&&(N.fetch=O?"stale":"refresh",M&&O&&(N.returnedStale=!0)),M?A.__staleWhileFetching:A.__returned=A}}get(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,status:s}=t,o=Q(this,jt).get(e);if(o!==void 0){const l=Q(this,et)[o],u=Ue(this,At,Mt).call(this,l);return s&&Q(this,Wn).call(this,s,o),Q(this,Wr).call(this,o)?(s&&(s.get="stale"),u?(s&&r&&l.__staleWhileFetching!==void 0&&(s.returnedStale=!0),r?l.__staleWhileFetching:void 0):(a||this.delete(e),s&&r&&(s.returnedStale=!0),r?l:void 0)):(s&&(s.get="hit"),u?l.__staleWhileFetching:(Ue(this,$i,fs).call(this,o),i&&Q(this,Gi).call(this,o),l))}else s&&(s.get="miss")}delete(e){var r,i,a,s;let t=!1;if(Q(this,Kt)!==0){const o=Q(this,jt).get(e);if(o!==void 0)if(t=!0,Q(this,Kt)===1)this.clear();else{Q(this,Qi).call(this,o);const l=Q(this,et)[o];Ue(this,At,Mt).call(this,l)?l.__abortController.abort(new Error("deleted")):(Q(this,Tn)||Q(this,wr))&&(Q(this,Tn)&&((r=Q(this,gn))==null||r.call(this,l,e,"delete")),Q(this,wr)&&((i=Q(this,or))==null||i.push([l,e,"delete"]))),Q(this,jt).delete(e),Q(this,xt)[o]=void 0,Q(this,et)[o]=void 0,o===Q(this,sr)?Qe(this,sr,Q(this,zr)[o]):o===Q(this,Sr)?Qe(this,Sr,Q(this,Dr)[o]):(Q(this,Dr)[Q(this,zr)[o]]=Q(this,Dr)[o],Q(this,zr)[Q(this,Dr)[o]]=Q(this,zr)[o]),io(this,Kt)._--,Q(this,En).push(o)}}if(Q(this,wr)&&((a=Q(this,or))!=null&&a.length)){const o=Q(this,or);let l;for(;l=o==null?void 0:o.shift();)(s=Q(this,Sn))==null||s.call(this,...l)}return t}clear(){var e,t,r;for(const i of Ue(this,Ln,di).call(this,{allowStale:!0})){const a=Q(this,et)[i];if(Ue(this,At,Mt).call(this,a))a.__abortController.abort(new Error("deleted"));else{const s=Q(this,xt)[i];Q(this,Tn)&&((e=Q(this,gn))==null||e.call(this,a,s,"delete")),Q(this,wr)&&((t=Q(this,or))==null||t.push([a,s,"delete"]))}}if(Q(this,jt).clear(),Q(this,et).fill(void 0),Q(this,xt).fill(void 0),Q(this,bn)&&Q(this,zn)&&(Q(this,bn).fill(0),Q(this,zn).fill(0)),Q(this,Hn)&&Q(this,Hn).fill(0),Qe(this,Sr,0),Qe(this,sr,0),Q(this,En).length=0,Qe(this,On,0),Qe(this,Kt,0),Q(this,wr)&&Q(this,or)){const i=Q(this,or);let a;for(;a=i==null?void 0:i.shift();)(r=Q(this,Sn))==null||r.call(this,...a)}}};_n=new WeakMap,Hr=new WeakMap,gn=new WeakMap,Sn=new WeakMap,ya=new WeakMap,Kt=new WeakMap,On=new WeakMap,jt=new WeakMap,xt=new WeakMap,et=new WeakMap,Dr=new WeakMap,zr=new WeakMap,Sr=new WeakMap,sr=new WeakMap,En=new WeakMap,or=new WeakMap,Hn=new WeakMap,zn=new WeakMap,bn=new WeakMap,Tn=new WeakMap,mi=new WeakMap,wr=new WeakMap,Fs=new WeakSet,kh=function(){const e=new Vo(Q(this,_n)),t=new Vo(Q(this,_n));Qe(this,bn,e),Qe(this,zn,t),Qe(this,Ys,(a,s,o=ss.now())=>{if(t[a]=s!==0?o:0,e[a]=s,s!==0&&this.ttlAutopurge){const l=setTimeout(()=>{Q(this,Wr).call(this,a)&&this.delete(Q(this,xt)[a])},s+1);l.unref&&l.unref()}}),Qe(this,Gi,a=>{t[a]=e[a]!==0?ss.now():0}),Qe(this,Wn,(a,s)=>{if(e[s]){const o=e[s],l=t[s];a.ttl=o,a.start=l,a.now=r||i();const u=a.now-l;a.remainingTTL=o-u}});let r=0;const i=()=>{const a=ss.now();if(this.ttlResolution>0){r=a;const s=setTimeout(()=>r=0,this.ttlResolution);s.unref&&s.unref()}return a};this.getRemainingTTL=a=>{const s=Q(this,jt).get(a);if(s===void 0)return 0;const o=e[s],l=t[s];if(o===0||l===0)return 1/0;const u=(r||i())-l;return o-u},Qe(this,Wr,a=>e[a]!==0&&t[a]!==0&&(r||i())-t[a]>e[a])},Gi=new WeakMap,Wn=new WeakMap,Ys=new WeakMap,Wr=new WeakMap,Pl=new WeakSet,Xy=function(){const e=new Vo(Q(this,_n));Qe(this,On,0),Qe(this,Hn,e),Qe(this,Qi,t=>{Qe(this,On,Q(this,On)-e[t]),e[t]=0}),Qe(this,Gs,(t,r,i,a)=>{if(Ue(this,At,Mt).call(this,r))return 0;if(!ci(i))if(a){if(typeof a!="function")throw new TypeError("sizeCalculation must be a function");if(i=a(r,t),!ci(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),Qe(this,Aa,(t,r,i)=>{if(e[t]=r,Q(this,Hr)){const a=Q(this,Hr)-e[t];for(;Q(this,On)>a;)Ue(this,Ra,Ho).call(this,!0)}Qe(this,On,Q(this,On)+e[t]),i&&(i.entrySize=r,i.totalCalculatedSize=Q(this,On))})},Qi=new WeakMap,Aa=new WeakMap,Gs=new WeakMap,xn=new WeakSet,ui=function*({allowStale:e=this.allowStale}={}){if(Q(this,Kt))for(let t=Q(this,sr);!(!Ue(this,Qs,Mh).call(this,t)||((e||!Q(this,Wr).call(this,t))&&(yield t),t===Q(this,Sr)));)t=Q(this,zr)[t]},Ln=new WeakSet,di=function*({allowStale:e=this.allowStale}={}){if(Q(this,Kt))for(let t=Q(this,Sr);!(!Ue(this,Qs,Mh).call(this,t)||((e||!Q(this,Wr).call(this,t))&&(yield t),t===Q(this,sr)));)t=Q(this,Dr)[t]},Qs=new WeakSet,Mh=function(e){return e!==void 0&&Q(this,jt).get(Q(this,xt)[e])===e},Ra=new WeakSet,Ho=function(e){var a,s;const t=Q(this,Sr),r=Q(this,xt)[t],i=Q(this,et)[t];return Q(this,mi)&&Ue(this,At,Mt).call(this,i)?i.__abortController.abort(new Error("evicted")):(Q(this,Tn)||Q(this,wr))&&(Q(this,Tn)&&((a=Q(this,gn))==null||a.call(this,i,r,"evict")),Q(this,wr)&&((s=Q(this,or))==null||s.push([i,r,"evict"]))),Q(this,Qi).call(this,t),e&&(Q(this,xt)[t]=void 0,Q(this,et)[t]=void 0,Q(this,En).push(t)),Q(this,Kt)===1?(Qe(this,Sr,Qe(this,sr,0)),Q(this,En).length=0):Qe(this,Sr,Q(this,Dr)[t]),Q(this,jt).delete(r),io(this,Kt)._--,t},Ia=new WeakSet,zo=function(e,t,r,i){const a=t===void 0?void 0:Q(this,et)[t];if(Ue(this,At,Mt).call(this,a))return a;const s=new Dl,{signal:o}=r;o==null||o.addEventListener("abort",()=>s.abort(o.reason),{signal:s.signal});const l={signal:s.signal,options:r,context:i},u=(v,y=!1)=>{const{aborted:N}=s.signal,F=r.ignoreFetchAbort&&v!==void 0;if(r.status&&(N&&!y?(r.status.fetchAborted=!0,r.status.fetchError=s.signal.reason,F&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),N&&!F&&!y)return f(s.signal.reason);const X=g;return Q(this,et)[t]===g&&(v===void 0?X.__staleWhileFetching?Q(this,et)[t]=X.__staleWhileFetching:this.delete(e):(r.status&&(r.status.fetchUpdated=!0),this.set(e,v,l.options))),v},d=v=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=v),f(v)),f=v=>{const{aborted:y}=s.signal,N=y&&r.allowStaleOnFetchAbort,F=N||r.allowStaleOnFetchRejection,X=F||r.noDeleteOnFetchRejection,p=g;if(Q(this,et)[t]===g&&(!X||p.__staleWhileFetching===void 0?this.delete(e):N||(Q(this,et)[t]=p.__staleWhileFetching)),F)return r.status&&p.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw v},m=(v,y)=>{var F;const N=(F=Q(this,ya))==null?void 0:F.call(this,e,a,l);N&&N instanceof Promise&&N.then(X=>v(X===void 0?void 0:X),y),s.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(v(void 0),r.allowStaleOnFetchAbort&&(v=X=>u(X,!0)))})};r.status&&(r.status.fetchDispatched=!0);const g=new Promise(m).then(u,d),b=Object.assign(g,{__abortController:s,__staleWhileFetching:a,__returned:void 0});return t===void 0?(this.set(e,b,{...l.options,status:void 0}),t=Q(this,jt).get(e)):Q(this,et)[t]=b,b},At=new WeakSet,Mt=function(e){if(!Q(this,mi))return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof Dl},$s=new WeakSet,Ph=function(e,t){Q(this,zr)[t]=e,Q(this,Dr)[e]=t},$i=new WeakSet,fs=function(e){e!==Q(this,sr)&&(e===Q(this,Sr)?Qe(this,Sr,Q(this,Dr)[e]):Ue(this,$s,Ph).call(this,Q(this,zr)[e],Q(this,Dr)[e]),Ue(this,$s,Ph).call(this,Q(this,sr),e),Qe(this,sr,e))};let Lh=Qm;const Bl=class Bl extends km{constructor(t,r){super(r);R(this,"_fallbackMethod",()=>this);R(this,"out",()=>{});this.values.duration=t}};R(Bl,"createRestProxy",(t,r)=>{const i=new Bl(t,r);return new Proxy(i,{get(a,s,o){return typeof a[s]>"u"?a._fallbackMethod:a[s]},set(a,s,o,l){return!1}})});let wl=Bl;class HM extends km{constructor(t,r,i){super(i);R(this,"input");R(this,"ziffers");R(this,"callTime",0);R(this,"played",!1);R(this,"current");R(this,"retro",!1);R(this,"tick",0);R(this,"next",()=>(this.current=this.ziffers.next(),this.played=!0,this.current));R(this,"areWeThereYet",()=>{const t=this.ziffers.notStarted()||this.app.api.epulse()>this.callTime+this.current.duration*this.app.api.ppqn();return t?this.tick=0:this.tick++,t});R(this,"out",()=>{});this.app=i,this.input=t,this.ziffers=new uM(t,r)}sound(t){if(this.areWeThereYet()){const r=this.next();if(r instanceof Ki){const i=r.getExisting("freq","pitch","key","scale","octave");return new qy(i,this.app).sound(t)}else if(r instanceof Dh)return wl.createRestProxy(r.duration,this.app)}else return Rl.createRestProxy()}note(t=void 0){if(this.areWeThereYet()){const r=this.next();if(r instanceof Ki){const i=r.getExisting("note","pitch","bend","key","scale","octave"),a=new Vy(i,this.app);return t?a.note(t):a}else if(r instanceof Dh)return wl.createRestProxy(r.duration,this.app)}else return Rl.createRestProxy()}scale(t){return this.ziffers.scale(t),this}key(t){return this.ziffers.key(t),this}octave(t){return this.ziffers.octave(t),this}retrograde(){return this.tick===0&&this.ziffers.index===0&&this.ziffers.retrograde(),this}}Array.prototype.palindrome=function(n){let e=Array.from(this),t=Array.from(this.reverse());return e.concat(t)};Array.prototype.random=function(n){return this[Math.floor(Math.random()*this.length)]};Array.prototype.loop=function(n){return this[n%this.length]};Array.prototype.rand=Array.prototype.random;Array.prototype.in=function(n){return this.includes(n)};async function zM(){return Promise.all([DM(),Nl("github:Bubobubobubobubo/Topos-Samples/main"),Nl("github:tidalcycles/Dirt-Samples/master").then(()=>qM())])}zM();const WM=(...n)=>n.map(e=>JSON.stringify(e)).join(",");class XM{constructor(e){R(this,"variables",{});R(this,"counters",{});R(this,"_drunk",new fM(-100,100,!1));R(this,"randomGen",Math.random);R(this,"currentSeed");R(this,"localSeeds",new Map);R(this,"patternCache",new Lh({max:1e3,ttl:1e3*60*5}));R(this,"errorTimeoutID",0);R(this,"MidiConnection",new pM);R(this,"load");R(this,"_reportError",e=>{console.log(e),clearTimeout(this.errorTimeoutID),this.app.error_line.innerHTML=e,this.app.error_line.classList.remove("hidden"),this.errorTimeoutID=setTimeout(()=>this.app.error_line.classList.add("hidden"),2e3)});R(this,"time",()=>this.app.audioContext.currentTime);R(this,"play",()=>{this.app.setButtonHighlighting("play",!0),this.app.clock.start()});R(this,"pause",()=>{this.app.setButtonHighlighting("pause",!0),this.app.clock.pause()});R(this,"stop",()=>{this.app.setButtonHighlighting("stop",!0),this.app.clock.stop()});R(this,"silence",this.stop);R(this,"hush",this.stop);R(this,"mouseX",()=>this.app._mouseX);R(this,"mouseY",()=>this.app._mouseY);R(this,"noteX",()=>Math.floor(this.app._mouseX/document.body.clientWidth*127));R(this,"noteY",()=>Math.floor(this.app._mouseY/document.body.clientHeight*127));R(this,"script",(...e)=>{e.forEach(t=>{vl(this.app,this.app.universes[this.app.selected_universe].locals[t])})});R(this,"s",this.script);R(this,"clear_script",e=>{this.app.universes[this.app.selected_universe].locals[e]={candidate:"",committed:"",evaluations:0}});R(this,"cs",this.clear_script);R(this,"copy_script",(e,t)=>{this.app.universes[this.app.selected_universe].locals[t]=this.app.universes[this.app.selected_universe].locals[e]});R(this,"cps",this.copy_script);R(this,"midi_outputs",()=>(console.log(this.MidiConnection.listMidiOutputs()),this.MidiConnection.midiOutputs));R(this,"midi_output",e=>{e?this.MidiConnection.switchMidiOutput(e):console.log(this.MidiConnection.getCurrentMidiPort())});R(this,"note",(e=60)=>new Vy(e,this.app));R(this,"sysex",e=>{this.MidiConnection.sendSysExMessage(e)});R(this,"sy",this.sysex);R(this,"pitch_bend",(e,t)=>{this.MidiConnection.sendPitchBend(e,t)});R(this,"program_change",(e,t)=>{this.MidiConnection.sendProgramChange(e,t)});R(this,"pc",this.program_change);R(this,"midi_clock",()=>{this.MidiConnection.sendMidiClock()});R(this,"control_change",({control:e=20,value:t=0,channel:r=0})=>{this.MidiConnection.sendMidiControlChange(e,t,r)});R(this,"cc",this.control_change);R(this,"midi_panic",()=>{this.MidiConnection.panic()});R(this,"z",(e,t={})=>{const r=WM(e,t);let i;return this.app.api.patternCache.has(r)?i=this.app.api.patternCache.get(r):(i=new HM(e,t,this.app),this.app.api.patternCache.set(r,i)),(i&&i.ziffers.index===-1||i.played)&&(i.callTime=this.epulse(),i.played=!1),i});R(this,"counter",(e,t,r)=>(e in this.counters?(this.counters[e].limit!==t&&(this.counters[e].value=0,this.counters[e].limit=t),this.counters[e].step!==r&&(this.counters[e].step=r??this.counters[e].step),this.counters[e].value+=this.counters[e].step,this.counters[e].limit!==void 0&&this.counters[e].value>this.counters[e].limit&&(this.counters[e].value=0)):this.counters[e]={value:0,step:r??1,limit:t},this.counters[e].value));R(this,"$",this.counter);R(this,"drunk",e=>e!==void 0?(this._drunk.position=e,this._drunk.getPosition()):(this._drunk.step(),this._drunk.getPosition()));R(this,"drunk_max",e=>{this._drunk.max=e});R(this,"drunk_min",e=>{this._drunk.min=e});R(this,"drunk_wrap",e=>{this._drunk.toggleWrap(e)});R(this,"variable",(e,t)=>typeof e=="string"&&t===void 0?this.variables[e]:(this.variables[e]=t,this.variables[e]));R(this,"v",this.variable);R(this,"delete_variable",e=>{delete this.variables[e]});R(this,"dv",this.delete_variable);R(this,"clear_variables",()=>{this.variables={}});R(this,"cv",this.clear_variables);R(this,"div",e=>{const t=this.epulse();return Math.floor(t/Math.floor(e*this.ppqn()))%2===0});R(this,"divbar",e=>{const t=this.bar()-1;return Math.floor(t/e)%2===0});R(this,"divseq",(...e)=>{const t=e[0],r=e.slice(1),i=this.epulse(),a=Math.floor(i/Math.floor(t*this.ppqn()));return r[a%r.length]});R(this,"pick",(...e)=>e[Math.floor(this.randomGen()*e.length)]);R(this,"seqbeat",(...e)=>e[this.ebeat()%e.length]);R(this,"mel",(e,t)=>t[e%t.length]);R(this,"seqbar",(...e)=>e[(this.app.clock.time_position.bar+1)%e.length]);R(this,"seqpulse",(...e)=>e[this.app.clock.time_position.pulse%e.length]);R(this,"randI",(e,t)=>Math.floor(this.randomGen()*(t-e+1))+e);R(this,"rand",(e,t)=>this.randomGen()*(t-e)+e);R(this,"irand",this.randI);R(this,"rI",this.randI);R(this,"r",this.rand);R(this,"ir",this.randI);R(this,"seed",e=>{typeof e=="number"&&(e=e.toString()),this.currentSeed!==e&&(this.currentSeed=e,this.randomGen=Nh(e))});R(this,"localSeededRandom",e=>{if(typeof e=="number"&&(e=e.toString()),this.localSeeds.has(e))return this.localSeeds.get(e);const t=Nh(e);return this.localSeeds.set(e,t),t});R(this,"clearLocalSeed",(e=void 0)=>{e&&this.localSeeds.delete(e.toString()),this.localSeeds.clear()});R(this,"quantize",(e,t)=>{if(t.length===0)return e;let r=t[0];return t.forEach(i=>{Math.abs(i-e)Math.min(Math.max(e,t),r));R(this,"cmp",this.clamp);R(this,"bpm",e=>e===void 0?this.app.clock.bpm:((e<1||e>500)&&console.log(`Setting bpm to ${e}`),this.app.clock.bpm=e,e));R(this,"tempo",this.bpm);R(this,"bpb",e=>e===void 0?this.app.clock.time_signature[0]:(e<1&&console.log(`Setting bpb to ${e}`),this.app.clock.time_signature[0]=e,e));R(this,"ppqn",e=>e===void 0?this.app.clock.ppqn:(e<1&&console.log(`Setting ppqn to ${e}`),this.app.clock.ppqn=e,e));R(this,"time_signature",(e,t)=>{this.app.clock.time_signature=[e,t]});R(this,"odds",(e,t=15)=>this.randomGen()this.randomGen()<.025*this.ppqn()/(this.ppqn()*e));R(this,"rarely",(e=15)=>this.randomGen()<.1*this.ppqn()/(this.ppqn()*e));R(this,"scarcely",(e=15)=>this.randomGen()<.25*this.ppqn()/(this.ppqn()*e));R(this,"sometimes",(e=15)=>this.randomGen()<.5*this.ppqn()/(this.ppqn()*e));R(this,"often",(e=15)=>this.randomGen()<.75*this.ppqn()/(this.ppqn()*e));R(this,"frequently",(e=15)=>this.randomGen()<.9*this.ppqn()/(this.ppqn()*e));R(this,"almostAlways",(e=15)=>this.randomGen()<.985*this.ppqn()/(this.ppqn()*e));R(this,"dice",e=>Math.floor(this.randomGen()*e)+1);R(this,"i",e=>e!==void 0?(this.app.universes[this.app.selected_universe].global.evaluations=e,this.app.universes[this.app.selected_universe]):this.app.universes[this.app.selected_universe].global.evaluations);R(this,"bar",()=>this.app.clock.time_position.bar);R(this,"tick",()=>this.app.clock.tick);R(this,"pulse",()=>this.app.clock.time_position.pulse);R(this,"beat",()=>this.app.clock.time_position.beat);R(this,"ebeat",()=>this.app.clock.beats_since_origin);R(this,"epulse",()=>this.app.clock.pulses_since_origin);R(this,"onbar",(e,...t)=>{const r=[...Array(e).keys()].map(i=>i+1);return console.log(t.some(i=>r.includes(i%e))),t.some(i=>r.includes(i%e))});R(this,"onbeat",(...e)=>{let t=[];return e.forEach(r=>{r=r%this.app.clock.time_signature[0]+1;let i=Math.floor(r),a=r-i;t.push(i===this.app.clock.time_position.beat&&this.app.clock.time_position.pulse===a*this.app.clock.ppqn)}),t.some(r=>r==!0)});R(this,"prob",e=>this.randomGen()*100this.randomGen()>.5);R(this,"min",(...e)=>Math.min(...e));R(this,"max",(...e)=>Math.max(...e));R(this,"mean",(...e)=>e.reduce((r,i)=>r+i,0)/e.length);R(this,"limit",(e,t,r)=>Math.min(Math.max(e,t),r));R(this,"delay",(e,t)=>{setTimeout(t,e)});R(this,"delayr",(e,t,r)=>{[...Array(t).keys()].map(a=>e*a).forEach((a,s)=>{setTimeout(r,a)})});R(this,"mod",(...e)=>e.map(r=>this.epulse()%Math.floor(r*this.ppqn())===0).some(r=>r===!0));R(this,"modpulse",(...e)=>e.map(r=>this.epulse()%r===0).some(r=>r===!0));R(this,"pmod",this.modpulse);R(this,"modbar",(...e)=>e.map(r=>this.bar()%Math.floor(r*this.ppqn())===0).some(r=>r===!0));R(this,"bmod",this.modbar);R(this,"euclid",(e,t,r,i=0)=>this._euclidean_cycle(t,r,i)[e%r]);R(this,"eu",this.euclid);R(this,"bin",(e,t)=>{let i=t.toString(2).split("").map(a=>a==="1");return i[e%i.length]});R(this,"line",(e,t,r=1)=>{const i=[];if(t>e&&r>0||tMath.sin(this.app.clock.ctx.currentTime*Math.PI*2*e)+t);R(this,"usine",(e=1,t=0)=>(this.sine(e,t)+1)/2);R(this,"saw",(e=1,t=0)=>this.app.clock.ctx.currentTime*e%1*2-1+t);R(this,"usaw",(e=1,t=0)=>(this.saw(e,t)+1)/2);R(this,"triangle",(e=1,t=0)=>Math.abs(this.saw(e,t))*2-1);R(this,"utriangle",(e=1,t=0)=>(this.triangle(e,t)+1)/2);R(this,"square",(e=1,t=0,r=.5)=>{const i=1/e;return(Date.now()/1e3+t)%i/i(this.square(e,t,r)+1)/2);R(this,"noise",()=>this.randomGen()*2-1);R(this,"abs",Math.abs);R(this,"sound",e=>new qy(e,this.app));R(this,"snd",this.sound);R(this,"samples",Nl);R(this,"soundMap",Pm);R(this,"log",console.log);R(this,"scale",mM);R(this,"rate",e=>{});this.app=e}_euclidean_cycle(e,t,r=0){if(e==t)return Array.from({length:t},()=>!0);function i(o,l){const u=o.length,d=(l+1)%u;return o[l]>o[d]}if(e>=t)return[!0];const a=Array.from({length:t},(o,l)=>(e*(l-1)%t+t)%t);let s=a.map((o,l)=>i(a,l));return r!=0&&(s=s.slice(r).concat(s.slice(0,r))),s}}var Wo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zy(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ky={exports:{}};(function(n){(function(){function e(p){var E={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:`Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`,type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,describe:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,describe:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,describe:"Parses simple line breaks as
(GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,describe:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex:
foo
",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,describe:"Split adjacent blockquote blocks",type:"boolean"}};if(p===!1)return JSON.parse(JSON.stringify(E));var O={};for(var A in E)E.hasOwnProperty(A)&&(O[A]=E[A].defaultValue);return O}function t(){var p=e(!0),E={};for(var O in p)p.hasOwnProperty(O)&&(E[O]=!0);return E}var r={},i={},a={},s=e(!0),o="vanilla",l={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:e(!0),allOn:t()};r.helper={},r.extensions={},r.setOption=function(p,E){return s[p]=E,this},r.getOption=function(p){return s[p]},r.getOptions=function(){return s},r.resetOptions=function(){s=e(!0)},r.setFlavor=function(p){if(!l.hasOwnProperty(p))throw Error(p+" flavor was not found");r.resetOptions();var E=l[p];o=p;for(var O in E)E.hasOwnProperty(O)&&(s[O]=E[O])},r.getFlavor=function(){return o},r.getFlavorOptions=function(p){if(l.hasOwnProperty(p))return l[p]},r.getDefaultOptions=function(p){return e(p)},r.subParser=function(p,E){if(r.helper.isString(p))if(typeof E<"u")i[p]=E;else{if(i.hasOwnProperty(p))return i[p];throw Error("SubParser named "+p+" not registered!")}},r.extension=function(p,E){if(!r.helper.isString(p))throw Error("Extension 'name' must be a string");if(p=r.helper.stdExtName(p),r.helper.isUndefined(E)){if(!a.hasOwnProperty(p))throw Error("Extension named "+p+" is not registered!");return a[p]}else{typeof E=="function"&&(E=E()),r.helper.isArray(E)||(E=[E]);var O=u(E,p);if(O.valid)a[p]=E;else throw Error(O.error)}},r.getAllExtensions=function(){return a},r.removeExtension=function(p){delete a[p]},r.resetExtensions=function(){a={}};function u(p,E){var O=E?"Error in "+E+" extension->":"Error in unnamed extension",A={valid:!0,error:""};r.helper.isArray(p)||(p=[p]);for(var D=0;D"u"},r.helper.forEach=function(p,E){if(r.helper.isUndefined(p))throw new Error("obj param is required");if(r.helper.isUndefined(E))throw new Error("callback param is required");if(!r.helper.isFunction(E))throw new Error("callback param must be a function/closure");if(typeof p.forEach=="function")p.forEach(E);else if(r.helper.isArray(p))for(var O=0;O").replace(/&/g,"&")};var f=function(p,E,O,A){var D=A||"",M=D.indexOf("g")>-1,w=new RegExp(E+"|"+O,"g"+D.replace(/g/g,"")),B=new RegExp(E,D.replace(/g/g,"")),re=[],ie,j,J,L,G;do for(ie=0;J=w.exec(p);)if(B.test(J[0]))ie++||(j=w.lastIndex,L=j-J[0].length);else if(ie&&!--ie){G=J.index+J[0].length;var Z={left:{start:L,end:j},match:{start:j,end:J.index},right:{start:J.index,end:G},wholeMatch:{start:L,end:G}};if(re.push(Z),!M)return re}while(ie&&(w.lastIndex=j));return re};r.helper.matchRecursiveRegExp=function(p,E,O,A){for(var D=f(p,E,O,A),M=[],w=0;w0){var ie=[];w[0].wholeMatch.start!==0&&ie.push(p.slice(0,w[0].wholeMatch.start));for(var j=0;j=0?A+(O||0):A},r.helper.splitAtIndex=function(p,E){if(!r.helper.isString(p))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[p.substring(0,E),p.substring(E)]},r.helper.encodeEmailAddress=function(p){var E=[function(O){return"&#"+O.charCodeAt(0)+";"},function(O){return"&#x"+O.charCodeAt(0).toString(16)+";"},function(O){return O}];return p=p.replace(/./g,function(O){if(O==="@")O=E[Math.floor(Math.random()*2)](O);else{var A=Math.random();O=A>.9?E[2](O):A>.45?E[1](O):E[0](O)}return O}),p},r.helper.padEnd=function(E,O,A){return O=O>>0,A=String(A||" "),E.length>O?String(E):(O=O-E.length,O>A.length&&(A+=A.repeat(O/A.length)),String(E)+A.slice(0,O))},typeof console>"u"&&(console={warn:function(p){alert(p)},log:function(p){alert(p)},error:function(p){throw p}}),r.helper.regexes={asteriskDashAndColon:/([*_:~])/g},r.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:`S`},r.Converter=function(p){var E={},O=[],A=[],D={},M=o,w={parsed:{},raw:"",format:""};B();function B(){p=p||{};for(var L in s)s.hasOwnProperty(L)&&(E[L]=s[L]);if(typeof p=="object")for(var G in p)p.hasOwnProperty(G)&&(E[G]=p[G]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof p+" was passed instead.");E.extensions&&r.helper.forEach(E.extensions,re)}function re(L,G){if(G=G||null,r.helper.isString(L))if(L=r.helper.stdExtName(L),G=L,r.extensions[L]){console.warn("DEPRECATION WARNING: "+L+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),ie(r.extensions[L],L);return}else if(!r.helper.isUndefined(a[L]))L=a[L];else throw Error('Extension "'+L+'" could not be loaded. It was either not found or is not a valid extension.');typeof L=="function"&&(L=L()),r.helper.isArray(L)||(L=[L]);var Z=u(L,G);if(!Z.valid)throw Error(Z.error);for(var z=0;z({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:o.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[o.APOS_STRING_MODE,o.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:o.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],r=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],i=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],a=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function s(o){const l=n(o),u="and or not only",d={className:"variable",begin:"\\$"+o.IDENT_RE},f=["charset","css","debug","extend","font-face","for","import","include","keyframes","media","mixin","page","warn","while"],m="(?=[.\\s\\n[:,(])";return{name:"Stylus",aliases:["styl"],case_insensitive:!1,keywords:"if else for in",illegal:"("+["\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)","(\\bdef\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"].join("|")+")",contains:[o.QUOTE_STRING_MODE,o.APOS_STRING_MODE,o.C_LINE_COMMENT_MODE,o.C_BLOCK_COMMENT_MODE,l.HEXCOLOR,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+m,className:"selector-class"},{begin:"#[a-zA-Z][a-zA-Z0-9_-]*"+m,className:"selector-id"},{begin:"\\b("+e.join("|")+")"+m,className:"selector-tag"},{className:"selector-pseudo",begin:"&?:("+r.join("|")+")"+m},{className:"selector-pseudo",begin:"&?:(:)?("+i.join("|")+")"+m},l.ATTRIBUTE_SELECTOR_MODE,{className:"keyword",begin:/@media/,starts:{end:/[{;}]/,keywords:{$pattern:/[a-z-]+/,keyword:u,attribute:t.join(" ")},contains:[l.CSS_NUMBER_MODE]}},{className:"keyword",begin:"@((-(o|moz|ms|webkit)-)?("+f.join("|")+"))\\b"},d,l.CSS_NUMBER_MODE,{className:"function",begin:"^[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",illegal:"[\\n]",returnBegin:!0,contains:[{className:"title",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{className:"params",begin:/\(/,end:/\)/,contains:[l.HEXCOLOR,d,o.APOS_STRING_MODE,l.CSS_NUMBER_MODE,o.QUOTE_STRING_MODE]}]},l.CSS_VARIABLE,{className:"attribute",begin:"\\b("+a.join("|")+")\\b",starts:{end:/;|$/,contains:[l.HEXCOLOR,d,o.APOS_STRING_MODE,o.QUOTE_STRING_MODE,l.CSS_NUMBER_MODE,o.C_BLOCK_COMMENT_MODE,l.IMPORTANT,l.FUNCTION_DISPATCH],illegal:/\./,relevance:0}},l.FUNCTION_DISPATCH]}}return Jp=s,Jp}var ef,sT;function jU(){if(sT)return ef;sT=1;function n(e){return{name:"SubUnit",case_insensitive:!0,contains:[{className:"string",begin:`\\[ (multipart)?`,end:`\\] -`},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}return ef=n,ef}var tf,oT;function JU(){if(oT)return tf;oT=1;function n(D){return D?typeof D=="string"?D:D.source:null}function e(D){return t("(?=",D,")")}function t(...D){return D.map(w=>n(w)).join("")}function r(D){const M=D[D.length-1];return typeof M=="object"&&M.constructor===Object?(D.splice(D.length-1,1),M):{}}function i(...D){return"("+(r(D).capture?"":"?:")+D.map(B=>n(B)).join("|")+")"}const a=D=>t(/\b/,D,/\w$/.test(D)?/\b/:/\B/),s=["Protocol","Type"].map(a),o=["init","self"].map(a),l=["Any","Self"],u=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],d=["false","nil","true"],f=["assignment","associativity","higherThan","left","lowerThan","none","right"],m=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],g=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],b=i(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),v=i(b,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),y=t(b,v,"*"),N=i(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),F=i(N,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),X=t(N,F,"*"),p=t(/[A-Z]/,F,"*"),E=["autoclosure",t(/convention\(/,i("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",t(/objc\(/,X,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],O=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function A(D){const M={match:/\s+/,relevance:0},w=D.COMMENT("/\\*","\\*/",{contains:["self"]}),B=[D.C_LINE_COMMENT_MODE,w],re={match:[/\./,i(...s,...o)],className:{2:"keyword"}},ie={match:t(/\./,i(...u)),relevance:0},j=u.filter(ot=>typeof ot=="string").concat(["_|0"]),J=u.filter(ot=>typeof ot!="string").concat(l).map(a),L={variants:[{className:"keyword",match:i(...J,...o)}]},G={$pattern:i(/\b\w+/,/#\w+/),keyword:j.concat(m),literal:d},Z=[re,ie,L],z={match:t(/\./,i(...g)),relevance:0},ce={className:"built_in",match:t(/\b/,i(...g),/(?=\()/)},ue=[z,ce],Te={match:/->/,relevance:0},Pe={className:"operator",relevance:0,variants:[{match:y},{match:`\\.(\\.|${v})+`}]},Ve=[Te,Pe],Re="([0-9]_*)+",Ie="([0-9a-fA-F]_*)+",le={className:"number",relevance:0,variants:[{match:`\\b(${Re})(\\.(${Re}))?([eE][+-]?(${Re}))?\\b`},{match:`\\b0x(${Ie})(\\.(${Ie}))?([pP][+-]?(${Re}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},Me=(ot="")=>({className:"subst",variants:[{match:t(/\\/,ot,/[0\\tnr"']/)},{match:t(/\\/,ot,/u\{[0-9a-fA-F]{1,8}\}/)}]}),je=(ot="")=>({className:"subst",match:t(/\\/,ot,/[\t ]*(?:[\r\n]|\r\n)/)}),He=(ot="")=>({className:"subst",label:"interpol",begin:t(/\\/,ot,/\(/),end:/\)/}),rt=(ot="")=>({begin:t(ot,/"""/),end:t(/"""/,ot),contains:[Me(ot),je(ot),He(ot)]}),ft=(ot="")=>({begin:t(ot,/"/),end:t(/"/,ot),contains:[Me(ot),He(ot)]}),Ct={className:"string",variants:[rt(),rt("#"),rt("##"),rt("###"),ft(),ft("#"),ft("##"),ft("###")]},Vt={match:t(/`/,X,/`/)},ht={className:"variable",match:/\$\d+/},Nt={className:"variable",match:`\\$${F}+`},kt=[Vt,ht,Nt],Qr={match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:O,contains:[...Ve,le,Ct]}]}},Fe={className:"keyword",match:t(/@/,i(...E))},Mr={className:"meta",match:t(/@/,X)},st=[Qr,Fe,Mr],$e={match:e(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:t(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,F,"+")},{className:"type",match:p,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:t(/\s+&\s+/,e(p)),relevance:0}]},Pr={begin://,keywords:G,contains:[...B,...Z,...st,Te,$e]};$e.contains.push(Pr);const nr={match:t(X,/\s*:/),keywords:"_|0",relevance:0},mr={begin:/\(/,end:/\)/,relevance:0,keywords:G,contains:["self",nr,...B,...Z,...ue,...Ve,le,Ct,...kt,...st,$e]},V={begin://,contains:[...B,$e]},he={begin:i(e(t(X,/\s*:/)),e(t(X,/\s+/,X,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:X}]},ve={begin:/\(/,end:/\)/,keywords:G,contains:[he,...B,...Z,...Ve,le,Ct,...st,$e,mr],endsParent:!0,illegal:/["']/},Ce={match:[/func/,/\s+/,i(Vt.match,X,y)],className:{1:"keyword",3:"title.function"},contains:[V,ve,M],illegal:[/\[/,/%/]},Ke={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[V,ve,M],illegal:/\[|%/},Ee={match:[/operator/,/\s+/,y],className:{1:"keyword",3:"title"}},Gt={begin:[/precedencegroup/,/\s+/,p],className:{1:"keyword",3:"title"},contains:[$e],keywords:[...f,...d],end:/}/};for(const ot of Ct.variants){const bt=ot.contains.find(lt=>lt.label==="interpol");bt.keywords=G;const en=[...Z,...ue,...Ve,le,Ct,...kt];bt.contains=[...en,{begin:/\(/,end:/\)/,contains:["self",...en]}]}return{name:"Swift",keywords:G,contains:[...B,Ce,Ke,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:G,contains:[D.inherit(D.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...Z]},Ee,Gt,{beginKeywords:"import",end:/$/,contains:[...B],relevance:0},...Z,...ue,...Ve,le,Ct,...kt,...st,$e,mr]}}return tf=A,tf}var rf,lT;function eF(){if(lT)return rf;lT=1;function n(e){return{name:"Tagger Script",contains:[{className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\\[()]/},{begin:/\(/,end:/\)/,contains:[{begin:/\\[()]/},"self"]}],relevance:10},{className:"keyword",begin:/\$[_a-zA-Z0-9]+(?=\()/},{className:"variable",begin:/%[_a-zA-Z0-9:]+%/},{className:"symbol",begin:/\\[\\nt$%,()]/},{className:"symbol",begin:/\\u[a-fA-F0-9]{4}/}]}}return rf=n,rf}var nf,cT;function tF(){if(cT)return nf;cT=1;function n(e){const t="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ ]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ ]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ ]|$)"}]},a={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,a]},o=e.inherit(s,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l="[0-9]{4}(-[0-9][0-9]){0,2}",u="([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?",d="(\\.[0-9]*)?",f="([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?",m={className:"number",begin:"\\b"+l+u+d+f+"\\b"},g={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},b={begin:/\{/,end:/\}/,contains:[g],illegal:"\\n",relevance:0},v={begin:"\\[",end:"\\]",contains:[g],illegal:"\\n",relevance:0},y=[i,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},m,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},b,v,s],N=[...y];return N.pop(),N.push(o),g.contains=N,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:y}}return nf=n,nf}var af,uT;function rF(){if(uT)return af;uT=1;function n(e){return{name:"Test Anything Protocol",case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:/---$/,end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}return af=n,af}var sf,dT;function nF(){if(dT)return sf;dT=1;function n(e){const t=e.regex,r=/[a-zA-Z_][a-zA-Z0-9_]*/,i={className:"number",variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{name:"Tcl",aliases:["tk"],keywords:["after","append","apply","array","auto_execok","auto_import","auto_load","auto_mkindex","auto_mkindex_old","auto_qualify","auto_reset","bgerror","binary","break","catch","cd","chan","clock","close","concat","continue","dde","dict","encoding","eof","error","eval","exec","exit","expr","fblocked","fconfigure","fcopy","file","fileevent","filename","flush","for","foreach","format","gets","glob","global","history","http","if","incr","info","interp","join","lappend|10","lassign|10","lindex|10","linsert|10","list","llength|10","load","lrange|10","lrepeat|10","lreplace|10","lreverse|10","lsearch|10","lset|10","lsort|10","mathfunc","mathop","memory","msgcat","namespace","open","package","parray","pid","pkg::create","pkg_mkIndex","platform","platform::shell","proc","puts","pwd","read","refchan","regexp","registry","regsub|10","rename","return","safe","scan","seek","set","socket","source","split","string","subst","switch","tcl_endOfWord","tcl_findLibrary","tcl_startOfNextWord","tcl_startOfPreviousWord","tcl_wordBreakAfter","tcl_wordBreakBefore","tcltest","tclvars","tell","time","tm","trace","unknown","unload","unset","update","uplevel","upvar","variable","vwait","while"],contains:[e.COMMENT(";[ \\t]*#","$"),e.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{begin:t.concat(/\$/,t.optional(/::/),r,"(::",r,")*")},{begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[i]}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},i]}}return sf=n,sf}var of,pT;function iF(){if(pT)return of;pT=1;function n(e){const t=["bool","byte","i16","i32","i64","double","string","binary"];return{name:"Thrift",keywords:{keyword:["namespace","const","typedef","struct","enum","service","exception","void","oneway","set","list","map","required","optional"],type:t,literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",keywords:{type:[...t,"set","list","map"]},end:">",contains:["self"]}]}}return of=n,of}var lf,fT;function aF(){if(fT)return lf;fT=1;function n(e){const t={className:"number",begin:"[1-9][0-9]*",relevance:0},r={className:"symbol",begin:":[^\\]]+"},i={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",t,r]},a={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",t,e.QUOTE_STRING_MODE,r]};return{name:"TP",keywords:{keyword:["ABORT","ACC","ADJUST","AND","AP_LD","BREAK","CALL","CNT","COL","CONDITION","CONFIG","DA","DB","DIV","DETECT","ELSE","END","ENDFOR","ERR_NUM","ERROR_PROG","FINE","FOR","GP","GUARD","INC","IF","JMP","LINEAR_MAX_SPEED","LOCK","MOD","MONITOR","OFFSET","Offset","OR","OVERRIDE","PAUSE","PREG","PTH","RT_LD","RUN","SELECT","SKIP","Skip","TA","TB","TO","TOOL_OFFSET","Tool_Offset","UF","UT","UFRAME_NUM","UTOOL_NUM","UNLOCK","WAIT","X","Y","Z","W","P","R","STRLEN","SUBSTR","FINDSTR","VOFFSET","PROG","ATTR","MN","POS"],literal:["ON","OFF","max_speed","LPOS","JPOS","ENABLE","DISABLE","START","STOP","RESET"]},contains:[i,a,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},e.COMMENT("//","[;$]"),e.COMMENT("!","[;$]"),e.COMMENT("--eg:","$"),e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},e.C_NUMBER_MODE,{className:"variable",begin:"\\$[A-Za-z0-9_]+"}]}}return lf=n,lf}var cf,hT;function sF(){if(hT)return cf;hT=1;function n(e){const t=e.regex,r=["absolute_url","asset|0","asset_version","attribute","block","constant","controller|0","country_timezones","csrf_token","cycle","date","dump","expression","form|0","form_end","form_errors","form_help","form_label","form_rest","form_row","form_start","form_widget","html_classes","include","is_granted","logout_path","logout_url","max","min","parent","path|0","random","range","relative_path","render","render_esi","source","template_from_string","url|0"],i=["abs","abbr_class","abbr_method","batch","capitalize","column","convert_encoding","country_name","currency_name","currency_symbol","data_uri","date","date_modify","default","escape","file_excerpt","file_link","file_relative","filter","first","format","format_args","format_args_as_text","format_currency","format_date","format_datetime","format_file","format_file_from_text","format_number","format_time","html_to_markdown","humanize","inky_to_html","inline_css","join","json_encode","keys","language_name","last","length","locale_name","lower","map","markdown","markdown_to_html","merge","nl2br","number_format","raw","reduce","replace","reverse","round","slice","slug","sort","spaceless","split","striptags","timezone_name","title","trans","transchoice","trim","u|0","upper","url_encode","yaml_dump","yaml_encode"];let a=["apply","autoescape","block","cache","deprecated","do","embed","extends","filter","flush","for","form_theme","from","if","import","include","macro","sandbox","set","stopwatch","trans","trans_default_domain","transchoice","use","verbatim","with"];a=a.concat(a.map(v=>`end${v}`));const s={scope:"string",variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},o={scope:"number",match:/\d+/},l={begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[s,o]},u={beginKeywords:r.join(" "),keywords:{name:r},relevance:0,contains:[l]},d={match:/\|(?=[A-Za-z_]+:?)/,beginScope:"punctuation",relevance:0,contains:[{match:/[A-Za-z_]+:?/,keywords:i}]},f=(v,{relevance:y})=>({beginScope:{1:"template-tag",3:"name"},relevance:y||2,endScope:"template-tag",begin:[/\{%/,/\s*/,t.either(...v)],end:/%\}/,keywords:"in",contains:[d,u,s,o]}),m=/[a-z_]+/,g=f(a,{relevance:2}),b=f([m],{relevance:1});return{name:"Twig",aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{#/,/#\}/),g,b,{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:["self",d,u,s,o]}]}}return cf=n,cf}var uf,mT;function oF(){if(mT)return uf;mT=1;const n="[A-Za-z$_][0-9A-Za-z$_]*",e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],t=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],i=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],a=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],o=[].concat(a,r,i);function l(d){const f=d.regex,m=(Me,{after:je})=>{const He="",end:""},v=/<[A-Za-z0-9\\._:-]+\s*\/>/,y={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Me,je)=>{const He=Me[0].length+Me.index,rt=Me.input[He];if(rt==="<"||rt===","){je.ignoreMatch();return}rt===">"&&(m(Me,{after:He})||je.ignoreMatch());let ft;const Ct=Me.input.substring(He);if(ft=Ct.match(/^\s*=/)){je.ignoreMatch();return}if((ft=Ct.match(/^\s+extends\s+/))&&ft.index===0){je.ignoreMatch();return}}},N={$pattern:n,keyword:e,literal:t,built_in:o,"variable.language":s},F="[0-9](_?[0-9])*",X=`\\.(${F})`,p="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",E={className:"number",variants:[{begin:`(\\b(${p})((${X})|\\.)?|(${X}))[eE][+-]?(${F})\\b`},{begin:`\\b(${p})\\b((${X})\\b|\\.)?|(${X})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},O={className:"subst",begin:"\\$\\{",end:"\\}",keywords:N,contains:[]},A={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,O],subLanguage:"xml"}},D={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,O],subLanguage:"css"}},M={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,O],subLanguage:"graphql"}},w={className:"string",begin:"`",end:"`",contains:[d.BACKSLASH_ESCAPE,O]},re={className:"comment",variants:[d.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:g+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),d.C_BLOCK_COMMENT_MODE,d.C_LINE_COMMENT_MODE]},ie=[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,A,D,M,w,{match:/\$\d+/},E];O.contains=ie.concat({begin:/\{/,end:/\}/,keywords:N,contains:["self"].concat(ie)});const j=[].concat(re,O.contains),J=j.concat([{begin:/\(/,end:/\)/,keywords:N,contains:["self"].concat(j)}]),L={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:N,contains:J},G={variants:[{match:[/class/,/\s+/,g,/\s+/,/extends/,/\s+/,f.concat(g,"(",f.concat(/\./,g),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,g],scope:{1:"keyword",3:"title.class"}}]},Z={relevance:0,match:f.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...i]}},z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},ce={variants:[{match:[/function/,/\s+/,g,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[L],illegal:/%/},ue={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Te(Me){return f.concat("(?!",Me.join("|"),")")}const Pe={match:f.concat(/\b/,Te([...a,"super","import"]),g,f.lookahead(/\(/)),className:"title.function",relevance:0},Ve={begin:f.concat(/\./,f.lookahead(f.concat(g,/(?![0-9A-Za-z$_(])/))),end:g,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Re={match:[/get|set/,/\s+/,g,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},L]},Ie="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+d.UNDERSCORE_IDENT_RE+")\\s*=>",le={match:[/const|var|let/,/\s+/,g,/\s*/,/=\s*/,/(async\s*)?/,f.lookahead(Ie)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[L]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:N,exports:{PARAMS_CONTAINS:J,CLASS_REFERENCE:Z},illegal:/#(?![$_A-z])/,contains:[d.SHEBANG({label:"shebang",binary:"node",relevance:5}),z,d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,A,D,M,w,re,{match:/\$\d+/},E,Z,{className:"attr",begin:g+f.lookahead(":"),relevance:0},le,{begin:"("+d.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[re,d.REGEXP_MODE,{className:"function",begin:Ie,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:d.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:N,contains:J}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:b.begin,end:b.end},{match:v},{begin:y.begin,"on:begin":y.isTrulyOpeningTag,end:y.end}],subLanguage:"xml",contains:[{begin:y.begin,end:y.end,skip:!0,contains:["self"]}]}]},ce,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+d.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[L,d.inherit(d.TITLE_MODE,{begin:g,className:"title.function"})]},{match:/\.\.\./,relevance:0},Ve,{match:"\\$"+g,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[L]},Pe,ue,G,Re,{match:/\$[(.]/}]}}function u(d){const f=l(d),m=n,g=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],b={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[f.exports.CLASS_REFERENCE]},v={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:g},contains:[f.exports.CLASS_REFERENCE]},y={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},N=["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"],F={$pattern:n,keyword:e.concat(N),literal:t,built_in:o.concat(g),"variable.language":s},X={className:"meta",begin:"@"+m},p=(O,A,D)=>{const M=O.contains.findIndex(w=>w.label===A);if(M===-1)throw new Error("can not find mode to replace");O.contains.splice(M,1,D)};Object.assign(f.keywords,F),f.exports.PARAMS_CONTAINS.push(X),f.contains=f.contains.concat([X,b,v]),p(f,"shebang",d.SHEBANG()),p(f,"use_strict",y);const E=f.contains.find(O=>O.label==="func.def");return E.relevance=0,Object.assign(f,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),f}return uf=u,uf}var df,_T;function lF(){if(_T)return df;_T=1;function n(e){return{name:"Vala",keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override virtual delegate if while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object Gtk Posix",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface namespace",end:/\{/,excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[e.UNDERSCORE_TITLE_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"^#",end:"$"}]}}return df=n,df}var pf,gT;function cF(){if(gT)return pf;gT=1;function n(e){const t=e.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},i={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},a=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,u={className:"literal",variants:[{begin:t.concat(/# */,t.either(s,a),/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(s,a),/ +/,t.either(o,l),/ *#/)}]},d={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},f={className:"label",begin:/^\w+:/},m=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),g=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,i,u,d,f,m,g,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[g]}]}}return pf=n,pf}var ff,ST;function uF(){if(ST)return ff;ST=1;function n(e){const t=e.regex,r=["lcase","month","vartype","instrrev","ubound","setlocale","getobject","rgb","getref","string","weekdayname","rnd","dateadd","monthname","now","day","minute","isarray","cbool","round","formatcurrency","conversions","csng","timevalue","second","year","space","abs","clng","timeserial","fixs","len","asc","isempty","maths","dateserial","atn","timer","isobject","filter","weekday","datevalue","ccur","isdate","instr","datediff","formatdatetime","replace","isnull","right","sgn","array","snumeric","log","cdbl","hex","chr","lbound","msgbox","ucase","getlocale","cos","cdate","cbyte","rtrim","join","hour","oct","typename","trim","strcomp","int","createobject","loadpicture","tan","formatnumber","mid","split","cint","sin","datepart","ltrim","sqr","time","derived","eval","date","formatpercent","exp","inputbox","left","ascw","chrw","regexp","cstr","err"],i=["server","response","request","scriptengine","scriptenginebuildversion","scriptengineminorversion","scriptenginemajorversion"],a={begin:t.concat(t.either(...r),"\\s*\\("),relevance:0,keywords:{built_in:r}};return{name:"VBScript",aliases:["vbs"],case_insensitive:!0,keywords:{keyword:["call","class","const","dim","do","loop","erase","execute","executeglobal","exit","for","each","next","function","if","then","else","on","error","option","explicit","new","private","property","let","get","public","randomize","redim","rem","select","case","set","stop","sub","while","wend","with","end","to","elseif","is","or","xor","and","not","class_initialize","class_terminate","default","preserve","in","me","byval","byref","step","resume","goto"],built_in:i,literal:["true","false","null","nothing","empty"]},illegal:"//",contains:[a,e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT(/'/,/$/,{relevance:0}),e.C_NUMBER_MODE]}}return ff=n,ff}var hf,OT;function dF(){if(OT)return hf;OT=1;function n(e){return{name:"VBScript in HTML",subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}return hf=n,hf}var mf,ET;function pF(){if(ET)return mf;ET=1;function n(e){const t=e.regex,r={$pattern:/\$?[\w]+(\$[\w]+)*/,keyword:["accept_on","alias","always","always_comb","always_ff","always_latch","and","assert","assign","assume","automatic","before","begin","bind","bins","binsof","bit","break","buf|0","bufif0","bufif1","byte","case","casex","casez","cell","chandle","checker","class","clocking","cmos","config","const","constraint","context","continue","cover","covergroup","coverpoint","cross","deassign","default","defparam","design","disable","dist","do","edge","else","end","endcase","endchecker","endclass","endclocking","endconfig","endfunction","endgenerate","endgroup","endinterface","endmodule","endpackage","endprimitive","endprogram","endproperty","endspecify","endsequence","endtable","endtask","enum","event","eventually","expect","export","extends","extern","final","first_match","for","force","foreach","forever","fork","forkjoin","function","generate|5","genvar","global","highz0","highz1","if","iff","ifnone","ignore_bins","illegal_bins","implements","implies","import","incdir","include","initial","inout","input","inside","instance","int","integer","interconnect","interface","intersect","join","join_any","join_none","large","let","liblist","library","local","localparam","logic","longint","macromodule","matches","medium","modport","module","nand","negedge","nettype","new","nexttime","nmos","nor","noshowcancelled","not","notif0","notif1","or","output","package","packed","parameter","pmos","posedge","primitive","priority","program","property","protected","pull0","pull1","pulldown","pullup","pulsestyle_ondetect","pulsestyle_onevent","pure","rand","randc","randcase","randsequence","rcmos","real","realtime","ref","reg","reject_on","release","repeat","restrict","return","rnmos","rpmos","rtran","rtranif0","rtranif1","s_always","s_eventually","s_nexttime","s_until","s_until_with","scalared","sequence","shortint","shortreal","showcancelled","signed","small","soft","solve","specify","specparam","static","string","strong","strong0","strong1","struct","super","supply0","supply1","sync_accept_on","sync_reject_on","table","tagged","task","this","throughout","time","timeprecision","timeunit","tran","tranif0","tranif1","tri","tri0","tri1","triand","trior","trireg","type","typedef","union","unique","unique0","unsigned","until","until_with","untyped","use","uwire","var","vectored","virtual","void","wait","wait_order","wand","weak","weak0","weak1","while","wildcard","wire","with","within","wor","xnor","xor"],literal:["null"],built_in:["$finish","$stop","$exit","$fatal","$error","$warning","$info","$realtime","$time","$printtimescale","$bitstoreal","$bitstoshortreal","$itor","$signed","$cast","$bits","$stime","$timeformat","$realtobits","$shortrealtobits","$rtoi","$unsigned","$asserton","$assertkill","$assertpasson","$assertfailon","$assertnonvacuouson","$assertoff","$assertcontrol","$assertpassoff","$assertfailoff","$assertvacuousoff","$isunbounded","$sampled","$fell","$changed","$past_gclk","$fell_gclk","$changed_gclk","$rising_gclk","$steady_gclk","$coverage_control","$coverage_get","$coverage_save","$set_coverage_db_name","$rose","$stable","$past","$rose_gclk","$stable_gclk","$future_gclk","$falling_gclk","$changing_gclk","$display","$coverage_get_max","$coverage_merge","$get_coverage","$load_coverage_db","$typename","$unpacked_dimensions","$left","$low","$increment","$clog2","$ln","$log10","$exp","$sqrt","$pow","$floor","$ceil","$sin","$cos","$tan","$countbits","$onehot","$isunknown","$fatal","$warning","$dimensions","$right","$high","$size","$asin","$acos","$atan","$atan2","$hypot","$sinh","$cosh","$tanh","$asinh","$acosh","$atanh","$countones","$onehot0","$error","$info","$random","$dist_chi_square","$dist_erlang","$dist_exponential","$dist_normal","$dist_poisson","$dist_t","$dist_uniform","$q_initialize","$q_remove","$q_exam","$async$and$array","$async$nand$array","$async$or$array","$async$nor$array","$sync$and$array","$sync$nand$array","$sync$or$array","$sync$nor$array","$q_add","$q_full","$psprintf","$async$and$plane","$async$nand$plane","$async$or$plane","$async$nor$plane","$sync$and$plane","$sync$nand$plane","$sync$or$plane","$sync$nor$plane","$system","$display","$displayb","$displayh","$displayo","$strobe","$strobeb","$strobeh","$strobeo","$write","$readmemb","$readmemh","$writememh","$value$plusargs","$dumpvars","$dumpon","$dumplimit","$dumpports","$dumpportson","$dumpportslimit","$writeb","$writeh","$writeo","$monitor","$monitorb","$monitorh","$monitoro","$writememb","$dumpfile","$dumpoff","$dumpall","$dumpflush","$dumpportsoff","$dumpportsall","$dumpportsflush","$fclose","$fdisplay","$fdisplayb","$fdisplayh","$fdisplayo","$fstrobe","$fstrobeb","$fstrobeh","$fstrobeo","$swrite","$swriteb","$swriteh","$swriteo","$fscanf","$fread","$fseek","$fflush","$feof","$fopen","$fwrite","$fwriteb","$fwriteh","$fwriteo","$fmonitor","$fmonitorb","$fmonitorh","$fmonitoro","$sformat","$sformatf","$fgetc","$ungetc","$fgets","$sscanf","$rewind","$ftell","$ferror"]},i=["__FILE__","__LINE__"],a=["begin_keywords","celldefine","default_nettype","default_decay_time","default_trireg_strength","define","delay_mode_distributed","delay_mode_path","delay_mode_unit","delay_mode_zero","else","elsif","end_keywords","endcelldefine","endif","ifdef","ifndef","include","line","nounconnected_drive","pragma","resetall","timescale","unconnected_drive","undef","undefineall"];return{name:"Verilog",aliases:["v","sv","svh"],case_insensitive:!1,keywords:r,contains:[e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,{scope:"number",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/\b((\d+'([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\B(('([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\b[0-9][0-9_]*/,relevance:0}]},{scope:"variable",variants:[{begin:"#\\((?!parameter).+\\)"},{begin:"\\.\\w+",relevance:0}]},{scope:"variable.constant",match:t.concat(/`/,t.either(...i))},{scope:"meta",begin:t.concat(/`/,t.either(...a)),end:/$|\/\/|\/\*/,returnEnd:!0,keywords:a}]}}return mf=n,mf}var _f,bT;function fF(){if(bT)return _f;bT=1;function n(e){const t="\\d(_|\\d)*",r="[eE][-+]?"+t,i=t+"(\\."+t+")?("+r+")?",a="\\w+",o="\\b("+(t+"#"+a+"(\\."+a+")?#("+r+")?")+"|"+i+")";return{name:"VHDL",case_insensitive:!0,keywords:{keyword:["abs","access","after","alias","all","and","architecture","array","assert","assume","assume_guarantee","attribute","begin","block","body","buffer","bus","case","component","configuration","constant","context","cover","disconnect","downto","default","else","elsif","end","entity","exit","fairness","file","for","force","function","generate","generic","group","guarded","if","impure","in","inertial","inout","is","label","library","linkage","literal","loop","map","mod","nand","new","next","nor","not","null","of","on","open","or","others","out","package","parameter","port","postponed","procedure","process","property","protected","pure","range","record","register","reject","release","rem","report","restrict","restrict_guarantee","return","rol","ror","select","sequence","severity","shared","signal","sla","sll","sra","srl","strong","subtype","then","to","transport","type","unaffected","units","until","use","variable","view","vmode","vprop","vunit","wait","when","while","with","xnor","xor"],built_in:["boolean","bit","character","integer","time","delay_length","natural","positive","string","bit_vector","file_open_kind","file_open_status","std_logic","std_logic_vector","unsigned","signed","boolean_vector","integer_vector","std_ulogic","std_ulogic_vector","unresolved_unsigned","u_unsigned","unresolved_signed","u_signed","real_vector","time_vector"],literal:["false","true","note","warning","error","failure","line","text","side","width"]},illegal:/\{/,contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT("--","$"),e.QUOTE_STRING_MODE,{className:"number",begin:o,relevance:0},{className:"string",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[e.BACKSLASH_ESCAPE]},{className:"symbol",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[e.BACKSLASH_ESCAPE]}]}}return _f=n,_f}var gf,TT;function hF(){if(TT)return gf;TT=1;function n(e){return{name:"Vim Script",keywords:{$pattern:/[!#@\w]+/,keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv complete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system inputrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf setloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed setqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log10 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getftime submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinvar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote_send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp"},illegal:/;/,contains:[e.NUMBER_MODE,{className:"string",begin:"'",end:"'",illegal:"\\n"},{className:"string",begin:/"(\\"|\n\\|[^"\n])*"/},e.COMMENT('"',"$"),{className:"variable",begin:/[bwtglsav]:[\w\d_]+/},{begin:[/\b(?:function|function!)/,/\s+/,e.IDENT_RE],className:{1:"keyword",3:"title"},end:"$",relevance:0,contains:[{className:"params",begin:"\\(",end:"\\)"}]},{className:"symbol",begin:/<[\w-]+>/}]}}return gf=n,gf}var Sf,CT;function mF(){if(CT)return Sf;CT=1;function n(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const r=e.COMMENT(/;;/,/$/),i=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],a={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},u={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},d={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:i},contains:[r,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,o,a,e.QUOTE_STRING_MODE,u,d,l]}}return Sf=n,Sf}var Of,vT;function _F(){if(vT)return Of;vT=1;function n(e){const t=e.regex,r=/[a-zA-Z]\w*/,i=["as","break","class","construct","continue","else","for","foreign","if","import","in","is","return","static","var","while"],a=["true","false","null"],s=["this","super"],o=["Bool","Class","Fiber","Fn","List","Map","Null","Num","Object","Range","Sequence","String","System"],l=["-","~",/\*/,"%",/\.\.\./,/\.\./,/\+/,"<<",">>",">=","<=","<",">",/\^/,/!=/,/!/,/\bis\b/,"==","&&","&",/\|\|/,/\|/,/\?:/,"="],u={relevance:0,match:t.concat(/\b(?!(if|while|for|else|super)\b)/,r,/(?=\s*[({])/),className:"title.function"},d={match:t.concat(t.either(t.concat(/\b(?!(if|while|for|else|super)\b)/,r),t.either(...l)),/(?=\s*\([^)]+\)\s*\{)/),className:"title.function",starts:{contains:[{begin:/\(/,end:/\)/,contains:[{relevance:0,scope:"params",match:r}]}]}},f={variants:[{match:[/class\s+/,r,/\s+is\s+/,r]},{match:[/class\s+/,r]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:i},m={relevance:0,match:t.either(...l),className:"operator"},g={className:"string",begin:/"""/,end:/"""/},b={className:"property",begin:t.concat(/\./,t.lookahead(r)),end:r,excludeBegin:!0,relevance:0},v={relevance:0,match:t.concat(/\b_/,r),scope:"variable"},y={relevance:0,match:/\b[A-Z]+[a-z]+([A-Z]+[a-z]+)*/,scope:"title.class",keywords:{_:o}},N=e.C_NUMBER_MODE,F={match:[r,/\s*/,/=/,/\s*/,/\(/,r,/\)\s*\{/],scope:{1:"title.function",3:"operator",6:"params"}},X=e.COMMENT(/\/\*\*/,/\*\//,{contains:[{match:/@[a-z]+/,scope:"doctag"},"self"]}),p={scope:"subst",begin:/%\(/,end:/\)/,contains:[N,y,u,v,m]},E={scope:"string",begin:/"/,end:/"/,contains:[p,{scope:"char.escape",variants:[{match:/\\\\|\\["0%abefnrtv]/},{match:/\\x[0-9A-F]{2}/},{match:/\\u[0-9A-F]{4}/},{match:/\\U[0-9A-F]{8}/}]}]};p.contains.push(E);const O=[...i,...s,...a],A={relevance:0,match:t.concat("\\b(?!",O.join("|"),"\\b)",/[a-zA-Z_]\w*(?:[?!]|\b)/),className:"variable"};return{name:"Wren",keywords:{keyword:i,"variable.language":s,literal:a},contains:[{scope:"comment",variants:[{begin:[/#!?/,/[A-Za-z_]+(?=\()/],beginScope:{},keywords:{literal:a},contains:[],end:/\)/},{begin:[/#!?/,/[A-Za-z_]+/],beginScope:{},end:/$/}]},N,E,g,X,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,y,f,F,d,u,m,v,b,A]}}return Of=n,Of}var Ef,yT;function gF(){if(yT)return Ef;yT=1;function n(e){return{name:"Intel x86 Assembly",case_insensitive:!0,keywords:{$pattern:"[.%]?"+e.IDENT_RE,keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[e.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*(\\.[0-9_]*)?(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"subst",begin:"%[0-9]+",relevance:0},{className:"subst",begin:"%!S+",relevance:0},{className:"meta",begin:/^\s*\.[\w_-]+/}]}}return Ef=n,Ef}var bf,AT;function SF(){if(AT)return bf;AT=1;function n(e){const t=["if","then","else","do","while","until","for","loop","import","with","is","as","where","when","by","data","constant","integer","real","text","name","boolean","symbol","infix","prefix","postfix","block","tree"],r=["in","mod","rem","and","or","xor","not","abs","sign","floor","ceil","sqrt","sin","cos","tan","asin","acos","atan","exp","expm1","log","log2","log10","log1p","pi","at","text_length","text_range","text_find","text_replace","contains","page","slide","basic_slide","title_slide","title","subtitle","fade_in","fade_out","fade_at","clear_color","color","line_color","line_width","texture_wrap","texture_transform","texture","scale_?x","scale_?y","scale_?z?","translate_?x","translate_?y","translate_?z?","rotate_?x","rotate_?y","rotate_?z?","rectangle","circle","ellipse","sphere","path","line_to","move_to","quad_to","curve_to","theme","background","contents","locally","time","mouse_?x","mouse_?y","mouse_buttons"],i=["ObjectLoader","Animate","MovieCredits","Slides","Filters","Shading","Materials","LensFlare","Mapping","VLCAudioVideo","StereoDecoder","PointCloud","NetworkAccess","RemoteControl","RegExp","ChromaKey","Snowfall","NodeJS","Speech","Charts"],s={$pattern:/[a-zA-Z][a-zA-Z0-9_?]*/,keyword:t,literal:["true","false","nil"],built_in:r.concat(i)},o={className:"string",begin:'"',end:'"',illegal:"\\n"},l={className:"string",begin:"'",end:"'",illegal:"\\n"},u={className:"string",begin:"<<",end:">>"},d={className:"number",begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?"},f={beginKeywords:"import",end:"$",keywords:s,contains:[o]},m={className:"function",begin:/[a-z][^\n]*->/,returnBegin:!0,end:/->/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,keywords:s}})]};return{name:"XL",aliases:["tao"],keywords:s,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,o,l,u,m,f,d,e.NUMBER_MODE]}}return bf=n,bf}var Tf,RT;function OF(){if(RT)return Tf;RT=1;function n(e){return{name:"XQuery",aliases:["xpath","xq"],case_insensitive:!1,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{$pattern:/[a-zA-Z$][a-zA-Z0-9_:-]*/,keyword:["module","schema","namespace","boundary-space","preserve","no-preserve","strip","default","collation","base-uri","ordering","context","decimal-format","decimal-separator","copy-namespaces","empty-sequence","except","exponent-separator","external","grouping-separator","inherit","no-inherit","lax","minus-sign","per-mille","percent","schema-attribute","schema-element","strict","unordered","zero-digit","declare","import","option","function","validate","variable","for","at","in","let","where","order","group","by","return","if","then","else","tumbling","sliding","window","start","when","only","end","previous","next","stable","ascending","descending","allowing","empty","greatest","least","some","every","satisfies","switch","case","typeswitch","try","catch","and","or","to","union","intersect","instance","of","treat","as","castable","cast","map","array","delete","insert","into","replace","value","rename","copy","modify","update"],type:["item","document-node","node","attribute","document","element","comment","namespace","namespace-node","processing-instruction","text","construction","xs:anyAtomicType","xs:untypedAtomic","xs:duration","xs:time","xs:decimal","xs:float","xs:double","xs:gYearMonth","xs:gYear","xs:gMonthDay","xs:gMonth","xs:gDay","xs:boolean","xs:base64Binary","xs:hexBinary","xs:anyURI","xs:QName","xs:NOTATION","xs:dateTime","xs:dateTimeStamp","xs:date","xs:string","xs:normalizedString","xs:token","xs:language","xs:NMTOKEN","xs:Name","xs:NCName","xs:ID","xs:IDREF","xs:ENTITY","xs:integer","xs:nonPositiveInteger","xs:negativeInteger","xs:long","xs:int","xs:short","xs:byte","xs:nonNegativeInteger","xs:unisignedLong","xs:unsignedInt","xs:unsignedShort","xs:unsignedByte","xs:positiveInteger","xs:yearMonthDuration","xs:dayTimeDuration"],literal:["eq","ne","lt","le","gt","ge","is","self::","child::","descendant::","descendant-or-self::","attribute::","following::","following-sibling::","parent::","ancestor::","ancestor-or-self::","preceding::","preceding-sibling::","NaN"]},contains:[{className:"variable",begin:/[$][\w\-:]+/},{className:"built_in",variants:[{begin:/\barray:/,end:/(?:append|filter|flatten|fold-(?:left|right)|for-each(?:-pair)?|get|head|insert-before|join|put|remove|reverse|size|sort|subarray|tail)\b/},{begin:/\bmap:/,end:/(?:contains|entry|find|for-each|get|keys|merge|put|remove|size)\b/},{begin:/\bmath:/,end:/(?:a(?:cos|sin|tan[2]?)|cos|exp(?:10)?|log(?:10)?|pi|pow|sin|sqrt|tan)\b/},{begin:/\bop:/,end:/\(/,excludeEnd:!0},{begin:/\bfn:/,end:/\(/,excludeEnd:!0},{begin:/[^/,end:/(\/[\w._:-]+>)/,subLanguage:"xml",contains:[{begin:/\{/,end:/\}/,subLanguage:"xquery"},"self"]}]}}return Tf=n,Tf}var Cf,IT;function EF(){if(IT)return Cf;IT=1;function n(e){const t={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},r=e.UNDERSCORE_TITLE_MODE,i={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},a="namespace class interface use extends function return abstract final public protected private static deprecated throw try catch Exception echo empty isset instanceof unset let var new const self require if else elseif switch case default do while loop for continue break likely unlikely __LINE__ __FILE__ __DIR__ __FUNCTION__ __CLASS__ __TRAIT__ __METHOD__ __NAMESPACE__ array boolean float double integer object resource string char long unsigned bool int uint ulong uchar true false null undefined";return{name:"Zephir",aliases:["zep"],keywords:a,contains:[e.C_LINE_COMMENT_MODE,e.COMMENT(/\/\*/,/\*\//,{contains:[{className:"doctag",begin:/@[A-Za-z]+/}]}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;/,contains:[e.BACKSLASH_ESCAPE]},{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function fn",end:/[;{]/,excludeEnd:!0,illegal:/\$|\[|%/,contains:[r,{className:"params",begin:/\(/,end:/\)/,keywords:a,contains:["self",e.C_BLOCK_COMMENT_MODE,t,i]}]},{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,illegal:/[:($"]/,contains:[{beginKeywords:"extends implements"},r]},{beginKeywords:"namespace",end:/;/,illegal:/[.']/,contains:[r]},{beginKeywords:"use",end:/;/,contains:[r]},{begin:/=>/},t,i]}}return Cf=n,Cf}var W=qP;W.registerLanguage("1c",VP());W.registerLanguage("abnf",HP());W.registerLanguage("accesslog",zP());W.registerLanguage("actionscript",WP());W.registerLanguage("ada",XP());W.registerLanguage("angelscript",ZP());W.registerLanguage("apache",KP());W.registerLanguage("applescript",jP());W.registerLanguage("arcade",JP());W.registerLanguage("arduino",e3());W.registerLanguage("armasm",t3());W.registerLanguage("xml",r3());W.registerLanguage("asciidoc",n3());W.registerLanguage("aspectj",i3());W.registerLanguage("autohotkey",a3());W.registerLanguage("autoit",s3());W.registerLanguage("avrasm",o3());W.registerLanguage("awk",l3());W.registerLanguage("axapta",c3());W.registerLanguage("bash",u3());W.registerLanguage("basic",d3());W.registerLanguage("bnf",p3());W.registerLanguage("brainfuck",f3());W.registerLanguage("c",h3());W.registerLanguage("cal",m3());W.registerLanguage("capnproto",_3());W.registerLanguage("ceylon",g3());W.registerLanguage("clean",S3());W.registerLanguage("clojure",O3());W.registerLanguage("clojure-repl",E3());W.registerLanguage("cmake",b3());W.registerLanguage("coffeescript",T3());W.registerLanguage("coq",C3());W.registerLanguage("cos",v3());W.registerLanguage("cpp",y3());W.registerLanguage("crmsh",A3());W.registerLanguage("crystal",R3());W.registerLanguage("csharp",I3());W.registerLanguage("csp",N3());W.registerLanguage("css",D3());W.registerLanguage("d",w3());W.registerLanguage("markdown",x3());W.registerLanguage("dart",L3());W.registerLanguage("delphi",k3());W.registerLanguage("diff",M3());W.registerLanguage("django",P3());W.registerLanguage("dns",B3());W.registerLanguage("dockerfile",U3());W.registerLanguage("dos",F3());W.registerLanguage("dsconfig",Y3());W.registerLanguage("dts",G3());W.registerLanguage("dust",Q3());W.registerLanguage("ebnf",$3());W.registerLanguage("elixir",q3());W.registerLanguage("elm",V3());W.registerLanguage("ruby",H3());W.registerLanguage("erb",z3());W.registerLanguage("erlang-repl",W3());W.registerLanguage("erlang",X3());W.registerLanguage("excel",Z3());W.registerLanguage("fix",K3());W.registerLanguage("flix",j3());W.registerLanguage("fortran",J3());W.registerLanguage("fsharp",eB());W.registerLanguage("gams",tB());W.registerLanguage("gauss",rB());W.registerLanguage("gcode",nB());W.registerLanguage("gherkin",iB());W.registerLanguage("glsl",aB());W.registerLanguage("gml",sB());W.registerLanguage("go",oB());W.registerLanguage("golo",lB());W.registerLanguage("gradle",cB());W.registerLanguage("graphql",uB());W.registerLanguage("groovy",dB());W.registerLanguage("haml",pB());W.registerLanguage("handlebars",fB());W.registerLanguage("haskell",hB());W.registerLanguage("haxe",mB());W.registerLanguage("hsp",_B());W.registerLanguage("http",gB());W.registerLanguage("hy",SB());W.registerLanguage("inform7",OB());W.registerLanguage("ini",EB());W.registerLanguage("irpf90",bB());W.registerLanguage("isbl",TB());W.registerLanguage("java",CB());W.registerLanguage("javascript",vB());W.registerLanguage("jboss-cli",yB());W.registerLanguage("json",AB());W.registerLanguage("julia",RB());W.registerLanguage("julia-repl",IB());W.registerLanguage("kotlin",NB());W.registerLanguage("lasso",DB());W.registerLanguage("latex",wB());W.registerLanguage("ldif",xB());W.registerLanguage("leaf",LB());W.registerLanguage("less",kB());W.registerLanguage("lisp",MB());W.registerLanguage("livecodeserver",PB());W.registerLanguage("livescript",BB());W.registerLanguage("llvm",UB());W.registerLanguage("lsl",FB());W.registerLanguage("lua",YB());W.registerLanguage("makefile",GB());W.registerLanguage("mathematica",QB());W.registerLanguage("matlab",$B());W.registerLanguage("maxima",qB());W.registerLanguage("mel",VB());W.registerLanguage("mercury",HB());W.registerLanguage("mipsasm",zB());W.registerLanguage("mizar",WB());W.registerLanguage("perl",XB());W.registerLanguage("mojolicious",ZB());W.registerLanguage("monkey",KB());W.registerLanguage("moonscript",jB());W.registerLanguage("n1ql",JB());W.registerLanguage("nestedtext",eU());W.registerLanguage("nginx",tU());W.registerLanguage("nim",rU());W.registerLanguage("nix",nU());W.registerLanguage("node-repl",iU());W.registerLanguage("nsis",aU());W.registerLanguage("objectivec",sU());W.registerLanguage("ocaml",oU());W.registerLanguage("openscad",lU());W.registerLanguage("oxygene",cU());W.registerLanguage("parser3",uU());W.registerLanguage("pf",dU());W.registerLanguage("pgsql",pU());W.registerLanguage("php",fU());W.registerLanguage("php-template",hU());W.registerLanguage("plaintext",mU());W.registerLanguage("pony",_U());W.registerLanguage("powershell",gU());W.registerLanguage("processing",SU());W.registerLanguage("profile",OU());W.registerLanguage("prolog",EU());W.registerLanguage("properties",bU());W.registerLanguage("protobuf",TU());W.registerLanguage("puppet",CU());W.registerLanguage("purebasic",vU());W.registerLanguage("python",yU());W.registerLanguage("python-repl",AU());W.registerLanguage("q",RU());W.registerLanguage("qml",IU());W.registerLanguage("r",NU());W.registerLanguage("reasonml",DU());W.registerLanguage("rib",wU());W.registerLanguage("roboconf",xU());W.registerLanguage("routeros",LU());W.registerLanguage("rsl",kU());W.registerLanguage("ruleslanguage",MU());W.registerLanguage("rust",PU());W.registerLanguage("sas",BU());W.registerLanguage("scala",UU());W.registerLanguage("scheme",FU());W.registerLanguage("scilab",YU());W.registerLanguage("scss",GU());W.registerLanguage("shell",QU());W.registerLanguage("smali",$U());W.registerLanguage("smalltalk",qU());W.registerLanguage("sml",VU());W.registerLanguage("sqf",HU());W.registerLanguage("sql",zU());W.registerLanguage("stan",WU());W.registerLanguage("stata",XU());W.registerLanguage("step21",ZU());W.registerLanguage("stylus",KU());W.registerLanguage("subunit",jU());W.registerLanguage("swift",JU());W.registerLanguage("taggerscript",eF());W.registerLanguage("yaml",tF());W.registerLanguage("tap",rF());W.registerLanguage("tcl",nF());W.registerLanguage("thrift",iF());W.registerLanguage("tp",aF());W.registerLanguage("twig",sF());W.registerLanguage("typescript",oF());W.registerLanguage("vala",lF());W.registerLanguage("vbnet",cF());W.registerLanguage("vbscript",uF());W.registerLanguage("vbscript-html",dF());W.registerLanguage("verilog",pF());W.registerLanguage("vhdl",fF());W.registerLanguage("vim",hF());W.registerLanguage("wasm",mF());W.registerLanguage("wren",_F());W.registerLanguage("x86asm",gF());W.registerLanguage("xl",SF());W.registerLanguage("xquery",OF());W.registerLanguage("zephir",EF());W.HighlightJS=W;W.default=W;var bF=W,TF=KM.decode,CF=jy,vf=bF,yf='class="',vF=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.pre,r=t===void 0?!1:t,i=e.auto_detection,a=i===void 0?!0:i,s=function(l,u,d){var f={left:"
]*>",right:"
",flags:"g"},m=function(b,v,y,N){v=TF(v);var F=(y.match(/class=\"([^ \"]+)/)||[])[1];if(!F&&!a)return b;if(y.includes(yf)){var X=y.indexOf(yf)+yf.length;y=y.slice(0,X)+"hljs "+y.slice(X)}else y=y.slice(0,-1)+' class="hljs">';return r&&F&&(y=y.replace("
",'
')),F&&vf.getLanguage(F)?y+vf.highlight(v,{language:F}).value+N:y+vf.highlightAuto(v).value+N};return CF.helper.replaceRecursiveRegExp(l,m,f.left,f.right,f.flags)};return[{type:"output",filter:s}]};const yF=Zy(vF),AF=wk;Jy.setFlavor("github");const NT={h1:"text-white lg:text-4xl text-xl lg:ml-4 lg:mx-4 mx-2 lg:my-4 my-2 lg:mb-8 mb-4 bg-neutral-900 rounded-lg py-2 px-2",h2:"text-white lg:text-3xl text-xl lg:ml-4 lg:mx-4 mx-2 lg:my-4 my-2 lg:mb-8 mb-4 bg-neutral-900 rounded-lg py-2 px-2",ul:"text-underline",li:"ml-12 list-disc lg:text-2xl text-base text-white lg:mx-4 mx-2 my-4 lg:pl-4 my-2 leading-normal",p:"lg:text-2xl text-base text-white lg:mx-4 mx-2 my-4 leading-normal",a:"lg:text-2xl text-base text-orange-300",code:"lg:my-4 sm:my-1 text-base lg:text-xl block whitespace-pre overflow-x-scroll",icode:"lg:my-4 my-1 lg:text-xl sm:text-xs text-white font-mono bg-neutral-600",blockquote:"text-neutral-200 border-l-4 border-neutral-500 pl-4 my-4 mx-4",table:"justify-center lg:my-8 my-2 lg:mx-8 mx-2 lg:text-2xl text-base w-full text-left text-white border-collapse",thead:"text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400",th:"lg:px-6 lg:py-6 px-2 py-2",td:"py-2",tr:"py-0"},RF=Object.keys(NT).map(n=>({type:"output",regex:new RegExp(`<${n}([^>]*)>`,"g"),replace:(e,t)=>`<${n} class="${NT[n]}" ${t}>`}));class IF{constructor(){I(this,"universes",Ih);I(this,"selected_universe");I(this,"local_index",1);I(this,"editor_mode","local");I(this,"fontSize");I(this,"withLineNumbers");I(this,"vimModeCompartment");I(this,"chosenLanguage");I(this,"currentDocumentationPane","introduction");I(this,"settings",new nk);I(this,"editorExtensions",[]);I(this,"userPlugins",[]);I(this,"state");I(this,"api");I(this,"audioContext");I(this,"view");I(this,"clock");I(this,"manualPlay",!1);I(this,"_mouseX",0);I(this,"_mouseY",0);I(this,"play_buttons",[document.getElementById("play-button-1"),document.getElementById("play-button-2")]);I(this,"pause_buttons",[document.getElementById("pause-button-1"),document.getElementById("pause-button-2")]);I(this,"stop_buttons",[document.getElementById("stop-button-1"),document.getElementById("stop-button-2")]);I(this,"clear_buttons",[document.getElementById("clear-button-1"),document.getElementById("clear-button-2")]);I(this,"documentation_button",document.getElementById("doc-button-1"));I(this,"eval_button",document.getElementById("eval-button-1"));I(this,"local_button",document.getElementById("local-button"));I(this,"global_button",document.getElementById("global-button"));I(this,"init_button",document.getElementById("init-button"));I(this,"note_button",document.getElementById("note-button"));I(this,"settings_button",document.getElementById("settings-button"));I(this,"close_settings_button",document.getElementById("close-settings-button"));I(this,"universe_viewer",document.getElementById("universe-viewer"));I(this,"buffer_modal",document.getElementById("modal-buffers"));I(this,"buffer_search",document.getElementById("buffer-search"));I(this,"local_script_tabs",document.getElementById("local-script-tabs"));I(this,"font_size_slider",document.getElementById("font-size-slider"));I(this,"font_size_witness",document.getElementById("font-size-witness"));I(this,"line_numbers_checkbox",document.getElementById("show-line-numbers"));I(this,"normal_mode_button",document.getElementById("normal-mode"));I(this,"vim_mode_button",document.getElementById("vim-mode"));I(this,"share_button",document.getElementById("share_button"));I(this,"error_line",document.getElementById("error_line"));I(this,"show_error",!1);I(this,"emptyUrl",()=>{window.history.replaceState({},document.title,"/")});I(this,"parseHash",e=>JSON.parse(e));this.selected_universe=this.settings.selected_universe,this.universe_viewer.innerHTML=`Topos: ${this.selected_universe}`,this.universes={...Ih,...this.settings.universes},this.audioContext=new AudioContext({latencyHint:"playback"}),this.clock=new Bk(this,this.audioContext),this.api=new XM(this),this.vimModeCompartment=new Xn,this.withLineNumbers=new Xn,this.chosenLanguage=new Xn,this.fontSize=new Xn;const e=this.settings.vimMode?Fc():[],t=this.settings.line_numbers?rg():[],r=Ae.theme({"&":{fontSize:`${this.settings.font_size}px`},".cm-gutters":{fontSize:`${this.settings.font_size}px`}});this.editorExtensions=[this.withLineNumbers.of(t),this.fontSize.of(r),this.vimModeCompartment.of(e),gk,aw,this.chosenLanguage.of(fh()),Ae.updateListener.of(o=>{})];let i=new Xn;this.state=ut.create({extensions:[...this.editorExtensions,Ae.lineWrapping,i.of(this.userPlugins),Jn.highest(Xi.of([{key:"Ctrl-Enter",run:()=>!0}])),Xi.of([hL])],doc:this.universes[this.selected_universe].locals[this.local_index].candidate}),this.view=new Ae({parent:document.getElementById("editor"),state:this.state}),document.addEventListener("keydown",o=>{o.key==="Tab"&&o.preventDefault(),o.ctrlKey&&o.key==="s"&&(o.preventDefault(),this.setButtonHighlighting("pause",!0),this.clock.pause()),o.ctrlKey&&o.key==="r"&&(o.preventDefault(),this.setButtonHighlighting("stop",!0),this.clock.stop()),o.ctrlKey&&o.key==="p"&&(o.preventDefault(),this.setButtonHighlighting("play",!0),this.clock.start()),(o.key==="v"||o.key==="V")&&o.ctrlKey&&o.shiftKey&&(this.settings.vimMode=!this.settings.vimMode,o.preventDefault(),this.userPlugins=this.settings.vimMode?[]:[Fc()],this.view.dispatch({effects:i.reconfigure(this.userPlugins)})),(o.key==="Enter"||o.key==="Return")&&o.ctrlKey&&(o.preventDefault(),this.currentFile().candidate=this.view.state.doc.toString(),this.flashBackground("#2d313d",200)),(o.key==="Enter"&&o.shiftKey||o.key==="e"&&o.ctrlKey)&&(o.preventDefault(),this.currentFile().candidate=this.view.state.doc.toString(),this.flashBackground("#2d313d",200)),o.ctrlKey&&o.key==="b"&&(this.hideDocumentation(),this.openBuffersModal()),o.shiftKey&&o.key==="Escape"&&this.openSettingsModal(),o.ctrlKey&&o.key==="l"&&(o.preventDefault(),this.changeModeFromInterface("local"),this.hideDocumentation(),this.view.focus()),o.ctrlKey&&o.key==="n"&&(o.preventDefault(),this.changeModeFromInterface("notes"),this.hideDocumentation(),this.view.focus()),o.ctrlKey&&o.key==="g"&&(o.preventDefault(),this.changeModeFromInterface("global"),this.hideDocumentation(),this.view.focus()),o.ctrlKey&&o.key==="i"&&(o.preventDefault(),this.changeModeFromInterface("init"),this.hideDocumentation(),this.changeToLocalBuffer(0),this.view.focus()),o.ctrlKey&&o.key==="d"&&(o.preventDefault(),this.showDocumentation()),[112,113,114,115,116,117,118,119,120].forEach((l,u)=>{o.keyCode===l&&(o.preventDefault(),o.ctrlKey?this.api.script(l-111):(this.changeModeFromInterface("local"),this.changeToLocalBuffer(u),this.hideDocumentation()))}),o.keyCode==121&&(this.changeModeFromInterface("global"),this.hideDocumentation()),o.keyCode==122&&(this.changeModeFromInterface("init"),this.hideDocumentation())});const a=document.querySelectorAll('[id^="tab-"]');for(let o=0;o{a[o].classList.add("bg-orange-300");for(let f=0;f{o.addEventListener("click",()=>{this.setButtonHighlighting("play",!0),this.clock.start()})}),this.clear_buttons.forEach(o=>{o.addEventListener("click",()=>{this.setButtonHighlighting("clear",!0),confirm("Do you want to reset the current universe?")&&(this.universes[this.selected_universe]=PS,this.updateEditorView())})}),this.documentation_button.addEventListener("click",()=>{this.showDocumentation()}),this.eval_button.addEventListener("click",()=>{this.currentFile().candidate=this.view.state.doc.toString(),this.flashBackground("#2d313d",200)}),this.pause_buttons.forEach(o=>{o.addEventListener("click",()=>{this.setButtonHighlighting("pause",!0),this.clock.pause()})}),this.stop_buttons.forEach(o=>{o.addEventListener("click",()=>{this.setButtonHighlighting("stop",!0),this.clock.stop()})}),this.local_button.addEventListener("click",()=>this.changeModeFromInterface("local")),this.global_button.addEventListener("click",()=>this.changeModeFromInterface("global")),this.init_button.addEventListener("click",()=>this.changeModeFromInterface("init")),this.note_button.addEventListener("click",()=>this.changeModeFromInterface("notes")),this.settings_button.addEventListener("click",()=>{var u;this.font_size_slider.value=this.settings.font_size.toString(),this.font_size_witness.innerHTML=`Font Size: ${this.settings.font_size}px`,(u=this.font_size_witness)==null||u.setAttribute("style",`font-size: ${this.settings.font_size}px;`),this.line_numbers_checkbox.checked=this.settings.line_numbers;let o=document.getElementById("modal-settings"),l=document.getElementById("editor");o==null||o.classList.remove("invisible"),l==null||l.classList.add("invisible")}),this.close_settings_button.addEventListener("click",()=>{let o=document.getElementById("modal-settings"),l=document.getElementById("editor");o==null||o.classList.add("invisible"),l==null||l.classList.remove("invisible")}),this.font_size_slider.addEventListener("input",()=>{const o=this.font_size_slider.value;this.settings.font_size=parseInt(o),this.font_size_witness.style.fontSize=`${o}px`,this.font_size_witness.innerHTML=`Font Size: ${o}px`;let l=Ae.theme({"&":{fontSize:o+"px"},".cm-gutters":{fontSize:o+"px"}});this.view.dispatch({effects:this.fontSize.reconfigure(l)}),this.settings.font_size=parseInt(o)}),this.share_button.addEventListener("click",()=>{this.share_button.classList.add("animate-spin"),setInterval(()=>this.share_button.classList.remove("animate-spin"),1e3),this.currentFile().candidate=dr.view.state.doc.toString(),this.currentFile().committed=dr.view.state.doc.toString(),this.settings.saveApplicationToLocalStorage(dr.universes,dr.settings),this.share()}),this.normal_mode_button.addEventListener("click",()=>{this.settings.vimMode=!1,this.view.dispatch({effects:this.vimModeCompartment.reconfigure([])})}),this.line_numbers_checkbox.addEventListener("change",()=>{let o=!!this.line_numbers_checkbox.checked;this.settings.line_numbers=o,this.view.dispatch({effects:this.withLineNumbers.reconfigure(o?[rg()]:[])})}),this.vim_mode_button.addEventListener("click",()=>{this.settings.vimMode=!0,this.view.dispatch({effects:this.vimModeCompartment.reconfigure(Fc())})}),this.buffer_search.addEventListener("keydown",o=>{if(o.key==="Enter"){let l=this.buffer_search.value;l.length>2&&l.length<20&&(this.loadUniverse(l),this.settings.selected_universe=l,this.buffer_search.value="",this.closeBuffersModal(),this.view.focus())}}),vl(this,this.universes[this.selected_universe.toString()].init),["introduction","interface","code","time","sound","samples","synths","midi","functions","reference","shortcuts","about"].forEach(o=>{let l="docs_"+o;document.getElementById(l).addEventListener("click",()=>{this.currentDocumentationPane=o,this.updateDocumentationContent()})}),Object.entries(this.api).forEach(([o,l])=>{globalThis[o]=l});let s=new URLSearchParams(window.location.search);if(s!==void 0){let o;if(s!==null){const l=s.get("universe");if(l!==null){o=JSON.parse(atob(l));const u=CA({dictionaries:[vA,AA,yA]});this.loadUniverse(u,o.universe),this.emptyUrl()}}}}get note_buffer(){return this.universes[this.selected_universe.toString()].notes}get global_buffer(){return this.universes[this.selected_universe.toString()].global}get init_buffer(){return this.universes[this.selected_universe.toString()].init}get local_buffer(){return this.universes[this.selected_universe.toString()].locals[this.local_index]}share(){const e=btoa(JSON.stringify({universe:this.settings.universes[this.selected_universe]})),t=new URL(window.location.href);t.searchParams.set("universe",e),window.history.replaceState({},"",t.toString()),navigator.clipboard.writeText(t.toString())}showDocumentation(){var e,t,r,i,a;(e=document.getElementById("app"))!=null&&e.classList.contains("hidden")?((t=document.getElementById("app"))==null||t.classList.remove("hidden"),(r=document.getElementById("documentation"))==null||r.classList.add("hidden")):((i=document.getElementById("app"))==null||i.classList.add("hidden"),(a=document.getElementById("documentation"))==null||a.classList.remove("hidden"),this.updateDocumentationContent())}hideDocumentation(){var e,t,r;(e=document.getElementById("app"))!=null&&e.classList.contains("hidden")&&((t=document.getElementById("app"))==null||t.classList.remove("hidden"),(r=document.getElementById("documentation"))==null||r.classList.add("hidden"))}updateDocumentationContent(){const t=new Jy.Converter({emoji:!0,moreStyling:!0,extensions:[yF({auto_detection:!0}),...RF]}).makeHtml(AF[this.currentDocumentationPane]);function r(i){let a=i.replace(//g,"
");return a=a.replace(/<\/code>/g,"
"),a}document.getElementById("documentation-content").innerHTML=r(t)}changeToLocalBuffer(e){const t=document.querySelectorAll('[id^="tab-"]'),r=t[e];r.classList.add("bg-orange-300");for(let a=0;a{t.forEach(a=>{let s=a.children[0];s.classList.contains("text-orange-300")&&(s.classList.remove("text-orange-300"),a.classList.remove("text-orange-300"))}),i.children[0].classList.remove("text-white"),i.children[0].classList.add("text-orange-300"),i.classList.add("text-orange-300")};switch(e){case"local":this.local_script_tabs.classList.contains("hidden")&&this.local_script_tabs.classList.remove("hidden"),this.editor_mode="local",this.local_index=0,this.changeToLocalBuffer(this.local_index),r(this.local_button);break;case"global":this.local_script_tabs.classList.contains("hidden")||this.local_script_tabs.classList.add("hidden"),this.editor_mode="global",r(this.global_button);break;case"init":this.local_script_tabs.classList.contains("hidden")||this.local_script_tabs.classList.add("hidden"),this.editor_mode="init",r(this.init_button);break;case"notes":this.local_script_tabs.classList.contains("hidden")||this.local_script_tabs.classList.add("hidden"),this.editor_mode="notes",r(this.note_button);break}this.view.dispatch({effects:this.chosenLanguage.reconfigure(this.editor_mode=="notes"?[ax()]:[fh()])}),this.updateEditorView()}setButtonHighlighting(e,t){this.flashBackground("#2d313d",200);const r=['[id^="play-button-"]','[id^="pause-button-"]','[id^="clear-button-"]','[id^="stop-button-"]'];let i;switch(e){case"play":i=0;break;case"pause":i=1;break;case"clear":i=2;break;case"stop":i=3;break}document.querySelectorAll(r[i]).forEach(a=>{t&&a.children[0].classList.add("fill-orange-300"),t&&a.children[0].classList.add("animate-pulse")}),document.querySelectorAll(r.filter((a,s)=>s!=i).join(",")).forEach(a=>{a.children[0].classList.remove("fill-orange-300"),a.children[0].classList.remove("text-orange-300"),a.children[0].classList.remove("bg-orange-300"),a.children[0].classList.remove("animate-pulse")})}unfocusPlayButtons(){document.querySelectorAll('[id^="play-button-"]').forEach(e=>{e.children[0].classList.remove("fill-orange-300"),e.children[0].classList.remove("animate-pulse")})}updateEditorView(){this.view.dispatch({changes:{from:0,to:this.view.state.doc.toString().length,insert:this.currentFile().candidate}})}currentFile(){switch(this.editor_mode){case"global":return this.global_buffer;case"local":return this.local_buffer;case"init":return this.init_buffer;case"notes":return this.note_buffer}}loadUniverse(e,t=PS){console.log(e,t),this.currentFile().candidate=this.view.state.doc.toString();let r=e.trim();this.universes[r]===void 0&&(this.settings.universes[r]=t,this.universes[r]=t),this.selected_universe=r,this.settings.selected_universe=this.selected_universe,this.universe_viewer.innerHTML=`Topos: ${r}`,this.updateEditorView(),vl(this,this.universes[this.selected_universe.toString()].init)}openSettingsModal(){document.getElementById("modal-settings").classList.contains("invisible")?(document.getElementById("editor").classList.add("invisible"),document.getElementById("modal-settings").classList.remove("invisible")):this.closeSettingsModal()}closeSettingsModal(){document.getElementById("editor").classList.remove("invisible"),document.getElementById("modal-settings").classList.add("invisible")}openBuffersModal(){document.getElementById("modal-buffers").classList.contains("invisible")?(document.getElementById("editor").classList.add("invisible"),document.getElementById("modal-buffers").classList.remove("invisible"),document.getElementById("buffer-search").focus()):this.closeBuffersModal()}closeBuffersModal(){document.getElementById("buffer-search").value="",document.getElementById("editor").classList.remove("invisible"),document.getElementById("modal").classList.add("invisible"),document.getElementById("modal-buffers").classList.add("invisible")}flashBackground(e,t){this.view.dom.style.backgroundColor=e;const r=this.view.dom.getElementsByClassName("cm-gutter");Array.from(r).forEach(i=>i.style.backgroundColor=e),setTimeout(()=>{this.view.dom.style.backgroundColor="",Array.from(r).forEach(i=>i.style.backgroundColor="")},t)}}const dr=new IF;function kl(){document.getElementById("editor").classList.remove("invisible"),document.getElementById("modal").classList.add("hidden"),document.getElementById("modal-container").classList.remove("motion-safe:animate-pulse"),document.getElementById("start-button").removeEventListener("click",kl),document.removeEventListener("click",kl),document.removeEventListener("keydown",pA),document.removeEventListener("click",fA),dr.clock.start(),dr.view.focus(),dr.setButtonHighlighting("play",!0)}function pA(n){(n.code==="Enter"||n.code==="Space")&&kl()}function fA(n){n.button===0&&kl()}document.addEventListener("keydown",pA);document.addEventListener("click",fA);function NF(n){dr._mouseX=n.clientX,dr._mouseY=n.clientY}window.addEventListener("mousemove",NF);window.addEventListener("beforeunload",()=>(event.preventDefault(),dr.currentFile().candidate=dr.view.state.doc.toString(),dr.currentFile().committed=dr.view.state.doc.toString(),dr.settings.saveApplicationToLocalStorage(dr.universes,dr.settings),dr.clock.stop(),null)); +`},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}return ef=n,ef}var tf,oT;function JU(){if(oT)return tf;oT=1;function n(D){return D?typeof D=="string"?D:D.source:null}function e(D){return t("(?=",D,")")}function t(...D){return D.map(w=>n(w)).join("")}function r(D){const M=D[D.length-1];return typeof M=="object"&&M.constructor===Object?(D.splice(D.length-1,1),M):{}}function i(...D){return"("+(r(D).capture?"":"?:")+D.map(B=>n(B)).join("|")+")"}const a=D=>t(/\b/,D,/\w$/.test(D)?/\b/:/\B/),s=["Protocol","Type"].map(a),o=["init","self"].map(a),l=["Any","Self"],u=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","distributed","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],d=["false","nil","true"],f=["assignment","associativity","higherThan","left","lowerThan","none","right"],m=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],g=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],b=i(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),v=i(b,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),y=t(b,v,"*"),N=i(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),F=i(N,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),X=t(N,F,"*"),p=t(/[A-Z]/,F,"*"),E=["autoclosure",t(/convention\(/,i("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",t(/objc\(/,X,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],O=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function A(D){const M={match:/\s+/,relevance:0},w=D.COMMENT("/\\*","\\*/",{contains:["self"]}),B=[D.C_LINE_COMMENT_MODE,w],re={match:[/\./,i(...s,...o)],className:{2:"keyword"}},ie={match:t(/\./,i(...u)),relevance:0},j=u.filter(ot=>typeof ot=="string").concat(["_|0"]),J=u.filter(ot=>typeof ot!="string").concat(l).map(a),L={variants:[{className:"keyword",match:i(...J,...o)}]},G={$pattern:i(/\b\w+/,/#\w+/),keyword:j.concat(m),literal:d},Z=[re,ie,L],z={match:t(/\./,i(...g)),relevance:0},ce={className:"built_in",match:t(/\b/,i(...g),/(?=\()/)},ue=[z,ce],Te={match:/->/,relevance:0},Pe={className:"operator",relevance:0,variants:[{match:y},{match:`\\.(\\.|${v})+`}]},Ve=[Te,Pe],Re="([0-9]_*)+",Ie="([0-9a-fA-F]_*)+",le={className:"number",relevance:0,variants:[{match:`\\b(${Re})(\\.(${Re}))?([eE][+-]?(${Re}))?\\b`},{match:`\\b0x(${Ie})(\\.(${Ie}))?([pP][+-]?(${Re}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},Me=(ot="")=>({className:"subst",variants:[{match:t(/\\/,ot,/[0\\tnr"']/)},{match:t(/\\/,ot,/u\{[0-9a-fA-F]{1,8}\}/)}]}),je=(ot="")=>({className:"subst",match:t(/\\/,ot,/[\t ]*(?:[\r\n]|\r\n)/)}),He=(ot="")=>({className:"subst",label:"interpol",begin:t(/\\/,ot,/\(/),end:/\)/}),rt=(ot="")=>({begin:t(ot,/"""/),end:t(/"""/,ot),contains:[Me(ot),je(ot),He(ot)]}),ft=(ot="")=>({begin:t(ot,/"/),end:t(/"/,ot),contains:[Me(ot),He(ot)]}),Ct={className:"string",variants:[rt(),rt("#"),rt("##"),rt("###"),ft(),ft("#"),ft("##"),ft("###")]},Vt={match:t(/`/,X,/`/)},ht={className:"variable",match:/\$\d+/},Nt={className:"variable",match:`\\$${F}+`},kt=[Vt,ht,Nt],Qr={match:/(@|#(un)?)available/,className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:O,contains:[...Ve,le,Ct]}]}},Fe={className:"keyword",match:t(/@/,i(...E))},Mr={className:"meta",match:t(/@/,X)},st=[Qr,Fe,Mr],$e={match:e(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:t(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,F,"+")},{className:"type",match:p,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:t(/\s+&\s+/,e(p)),relevance:0}]},Pr={begin://,keywords:G,contains:[...B,...Z,...st,Te,$e]};$e.contains.push(Pr);const nr={match:t(X,/\s*:/),keywords:"_|0",relevance:0},mr={begin:/\(/,end:/\)/,relevance:0,keywords:G,contains:["self",nr,...B,...Z,...ue,...Ve,le,Ct,...kt,...st,$e]},V={begin://,contains:[...B,$e]},he={begin:i(e(t(X,/\s*:/)),e(t(X,/\s+/,X,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:X}]},ve={begin:/\(/,end:/\)/,keywords:G,contains:[he,...B,...Z,...Ve,le,Ct,...st,$e,mr],endsParent:!0,illegal:/["']/},Ce={match:[/func/,/\s+/,i(Vt.match,X,y)],className:{1:"keyword",3:"title.function"},contains:[V,ve,M],illegal:[/\[/,/%/]},Ke={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[V,ve,M],illegal:/\[|%/},Ee={match:[/operator/,/\s+/,y],className:{1:"keyword",3:"title"}},Gt={begin:[/precedencegroup/,/\s+/,p],className:{1:"keyword",3:"title"},contains:[$e],keywords:[...f,...d],end:/}/};for(const ot of Ct.variants){const bt=ot.contains.find(lt=>lt.label==="interpol");bt.keywords=G;const en=[...Z,...ue,...Ve,le,Ct,...kt];bt.contains=[...en,{begin:/\(/,end:/\)/,contains:["self",...en]}]}return{name:"Swift",keywords:G,contains:[...B,Ce,Ke,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:G,contains:[D.inherit(D.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...Z]},Ee,Gt,{beginKeywords:"import",end:/$/,contains:[...B],relevance:0},...Z,...ue,...Ve,le,Ct,...kt,...st,$e,mr]}}return tf=A,tf}var rf,lT;function eF(){if(lT)return rf;lT=1;function n(e){return{name:"Tagger Script",contains:[{className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\\[()]/},{begin:/\(/,end:/\)/,contains:[{begin:/\\[()]/},"self"]}],relevance:10},{className:"keyword",begin:/\$[_a-zA-Z0-9]+(?=\()/},{className:"variable",begin:/%[_a-zA-Z0-9:]+%/},{className:"symbol",begin:/\\[\\nt$%,()]/},{className:"symbol",begin:/\\u[a-fA-F0-9]{4}/}]}}return rf=n,rf}var nf,cT;function tF(){if(cT)return nf;cT=1;function n(e){const t="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ ]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ ]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ ]|$)"}]},a={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,a]},o=e.inherit(s,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l="[0-9]{4}(-[0-9][0-9]){0,2}",u="([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?",d="(\\.[0-9]*)?",f="([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?",m={className:"number",begin:"\\b"+l+u+d+f+"\\b"},g={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},b={begin:/\{/,end:/\}/,contains:[g],illegal:"\\n",relevance:0},v={begin:"\\[",end:"\\]",contains:[g],illegal:"\\n",relevance:0},y=[i,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},m,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},b,v,s],N=[...y];return N.pop(),N.push(o),g.contains=N,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:y}}return nf=n,nf}var af,uT;function rF(){if(uT)return af;uT=1;function n(e){return{name:"Test Anything Protocol",case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:/---$/,end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}return af=n,af}var sf,dT;function nF(){if(dT)return sf;dT=1;function n(e){const t=e.regex,r=/[a-zA-Z_][a-zA-Z0-9_]*/,i={className:"number",variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{name:"Tcl",aliases:["tk"],keywords:["after","append","apply","array","auto_execok","auto_import","auto_load","auto_mkindex","auto_mkindex_old","auto_qualify","auto_reset","bgerror","binary","break","catch","cd","chan","clock","close","concat","continue","dde","dict","encoding","eof","error","eval","exec","exit","expr","fblocked","fconfigure","fcopy","file","fileevent","filename","flush","for","foreach","format","gets","glob","global","history","http","if","incr","info","interp","join","lappend|10","lassign|10","lindex|10","linsert|10","list","llength|10","load","lrange|10","lrepeat|10","lreplace|10","lreverse|10","lsearch|10","lset|10","lsort|10","mathfunc","mathop","memory","msgcat","namespace","open","package","parray","pid","pkg::create","pkg_mkIndex","platform","platform::shell","proc","puts","pwd","read","refchan","regexp","registry","regsub|10","rename","return","safe","scan","seek","set","socket","source","split","string","subst","switch","tcl_endOfWord","tcl_findLibrary","tcl_startOfNextWord","tcl_startOfPreviousWord","tcl_wordBreakAfter","tcl_wordBreakBefore","tcltest","tclvars","tell","time","tm","trace","unknown","unload","unset","update","uplevel","upvar","variable","vwait","while"],contains:[e.COMMENT(";[ \\t]*#","$"),e.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{begin:t.concat(/\$/,t.optional(/::/),r,"(::",r,")*")},{begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[i]}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},i]}}return sf=n,sf}var of,pT;function iF(){if(pT)return of;pT=1;function n(e){const t=["bool","byte","i16","i32","i64","double","string","binary"];return{name:"Thrift",keywords:{keyword:["namespace","const","typedef","struct","enum","service","exception","void","oneway","set","list","map","required","optional"],type:t,literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",keywords:{type:[...t,"set","list","map"]},end:">",contains:["self"]}]}}return of=n,of}var lf,fT;function aF(){if(fT)return lf;fT=1;function n(e){const t={className:"number",begin:"[1-9][0-9]*",relevance:0},r={className:"symbol",begin:":[^\\]]+"},i={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",t,r]},a={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",t,e.QUOTE_STRING_MODE,r]};return{name:"TP",keywords:{keyword:["ABORT","ACC","ADJUST","AND","AP_LD","BREAK","CALL","CNT","COL","CONDITION","CONFIG","DA","DB","DIV","DETECT","ELSE","END","ENDFOR","ERR_NUM","ERROR_PROG","FINE","FOR","GP","GUARD","INC","IF","JMP","LINEAR_MAX_SPEED","LOCK","MOD","MONITOR","OFFSET","Offset","OR","OVERRIDE","PAUSE","PREG","PTH","RT_LD","RUN","SELECT","SKIP","Skip","TA","TB","TO","TOOL_OFFSET","Tool_Offset","UF","UT","UFRAME_NUM","UTOOL_NUM","UNLOCK","WAIT","X","Y","Z","W","P","R","STRLEN","SUBSTR","FINDSTR","VOFFSET","PROG","ATTR","MN","POS"],literal:["ON","OFF","max_speed","LPOS","JPOS","ENABLE","DISABLE","START","STOP","RESET"]},contains:[i,a,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},e.COMMENT("//","[;$]"),e.COMMENT("!","[;$]"),e.COMMENT("--eg:","$"),e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},e.C_NUMBER_MODE,{className:"variable",begin:"\\$[A-Za-z0-9_]+"}]}}return lf=n,lf}var cf,hT;function sF(){if(hT)return cf;hT=1;function n(e){const t=e.regex,r=["absolute_url","asset|0","asset_version","attribute","block","constant","controller|0","country_timezones","csrf_token","cycle","date","dump","expression","form|0","form_end","form_errors","form_help","form_label","form_rest","form_row","form_start","form_widget","html_classes","include","is_granted","logout_path","logout_url","max","min","parent","path|0","random","range","relative_path","render","render_esi","source","template_from_string","url|0"],i=["abs","abbr_class","abbr_method","batch","capitalize","column","convert_encoding","country_name","currency_name","currency_symbol","data_uri","date","date_modify","default","escape","file_excerpt","file_link","file_relative","filter","first","format","format_args","format_args_as_text","format_currency","format_date","format_datetime","format_file","format_file_from_text","format_number","format_time","html_to_markdown","humanize","inky_to_html","inline_css","join","json_encode","keys","language_name","last","length","locale_name","lower","map","markdown","markdown_to_html","merge","nl2br","number_format","raw","reduce","replace","reverse","round","slice","slug","sort","spaceless","split","striptags","timezone_name","title","trans","transchoice","trim","u|0","upper","url_encode","yaml_dump","yaml_encode"];let a=["apply","autoescape","block","cache","deprecated","do","embed","extends","filter","flush","for","form_theme","from","if","import","include","macro","sandbox","set","stopwatch","trans","trans_default_domain","transchoice","use","verbatim","with"];a=a.concat(a.map(v=>`end${v}`));const s={scope:"string",variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},o={scope:"number",match:/\d+/},l={begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[s,o]},u={beginKeywords:r.join(" "),keywords:{name:r},relevance:0,contains:[l]},d={match:/\|(?=[A-Za-z_]+:?)/,beginScope:"punctuation",relevance:0,contains:[{match:/[A-Za-z_]+:?/,keywords:i}]},f=(v,{relevance:y})=>({beginScope:{1:"template-tag",3:"name"},relevance:y||2,endScope:"template-tag",begin:[/\{%/,/\s*/,t.either(...v)],end:/%\}/,keywords:"in",contains:[d,u,s,o]}),m=/[a-z_]+/,g=f(a,{relevance:2}),b=f([m],{relevance:1});return{name:"Twig",aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{#/,/#\}/),g,b,{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:["self",d,u,s,o]}]}}return cf=n,cf}var uf,mT;function oF(){if(mT)return uf;mT=1;const n="[A-Za-z$_][0-9A-Za-z$_]*",e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],t=["true","false","null","undefined","NaN","Infinity"],r=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],i=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],a=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],o=[].concat(a,r,i);function l(d){const f=d.regex,m=(Me,{after:je})=>{const He="",end:""},v=/<[A-Za-z0-9\\._:-]+\s*\/>/,y={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Me,je)=>{const He=Me[0].length+Me.index,rt=Me.input[He];if(rt==="<"||rt===","){je.ignoreMatch();return}rt===">"&&(m(Me,{after:He})||je.ignoreMatch());let ft;const Ct=Me.input.substring(He);if(ft=Ct.match(/^\s*=/)){je.ignoreMatch();return}if((ft=Ct.match(/^\s+extends\s+/))&&ft.index===0){je.ignoreMatch();return}}},N={$pattern:n,keyword:e,literal:t,built_in:o,"variable.language":s},F="[0-9](_?[0-9])*",X=`\\.(${F})`,p="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",E={className:"number",variants:[{begin:`(\\b(${p})((${X})|\\.)?|(${X}))[eE][+-]?(${F})\\b`},{begin:`\\b(${p})\\b((${X})\\b|\\.)?|(${X})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},O={className:"subst",begin:"\\$\\{",end:"\\}",keywords:N,contains:[]},A={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,O],subLanguage:"xml"}},D={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,O],subLanguage:"css"}},M={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,O],subLanguage:"graphql"}},w={className:"string",begin:"`",end:"`",contains:[d.BACKSLASH_ESCAPE,O]},re={className:"comment",variants:[d.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:g+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),d.C_BLOCK_COMMENT_MODE,d.C_LINE_COMMENT_MODE]},ie=[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,A,D,M,w,{match:/\$\d+/},E];O.contains=ie.concat({begin:/\{/,end:/\}/,keywords:N,contains:["self"].concat(ie)});const j=[].concat(re,O.contains),J=j.concat([{begin:/\(/,end:/\)/,keywords:N,contains:["self"].concat(j)}]),L={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:N,contains:J},G={variants:[{match:[/class/,/\s+/,g,/\s+/,/extends/,/\s+/,f.concat(g,"(",f.concat(/\./,g),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,g],scope:{1:"keyword",3:"title.class"}}]},Z={relevance:0,match:f.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...r,...i]}},z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},ce={variants:[{match:[/function/,/\s+/,g,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[L],illegal:/%/},ue={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Te(Me){return f.concat("(?!",Me.join("|"),")")}const Pe={match:f.concat(/\b/,Te([...a,"super","import"]),g,f.lookahead(/\(/)),className:"title.function",relevance:0},Ve={begin:f.concat(/\./,f.lookahead(f.concat(g,/(?![0-9A-Za-z$_(])/))),end:g,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Re={match:[/get|set/,/\s+/,g,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},L]},Ie="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+d.UNDERSCORE_IDENT_RE+")\\s*=>",le={match:[/const|var|let/,/\s+/,g,/\s*/,/=\s*/,/(async\s*)?/,f.lookahead(Ie)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[L]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:N,exports:{PARAMS_CONTAINS:J,CLASS_REFERENCE:Z},illegal:/#(?![$_A-z])/,contains:[d.SHEBANG({label:"shebang",binary:"node",relevance:5}),z,d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,A,D,M,w,re,{match:/\$\d+/},E,Z,{className:"attr",begin:g+f.lookahead(":"),relevance:0},le,{begin:"("+d.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[re,d.REGEXP_MODE,{className:"function",begin:Ie,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:d.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:N,contains:J}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:b.begin,end:b.end},{match:v},{begin:y.begin,"on:begin":y.isTrulyOpeningTag,end:y.end}],subLanguage:"xml",contains:[{begin:y.begin,end:y.end,skip:!0,contains:["self"]}]}]},ce,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+d.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[L,d.inherit(d.TITLE_MODE,{begin:g,className:"title.function"})]},{match:/\.\.\./,relevance:0},Ve,{match:"\\$"+g,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[L]},Pe,ue,G,Re,{match:/\$[(.]/}]}}function u(d){const f=l(d),m=n,g=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],b={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[f.exports.CLASS_REFERENCE]},v={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:g},contains:[f.exports.CLASS_REFERENCE]},y={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},N=["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"],F={$pattern:n,keyword:e.concat(N),literal:t,built_in:o.concat(g),"variable.language":s},X={className:"meta",begin:"@"+m},p=(O,A,D)=>{const M=O.contains.findIndex(w=>w.label===A);if(M===-1)throw new Error("can not find mode to replace");O.contains.splice(M,1,D)};Object.assign(f.keywords,F),f.exports.PARAMS_CONTAINS.push(X),f.contains=f.contains.concat([X,b,v]),p(f,"shebang",d.SHEBANG()),p(f,"use_strict",y);const E=f.contains.find(O=>O.label==="func.def");return E.relevance=0,Object.assign(f,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),f}return uf=u,uf}var df,_T;function lF(){if(_T)return df;_T=1;function n(e){return{name:"Vala",keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override virtual delegate if while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object Gtk Posix",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface namespace",end:/\{/,excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[e.UNDERSCORE_TITLE_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"^#",end:"$"}]}}return df=n,df}var pf,gT;function cF(){if(gT)return pf;gT=1;function n(e){const t=e.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},i={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},a=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,u={className:"literal",variants:[{begin:t.concat(/# */,t.either(s,a),/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(s,a),/ +/,t.either(o,l),/ *#/)}]},d={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},f={className:"label",begin:/^\w+:/},m=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),g=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,i,u,d,f,m,g,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[g]}]}}return pf=n,pf}var ff,ST;function uF(){if(ST)return ff;ST=1;function n(e){const t=e.regex,r=["lcase","month","vartype","instrrev","ubound","setlocale","getobject","rgb","getref","string","weekdayname","rnd","dateadd","monthname","now","day","minute","isarray","cbool","round","formatcurrency","conversions","csng","timevalue","second","year","space","abs","clng","timeserial","fixs","len","asc","isempty","maths","dateserial","atn","timer","isobject","filter","weekday","datevalue","ccur","isdate","instr","datediff","formatdatetime","replace","isnull","right","sgn","array","snumeric","log","cdbl","hex","chr","lbound","msgbox","ucase","getlocale","cos","cdate","cbyte","rtrim","join","hour","oct","typename","trim","strcomp","int","createobject","loadpicture","tan","formatnumber","mid","split","cint","sin","datepart","ltrim","sqr","time","derived","eval","date","formatpercent","exp","inputbox","left","ascw","chrw","regexp","cstr","err"],i=["server","response","request","scriptengine","scriptenginebuildversion","scriptengineminorversion","scriptenginemajorversion"],a={begin:t.concat(t.either(...r),"\\s*\\("),relevance:0,keywords:{built_in:r}};return{name:"VBScript",aliases:["vbs"],case_insensitive:!0,keywords:{keyword:["call","class","const","dim","do","loop","erase","execute","executeglobal","exit","for","each","next","function","if","then","else","on","error","option","explicit","new","private","property","let","get","public","randomize","redim","rem","select","case","set","stop","sub","while","wend","with","end","to","elseif","is","or","xor","and","not","class_initialize","class_terminate","default","preserve","in","me","byval","byref","step","resume","goto"],built_in:i,literal:["true","false","null","nothing","empty"]},illegal:"//",contains:[a,e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT(/'/,/$/,{relevance:0}),e.C_NUMBER_MODE]}}return ff=n,ff}var hf,OT;function dF(){if(OT)return hf;OT=1;function n(e){return{name:"VBScript in HTML",subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}return hf=n,hf}var mf,ET;function pF(){if(ET)return mf;ET=1;function n(e){const t=e.regex,r={$pattern:/\$?[\w]+(\$[\w]+)*/,keyword:["accept_on","alias","always","always_comb","always_ff","always_latch","and","assert","assign","assume","automatic","before","begin","bind","bins","binsof","bit","break","buf|0","bufif0","bufif1","byte","case","casex","casez","cell","chandle","checker","class","clocking","cmos","config","const","constraint","context","continue","cover","covergroup","coverpoint","cross","deassign","default","defparam","design","disable","dist","do","edge","else","end","endcase","endchecker","endclass","endclocking","endconfig","endfunction","endgenerate","endgroup","endinterface","endmodule","endpackage","endprimitive","endprogram","endproperty","endspecify","endsequence","endtable","endtask","enum","event","eventually","expect","export","extends","extern","final","first_match","for","force","foreach","forever","fork","forkjoin","function","generate|5","genvar","global","highz0","highz1","if","iff","ifnone","ignore_bins","illegal_bins","implements","implies","import","incdir","include","initial","inout","input","inside","instance","int","integer","interconnect","interface","intersect","join","join_any","join_none","large","let","liblist","library","local","localparam","logic","longint","macromodule","matches","medium","modport","module","nand","negedge","nettype","new","nexttime","nmos","nor","noshowcancelled","not","notif0","notif1","or","output","package","packed","parameter","pmos","posedge","primitive","priority","program","property","protected","pull0","pull1","pulldown","pullup","pulsestyle_ondetect","pulsestyle_onevent","pure","rand","randc","randcase","randsequence","rcmos","real","realtime","ref","reg","reject_on","release","repeat","restrict","return","rnmos","rpmos","rtran","rtranif0","rtranif1","s_always","s_eventually","s_nexttime","s_until","s_until_with","scalared","sequence","shortint","shortreal","showcancelled","signed","small","soft","solve","specify","specparam","static","string","strong","strong0","strong1","struct","super","supply0","supply1","sync_accept_on","sync_reject_on","table","tagged","task","this","throughout","time","timeprecision","timeunit","tran","tranif0","tranif1","tri","tri0","tri1","triand","trior","trireg","type","typedef","union","unique","unique0","unsigned","until","until_with","untyped","use","uwire","var","vectored","virtual","void","wait","wait_order","wand","weak","weak0","weak1","while","wildcard","wire","with","within","wor","xnor","xor"],literal:["null"],built_in:["$finish","$stop","$exit","$fatal","$error","$warning","$info","$realtime","$time","$printtimescale","$bitstoreal","$bitstoshortreal","$itor","$signed","$cast","$bits","$stime","$timeformat","$realtobits","$shortrealtobits","$rtoi","$unsigned","$asserton","$assertkill","$assertpasson","$assertfailon","$assertnonvacuouson","$assertoff","$assertcontrol","$assertpassoff","$assertfailoff","$assertvacuousoff","$isunbounded","$sampled","$fell","$changed","$past_gclk","$fell_gclk","$changed_gclk","$rising_gclk","$steady_gclk","$coverage_control","$coverage_get","$coverage_save","$set_coverage_db_name","$rose","$stable","$past","$rose_gclk","$stable_gclk","$future_gclk","$falling_gclk","$changing_gclk","$display","$coverage_get_max","$coverage_merge","$get_coverage","$load_coverage_db","$typename","$unpacked_dimensions","$left","$low","$increment","$clog2","$ln","$log10","$exp","$sqrt","$pow","$floor","$ceil","$sin","$cos","$tan","$countbits","$onehot","$isunknown","$fatal","$warning","$dimensions","$right","$high","$size","$asin","$acos","$atan","$atan2","$hypot","$sinh","$cosh","$tanh","$asinh","$acosh","$atanh","$countones","$onehot0","$error","$info","$random","$dist_chi_square","$dist_erlang","$dist_exponential","$dist_normal","$dist_poisson","$dist_t","$dist_uniform","$q_initialize","$q_remove","$q_exam","$async$and$array","$async$nand$array","$async$or$array","$async$nor$array","$sync$and$array","$sync$nand$array","$sync$or$array","$sync$nor$array","$q_add","$q_full","$psprintf","$async$and$plane","$async$nand$plane","$async$or$plane","$async$nor$plane","$sync$and$plane","$sync$nand$plane","$sync$or$plane","$sync$nor$plane","$system","$display","$displayb","$displayh","$displayo","$strobe","$strobeb","$strobeh","$strobeo","$write","$readmemb","$readmemh","$writememh","$value$plusargs","$dumpvars","$dumpon","$dumplimit","$dumpports","$dumpportson","$dumpportslimit","$writeb","$writeh","$writeo","$monitor","$monitorb","$monitorh","$monitoro","$writememb","$dumpfile","$dumpoff","$dumpall","$dumpflush","$dumpportsoff","$dumpportsall","$dumpportsflush","$fclose","$fdisplay","$fdisplayb","$fdisplayh","$fdisplayo","$fstrobe","$fstrobeb","$fstrobeh","$fstrobeo","$swrite","$swriteb","$swriteh","$swriteo","$fscanf","$fread","$fseek","$fflush","$feof","$fopen","$fwrite","$fwriteb","$fwriteh","$fwriteo","$fmonitor","$fmonitorb","$fmonitorh","$fmonitoro","$sformat","$sformatf","$fgetc","$ungetc","$fgets","$sscanf","$rewind","$ftell","$ferror"]},i=["__FILE__","__LINE__"],a=["begin_keywords","celldefine","default_nettype","default_decay_time","default_trireg_strength","define","delay_mode_distributed","delay_mode_path","delay_mode_unit","delay_mode_zero","else","elsif","end_keywords","endcelldefine","endif","ifdef","ifndef","include","line","nounconnected_drive","pragma","resetall","timescale","unconnected_drive","undef","undefineall"];return{name:"Verilog",aliases:["v","sv","svh"],case_insensitive:!1,keywords:r,contains:[e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,{scope:"number",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/\b((\d+'([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\B(('([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\b[0-9][0-9_]*/,relevance:0}]},{scope:"variable",variants:[{begin:"#\\((?!parameter).+\\)"},{begin:"\\.\\w+",relevance:0}]},{scope:"variable.constant",match:t.concat(/`/,t.either(...i))},{scope:"meta",begin:t.concat(/`/,t.either(...a)),end:/$|\/\/|\/\*/,returnEnd:!0,keywords:a}]}}return mf=n,mf}var _f,bT;function fF(){if(bT)return _f;bT=1;function n(e){const t="\\d(_|\\d)*",r="[eE][-+]?"+t,i=t+"(\\."+t+")?("+r+")?",a="\\w+",o="\\b("+(t+"#"+a+"(\\."+a+")?#("+r+")?")+"|"+i+")";return{name:"VHDL",case_insensitive:!0,keywords:{keyword:["abs","access","after","alias","all","and","architecture","array","assert","assume","assume_guarantee","attribute","begin","block","body","buffer","bus","case","component","configuration","constant","context","cover","disconnect","downto","default","else","elsif","end","entity","exit","fairness","file","for","force","function","generate","generic","group","guarded","if","impure","in","inertial","inout","is","label","library","linkage","literal","loop","map","mod","nand","new","next","nor","not","null","of","on","open","or","others","out","package","parameter","port","postponed","procedure","process","property","protected","pure","range","record","register","reject","release","rem","report","restrict","restrict_guarantee","return","rol","ror","select","sequence","severity","shared","signal","sla","sll","sra","srl","strong","subtype","then","to","transport","type","unaffected","units","until","use","variable","view","vmode","vprop","vunit","wait","when","while","with","xnor","xor"],built_in:["boolean","bit","character","integer","time","delay_length","natural","positive","string","bit_vector","file_open_kind","file_open_status","std_logic","std_logic_vector","unsigned","signed","boolean_vector","integer_vector","std_ulogic","std_ulogic_vector","unresolved_unsigned","u_unsigned","unresolved_signed","u_signed","real_vector","time_vector"],literal:["false","true","note","warning","error","failure","line","text","side","width"]},illegal:/\{/,contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT("--","$"),e.QUOTE_STRING_MODE,{className:"number",begin:o,relevance:0},{className:"string",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[e.BACKSLASH_ESCAPE]},{className:"symbol",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[e.BACKSLASH_ESCAPE]}]}}return _f=n,_f}var gf,TT;function hF(){if(TT)return gf;TT=1;function n(e){return{name:"Vim Script",keywords:{$pattern:/[!#@\w]+/,keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv complete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system inputrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf setloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed setqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log10 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getftime submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinvar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote_send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp"},illegal:/;/,contains:[e.NUMBER_MODE,{className:"string",begin:"'",end:"'",illegal:"\\n"},{className:"string",begin:/"(\\"|\n\\|[^"\n])*"/},e.COMMENT('"',"$"),{className:"variable",begin:/[bwtglsav]:[\w\d_]+/},{begin:[/\b(?:function|function!)/,/\s+/,e.IDENT_RE],className:{1:"keyword",3:"title"},end:"$",relevance:0,contains:[{className:"params",begin:"\\(",end:"\\)"}]},{className:"symbol",begin:/<[\w-]+>/}]}}return gf=n,gf}var Sf,CT;function mF(){if(CT)return Sf;CT=1;function n(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const r=e.COMMENT(/;;/,/$/),i=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],a={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},u={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},d={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:i},contains:[r,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,o,a,e.QUOTE_STRING_MODE,u,d,l]}}return Sf=n,Sf}var Of,vT;function _F(){if(vT)return Of;vT=1;function n(e){const t=e.regex,r=/[a-zA-Z]\w*/,i=["as","break","class","construct","continue","else","for","foreign","if","import","in","is","return","static","var","while"],a=["true","false","null"],s=["this","super"],o=["Bool","Class","Fiber","Fn","List","Map","Null","Num","Object","Range","Sequence","String","System"],l=["-","~",/\*/,"%",/\.\.\./,/\.\./,/\+/,"<<",">>",">=","<=","<",">",/\^/,/!=/,/!/,/\bis\b/,"==","&&","&",/\|\|/,/\|/,/\?:/,"="],u={relevance:0,match:t.concat(/\b(?!(if|while|for|else|super)\b)/,r,/(?=\s*[({])/),className:"title.function"},d={match:t.concat(t.either(t.concat(/\b(?!(if|while|for|else|super)\b)/,r),t.either(...l)),/(?=\s*\([^)]+\)\s*\{)/),className:"title.function",starts:{contains:[{begin:/\(/,end:/\)/,contains:[{relevance:0,scope:"params",match:r}]}]}},f={variants:[{match:[/class\s+/,r,/\s+is\s+/,r]},{match:[/class\s+/,r]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:i},m={relevance:0,match:t.either(...l),className:"operator"},g={className:"string",begin:/"""/,end:/"""/},b={className:"property",begin:t.concat(/\./,t.lookahead(r)),end:r,excludeBegin:!0,relevance:0},v={relevance:0,match:t.concat(/\b_/,r),scope:"variable"},y={relevance:0,match:/\b[A-Z]+[a-z]+([A-Z]+[a-z]+)*/,scope:"title.class",keywords:{_:o}},N=e.C_NUMBER_MODE,F={match:[r,/\s*/,/=/,/\s*/,/\(/,r,/\)\s*\{/],scope:{1:"title.function",3:"operator",6:"params"}},X=e.COMMENT(/\/\*\*/,/\*\//,{contains:[{match:/@[a-z]+/,scope:"doctag"},"self"]}),p={scope:"subst",begin:/%\(/,end:/\)/,contains:[N,y,u,v,m]},E={scope:"string",begin:/"/,end:/"/,contains:[p,{scope:"char.escape",variants:[{match:/\\\\|\\["0%abefnrtv]/},{match:/\\x[0-9A-F]{2}/},{match:/\\u[0-9A-F]{4}/},{match:/\\U[0-9A-F]{8}/}]}]};p.contains.push(E);const O=[...i,...s,...a],A={relevance:0,match:t.concat("\\b(?!",O.join("|"),"\\b)",/[a-zA-Z_]\w*(?:[?!]|\b)/),className:"variable"};return{name:"Wren",keywords:{keyword:i,"variable.language":s,literal:a},contains:[{scope:"comment",variants:[{begin:[/#!?/,/[A-Za-z_]+(?=\()/],beginScope:{},keywords:{literal:a},contains:[],end:/\)/},{begin:[/#!?/,/[A-Za-z_]+/],beginScope:{},end:/$/}]},N,E,g,X,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,y,f,F,d,u,m,v,b,A]}}return Of=n,Of}var Ef,yT;function gF(){if(yT)return Ef;yT=1;function n(e){return{name:"Intel x86 Assembly",case_insensitive:!0,keywords:{$pattern:"[.%]?"+e.IDENT_RE,keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[e.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*(\\.[0-9_]*)?(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"subst",begin:"%[0-9]+",relevance:0},{className:"subst",begin:"%!S+",relevance:0},{className:"meta",begin:/^\s*\.[\w_-]+/}]}}return Ef=n,Ef}var bf,AT;function SF(){if(AT)return bf;AT=1;function n(e){const t=["if","then","else","do","while","until","for","loop","import","with","is","as","where","when","by","data","constant","integer","real","text","name","boolean","symbol","infix","prefix","postfix","block","tree"],r=["in","mod","rem","and","or","xor","not","abs","sign","floor","ceil","sqrt","sin","cos","tan","asin","acos","atan","exp","expm1","log","log2","log10","log1p","pi","at","text_length","text_range","text_find","text_replace","contains","page","slide","basic_slide","title_slide","title","subtitle","fade_in","fade_out","fade_at","clear_color","color","line_color","line_width","texture_wrap","texture_transform","texture","scale_?x","scale_?y","scale_?z?","translate_?x","translate_?y","translate_?z?","rotate_?x","rotate_?y","rotate_?z?","rectangle","circle","ellipse","sphere","path","line_to","move_to","quad_to","curve_to","theme","background","contents","locally","time","mouse_?x","mouse_?y","mouse_buttons"],i=["ObjectLoader","Animate","MovieCredits","Slides","Filters","Shading","Materials","LensFlare","Mapping","VLCAudioVideo","StereoDecoder","PointCloud","NetworkAccess","RemoteControl","RegExp","ChromaKey","Snowfall","NodeJS","Speech","Charts"],s={$pattern:/[a-zA-Z][a-zA-Z0-9_?]*/,keyword:t,literal:["true","false","nil"],built_in:r.concat(i)},o={className:"string",begin:'"',end:'"',illegal:"\\n"},l={className:"string",begin:"'",end:"'",illegal:"\\n"},u={className:"string",begin:"<<",end:">>"},d={className:"number",begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?"},f={beginKeywords:"import",end:"$",keywords:s,contains:[o]},m={className:"function",begin:/[a-z][^\n]*->/,returnBegin:!0,end:/->/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,keywords:s}})]};return{name:"XL",aliases:["tao"],keywords:s,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,o,l,u,m,f,d,e.NUMBER_MODE]}}return bf=n,bf}var Tf,RT;function OF(){if(RT)return Tf;RT=1;function n(e){return{name:"XQuery",aliases:["xpath","xq"],case_insensitive:!1,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{$pattern:/[a-zA-Z$][a-zA-Z0-9_:-]*/,keyword:["module","schema","namespace","boundary-space","preserve","no-preserve","strip","default","collation","base-uri","ordering","context","decimal-format","decimal-separator","copy-namespaces","empty-sequence","except","exponent-separator","external","grouping-separator","inherit","no-inherit","lax","minus-sign","per-mille","percent","schema-attribute","schema-element","strict","unordered","zero-digit","declare","import","option","function","validate","variable","for","at","in","let","where","order","group","by","return","if","then","else","tumbling","sliding","window","start","when","only","end","previous","next","stable","ascending","descending","allowing","empty","greatest","least","some","every","satisfies","switch","case","typeswitch","try","catch","and","or","to","union","intersect","instance","of","treat","as","castable","cast","map","array","delete","insert","into","replace","value","rename","copy","modify","update"],type:["item","document-node","node","attribute","document","element","comment","namespace","namespace-node","processing-instruction","text","construction","xs:anyAtomicType","xs:untypedAtomic","xs:duration","xs:time","xs:decimal","xs:float","xs:double","xs:gYearMonth","xs:gYear","xs:gMonthDay","xs:gMonth","xs:gDay","xs:boolean","xs:base64Binary","xs:hexBinary","xs:anyURI","xs:QName","xs:NOTATION","xs:dateTime","xs:dateTimeStamp","xs:date","xs:string","xs:normalizedString","xs:token","xs:language","xs:NMTOKEN","xs:Name","xs:NCName","xs:ID","xs:IDREF","xs:ENTITY","xs:integer","xs:nonPositiveInteger","xs:negativeInteger","xs:long","xs:int","xs:short","xs:byte","xs:nonNegativeInteger","xs:unisignedLong","xs:unsignedInt","xs:unsignedShort","xs:unsignedByte","xs:positiveInteger","xs:yearMonthDuration","xs:dayTimeDuration"],literal:["eq","ne","lt","le","gt","ge","is","self::","child::","descendant::","descendant-or-self::","attribute::","following::","following-sibling::","parent::","ancestor::","ancestor-or-self::","preceding::","preceding-sibling::","NaN"]},contains:[{className:"variable",begin:/[$][\w\-:]+/},{className:"built_in",variants:[{begin:/\barray:/,end:/(?:append|filter|flatten|fold-(?:left|right)|for-each(?:-pair)?|get|head|insert-before|join|put|remove|reverse|size|sort|subarray|tail)\b/},{begin:/\bmap:/,end:/(?:contains|entry|find|for-each|get|keys|merge|put|remove|size)\b/},{begin:/\bmath:/,end:/(?:a(?:cos|sin|tan[2]?)|cos|exp(?:10)?|log(?:10)?|pi|pow|sin|sqrt|tan)\b/},{begin:/\bop:/,end:/\(/,excludeEnd:!0},{begin:/\bfn:/,end:/\(/,excludeEnd:!0},{begin:/[^/,end:/(\/[\w._:-]+>)/,subLanguage:"xml",contains:[{begin:/\{/,end:/\}/,subLanguage:"xquery"},"self"]}]}}return Tf=n,Tf}var Cf,IT;function EF(){if(IT)return Cf;IT=1;function n(e){const t={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},r=e.UNDERSCORE_TITLE_MODE,i={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},a="namespace class interface use extends function return abstract final public protected private static deprecated throw try catch Exception echo empty isset instanceof unset let var new const self require if else elseif switch case default do while loop for continue break likely unlikely __LINE__ __FILE__ __DIR__ __FUNCTION__ __CLASS__ __TRAIT__ __METHOD__ __NAMESPACE__ array boolean float double integer object resource string char long unsigned bool int uint ulong uchar true false null undefined";return{name:"Zephir",aliases:["zep"],keywords:a,contains:[e.C_LINE_COMMENT_MODE,e.COMMENT(/\/\*/,/\*\//,{contains:[{className:"doctag",begin:/@[A-Za-z]+/}]}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;/,contains:[e.BACKSLASH_ESCAPE]},{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function fn",end:/[;{]/,excludeEnd:!0,illegal:/\$|\[|%/,contains:[r,{className:"params",begin:/\(/,end:/\)/,keywords:a,contains:["self",e.C_BLOCK_COMMENT_MODE,t,i]}]},{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,illegal:/[:($"]/,contains:[{beginKeywords:"extends implements"},r]},{beginKeywords:"namespace",end:/;/,illegal:/[.']/,contains:[r]},{beginKeywords:"use",end:/;/,contains:[r]},{begin:/=>/},t,i]}}return Cf=n,Cf}var W=qP;W.registerLanguage("1c",VP());W.registerLanguage("abnf",HP());W.registerLanguage("accesslog",zP());W.registerLanguage("actionscript",WP());W.registerLanguage("ada",XP());W.registerLanguage("angelscript",ZP());W.registerLanguage("apache",KP());W.registerLanguage("applescript",jP());W.registerLanguage("arcade",JP());W.registerLanguage("arduino",e3());W.registerLanguage("armasm",t3());W.registerLanguage("xml",r3());W.registerLanguage("asciidoc",n3());W.registerLanguage("aspectj",i3());W.registerLanguage("autohotkey",a3());W.registerLanguage("autoit",s3());W.registerLanguage("avrasm",o3());W.registerLanguage("awk",l3());W.registerLanguage("axapta",c3());W.registerLanguage("bash",u3());W.registerLanguage("basic",d3());W.registerLanguage("bnf",p3());W.registerLanguage("brainfuck",f3());W.registerLanguage("c",h3());W.registerLanguage("cal",m3());W.registerLanguage("capnproto",_3());W.registerLanguage("ceylon",g3());W.registerLanguage("clean",S3());W.registerLanguage("clojure",O3());W.registerLanguage("clojure-repl",E3());W.registerLanguage("cmake",b3());W.registerLanguage("coffeescript",T3());W.registerLanguage("coq",C3());W.registerLanguage("cos",v3());W.registerLanguage("cpp",y3());W.registerLanguage("crmsh",A3());W.registerLanguage("crystal",R3());W.registerLanguage("csharp",I3());W.registerLanguage("csp",N3());W.registerLanguage("css",D3());W.registerLanguage("d",w3());W.registerLanguage("markdown",x3());W.registerLanguage("dart",L3());W.registerLanguage("delphi",k3());W.registerLanguage("diff",M3());W.registerLanguage("django",P3());W.registerLanguage("dns",B3());W.registerLanguage("dockerfile",U3());W.registerLanguage("dos",F3());W.registerLanguage("dsconfig",Y3());W.registerLanguage("dts",G3());W.registerLanguage("dust",Q3());W.registerLanguage("ebnf",$3());W.registerLanguage("elixir",q3());W.registerLanguage("elm",V3());W.registerLanguage("ruby",H3());W.registerLanguage("erb",z3());W.registerLanguage("erlang-repl",W3());W.registerLanguage("erlang",X3());W.registerLanguage("excel",Z3());W.registerLanguage("fix",K3());W.registerLanguage("flix",j3());W.registerLanguage("fortran",J3());W.registerLanguage("fsharp",eB());W.registerLanguage("gams",tB());W.registerLanguage("gauss",rB());W.registerLanguage("gcode",nB());W.registerLanguage("gherkin",iB());W.registerLanguage("glsl",aB());W.registerLanguage("gml",sB());W.registerLanguage("go",oB());W.registerLanguage("golo",lB());W.registerLanguage("gradle",cB());W.registerLanguage("graphql",uB());W.registerLanguage("groovy",dB());W.registerLanguage("haml",pB());W.registerLanguage("handlebars",fB());W.registerLanguage("haskell",hB());W.registerLanguage("haxe",mB());W.registerLanguage("hsp",_B());W.registerLanguage("http",gB());W.registerLanguage("hy",SB());W.registerLanguage("inform7",OB());W.registerLanguage("ini",EB());W.registerLanguage("irpf90",bB());W.registerLanguage("isbl",TB());W.registerLanguage("java",CB());W.registerLanguage("javascript",vB());W.registerLanguage("jboss-cli",yB());W.registerLanguage("json",AB());W.registerLanguage("julia",RB());W.registerLanguage("julia-repl",IB());W.registerLanguage("kotlin",NB());W.registerLanguage("lasso",DB());W.registerLanguage("latex",wB());W.registerLanguage("ldif",xB());W.registerLanguage("leaf",LB());W.registerLanguage("less",kB());W.registerLanguage("lisp",MB());W.registerLanguage("livecodeserver",PB());W.registerLanguage("livescript",BB());W.registerLanguage("llvm",UB());W.registerLanguage("lsl",FB());W.registerLanguage("lua",YB());W.registerLanguage("makefile",GB());W.registerLanguage("mathematica",QB());W.registerLanguage("matlab",$B());W.registerLanguage("maxima",qB());W.registerLanguage("mel",VB());W.registerLanguage("mercury",HB());W.registerLanguage("mipsasm",zB());W.registerLanguage("mizar",WB());W.registerLanguage("perl",XB());W.registerLanguage("mojolicious",ZB());W.registerLanguage("monkey",KB());W.registerLanguage("moonscript",jB());W.registerLanguage("n1ql",JB());W.registerLanguage("nestedtext",eU());W.registerLanguage("nginx",tU());W.registerLanguage("nim",rU());W.registerLanguage("nix",nU());W.registerLanguage("node-repl",iU());W.registerLanguage("nsis",aU());W.registerLanguage("objectivec",sU());W.registerLanguage("ocaml",oU());W.registerLanguage("openscad",lU());W.registerLanguage("oxygene",cU());W.registerLanguage("parser3",uU());W.registerLanguage("pf",dU());W.registerLanguage("pgsql",pU());W.registerLanguage("php",fU());W.registerLanguage("php-template",hU());W.registerLanguage("plaintext",mU());W.registerLanguage("pony",_U());W.registerLanguage("powershell",gU());W.registerLanguage("processing",SU());W.registerLanguage("profile",OU());W.registerLanguage("prolog",EU());W.registerLanguage("properties",bU());W.registerLanguage("protobuf",TU());W.registerLanguage("puppet",CU());W.registerLanguage("purebasic",vU());W.registerLanguage("python",yU());W.registerLanguage("python-repl",AU());W.registerLanguage("q",RU());W.registerLanguage("qml",IU());W.registerLanguage("r",NU());W.registerLanguage("reasonml",DU());W.registerLanguage("rib",wU());W.registerLanguage("roboconf",xU());W.registerLanguage("routeros",LU());W.registerLanguage("rsl",kU());W.registerLanguage("ruleslanguage",MU());W.registerLanguage("rust",PU());W.registerLanguage("sas",BU());W.registerLanguage("scala",UU());W.registerLanguage("scheme",FU());W.registerLanguage("scilab",YU());W.registerLanguage("scss",GU());W.registerLanguage("shell",QU());W.registerLanguage("smali",$U());W.registerLanguage("smalltalk",qU());W.registerLanguage("sml",VU());W.registerLanguage("sqf",HU());W.registerLanguage("sql",zU());W.registerLanguage("stan",WU());W.registerLanguage("stata",XU());W.registerLanguage("step21",ZU());W.registerLanguage("stylus",KU());W.registerLanguage("subunit",jU());W.registerLanguage("swift",JU());W.registerLanguage("taggerscript",eF());W.registerLanguage("yaml",tF());W.registerLanguage("tap",rF());W.registerLanguage("tcl",nF());W.registerLanguage("thrift",iF());W.registerLanguage("tp",aF());W.registerLanguage("twig",sF());W.registerLanguage("typescript",oF());W.registerLanguage("vala",lF());W.registerLanguage("vbnet",cF());W.registerLanguage("vbscript",uF());W.registerLanguage("vbscript-html",dF());W.registerLanguage("verilog",pF());W.registerLanguage("vhdl",fF());W.registerLanguage("vim",hF());W.registerLanguage("wasm",mF());W.registerLanguage("wren",_F());W.registerLanguage("x86asm",gF());W.registerLanguage("xl",SF());W.registerLanguage("xquery",OF());W.registerLanguage("zephir",EF());W.HighlightJS=W;W.default=W;var bF=W,TF=KM.decode,CF=jy,vf=bF,yf='class="',vF=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.pre,r=t===void 0?!1:t,i=e.auto_detection,a=i===void 0?!0:i,s=function(l,u,d){var f={left:"
]*>",right:"
",flags:"g"},m=function(b,v,y,N){v=TF(v);var F=(y.match(/class=\"([^ \"]+)/)||[])[1];if(!F&&!a)return b;if(y.includes(yf)){var X=y.indexOf(yf)+yf.length;y=y.slice(0,X)+"hljs "+y.slice(X)}else y=y.slice(0,-1)+' class="hljs">';return r&&F&&(y=y.replace("
",'
')),F&&vf.getLanguage(F)?y+vf.highlight(v,{language:F}).value+N:y+vf.highlightAuto(v).value+N};return CF.helper.replaceRecursiveRegExp(l,m,f.left,f.right,f.flags)};return[{type:"output",filter:s}]};const yF=Zy(vF),AF=wk;Jy.setFlavor("github");const NT={h1:"text-white lg:text-4xl text-xl lg:ml-4 lg:mx-4 mx-2 lg:my-4 my-2 lg:mb-8 mb-4 bg-neutral-900 rounded-lg py-2 px-2",h2:"text-white lg:text-3xl text-xl lg:ml-4 lg:mx-4 mx-2 lg:my-4 my-2 lg:mb-8 mb-4 bg-neutral-900 rounded-lg py-2 px-2",ul:"text-underline",li:"ml-12 list-disc lg:text-2xl text-base text-white lg:mx-4 mx-2 my-4 lg:pl-4 my-2 leading-normal",p:"lg:text-2xl text-base text-white lg:mx-4 mx-2 my-4 leading-normal",a:"lg:text-2xl text-base text-orange-300",code:"lg:my-4 sm:my-1 text-base lg:text-xl block whitespace-pre overflow-x-scroll",icode:"lg:my-4 my-1 lg:text-xl sm:text-xs text-white font-mono bg-neutral-600",blockquote:"text-neutral-200 border-l-4 border-neutral-500 pl-4 my-4 mx-4",table:"justify-center lg:my-8 my-2 lg:mx-8 mx-2 lg:text-2xl text-base w-full text-left text-white border-collapse",thead:"text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400",th:"lg:px-6 lg:py-6 px-2 py-2",td:"py-2",tr:"py-0"},RF=Object.keys(NT).map(n=>({type:"output",regex:new RegExp(`<${n}([^>]*)>`,"g"),replace:(e,t)=>`<${n} class="${NT[n]}" ${t}>`}));class IF{constructor(){R(this,"universes",Ih);R(this,"selected_universe");R(this,"local_index",1);R(this,"editor_mode","local");R(this,"fontSize");R(this,"withLineNumbers");R(this,"vimModeCompartment");R(this,"chosenLanguage");R(this,"currentDocumentationPane","introduction");R(this,"settings",new nk);R(this,"editorExtensions",[]);R(this,"userPlugins",[]);R(this,"state");R(this,"api");R(this,"audioContext");R(this,"view");R(this,"clock");R(this,"manualPlay",!1);R(this,"_mouseX",0);R(this,"_mouseY",0);R(this,"play_buttons",[document.getElementById("play-button-1"),document.getElementById("play-button-2")]);R(this,"pause_buttons",[document.getElementById("pause-button-1"),document.getElementById("pause-button-2")]);R(this,"stop_buttons",[document.getElementById("stop-button-1"),document.getElementById("stop-button-2")]);R(this,"clear_buttons",[document.getElementById("clear-button-1"),document.getElementById("clear-button-2")]);R(this,"documentation_button",document.getElementById("doc-button-1"));R(this,"eval_button",document.getElementById("eval-button-1"));R(this,"local_button",document.getElementById("local-button"));R(this,"global_button",document.getElementById("global-button"));R(this,"init_button",document.getElementById("init-button"));R(this,"note_button",document.getElementById("note-button"));R(this,"settings_button",document.getElementById("settings-button"));R(this,"close_settings_button",document.getElementById("close-settings-button"));R(this,"universe_viewer",document.getElementById("universe-viewer"));R(this,"buffer_modal",document.getElementById("modal-buffers"));R(this,"buffer_search",document.getElementById("buffer-search"));R(this,"local_script_tabs",document.getElementById("local-script-tabs"));R(this,"font_size_slider",document.getElementById("font-size-slider"));R(this,"font_size_witness",document.getElementById("font-size-witness"));R(this,"line_numbers_checkbox",document.getElementById("show-line-numbers"));R(this,"normal_mode_button",document.getElementById("normal-mode"));R(this,"vim_mode_button",document.getElementById("vim-mode"));R(this,"share_button",document.getElementById("share_button"));R(this,"error_line",document.getElementById("error_line"));R(this,"show_error",!1);R(this,"emptyUrl",()=>{window.history.replaceState({},document.title,"/")});R(this,"parseHash",e=>JSON.parse(e));this.selected_universe=this.settings.selected_universe,this.universe_viewer.innerHTML=`Topos: ${this.selected_universe}`,this.universes={...Ih,...this.settings.universes},this.audioContext=new AudioContext({latencyHint:"playback"}),this.clock=new Bk(this,this.audioContext),this.api=new XM(this),this.vimModeCompartment=new Xn,this.withLineNumbers=new Xn,this.chosenLanguage=new Xn,this.fontSize=new Xn;const e=this.settings.vimMode?Fc():[],t=this.settings.line_numbers?rg():[],r=Ae.theme({"&":{fontSize:`${this.settings.font_size}px`},".cm-gutters":{fontSize:`${this.settings.font_size}px`}});this.editorExtensions=[this.withLineNumbers.of(t),this.fontSize.of(r),this.vimModeCompartment.of(e),gk,aw,this.chosenLanguage.of(fh()),Ae.updateListener.of(o=>{})];let i=new Xn;this.state=ut.create({extensions:[...this.editorExtensions,Ae.lineWrapping,i.of(this.userPlugins),Jn.highest(Xi.of([{key:"Ctrl-Enter",run:()=>!0}])),Xi.of([hL])],doc:this.universes[this.selected_universe].locals[this.local_index].candidate}),this.view=new Ae({parent:document.getElementById("editor"),state:this.state}),document.addEventListener("keydown",o=>{o.key==="Tab"&&o.preventDefault(),o.ctrlKey&&o.key==="s"&&(o.preventDefault(),this.setButtonHighlighting("pause",!0),this.clock.pause()),o.ctrlKey&&o.key==="r"&&(o.preventDefault(),this.setButtonHighlighting("stop",!0),this.clock.stop()),o.ctrlKey&&o.key==="p"&&(o.preventDefault(),this.setButtonHighlighting("play",!0),this.clock.start()),(o.key==="v"||o.key==="V")&&o.ctrlKey&&o.shiftKey&&(this.settings.vimMode=!this.settings.vimMode,o.preventDefault(),this.userPlugins=this.settings.vimMode?[]:[Fc()],this.view.dispatch({effects:i.reconfigure(this.userPlugins)})),(o.key==="Enter"||o.key==="Return")&&o.ctrlKey&&(o.preventDefault(),this.currentFile().candidate=this.view.state.doc.toString(),this.flashBackground("#2d313d",200)),(o.key==="Enter"&&o.shiftKey||o.key==="e"&&o.ctrlKey)&&(o.preventDefault(),this.currentFile().candidate=this.view.state.doc.toString(),this.flashBackground("#2d313d",200)),o.ctrlKey&&o.key==="b"&&(this.hideDocumentation(),this.openBuffersModal()),o.shiftKey&&o.key==="Escape"&&this.openSettingsModal(),o.ctrlKey&&o.key==="l"&&(o.preventDefault(),this.changeModeFromInterface("local"),this.hideDocumentation(),this.view.focus()),o.ctrlKey&&o.key==="n"&&(o.preventDefault(),this.changeModeFromInterface("notes"),this.hideDocumentation(),this.view.focus()),o.ctrlKey&&o.key==="g"&&(o.preventDefault(),this.changeModeFromInterface("global"),this.hideDocumentation(),this.view.focus()),o.ctrlKey&&o.key==="i"&&(o.preventDefault(),this.changeModeFromInterface("init"),this.hideDocumentation(),this.changeToLocalBuffer(0),this.view.focus()),o.ctrlKey&&o.key==="d"&&(o.preventDefault(),this.showDocumentation()),[112,113,114,115,116,117,118,119,120].forEach((l,u)=>{o.keyCode===l&&(o.preventDefault(),o.ctrlKey?this.api.script(l-111):(this.changeModeFromInterface("local"),this.changeToLocalBuffer(u),this.hideDocumentation()))}),o.keyCode==121&&(this.changeModeFromInterface("global"),this.hideDocumentation()),o.keyCode==122&&(this.changeModeFromInterface("init"),this.hideDocumentation())});const a=document.querySelectorAll('[id^="tab-"]');for(let o=0;o{a[o].classList.add("bg-orange-300");for(let f=0;f{o.addEventListener("click",()=>{this.setButtonHighlighting("play",!0),this.clock.start()})}),this.clear_buttons.forEach(o=>{o.addEventListener("click",()=>{this.setButtonHighlighting("clear",!0),confirm("Do you want to reset the current universe?")&&(this.universes[this.selected_universe]=PS,this.updateEditorView())})}),this.documentation_button.addEventListener("click",()=>{this.showDocumentation()}),this.eval_button.addEventListener("click",()=>{this.currentFile().candidate=this.view.state.doc.toString(),this.flashBackground("#2d313d",200)}),this.pause_buttons.forEach(o=>{o.addEventListener("click",()=>{this.setButtonHighlighting("pause",!0),this.clock.pause()})}),this.stop_buttons.forEach(o=>{o.addEventListener("click",()=>{this.setButtonHighlighting("stop",!0),this.clock.stop()})}),this.local_button.addEventListener("click",()=>this.changeModeFromInterface("local")),this.global_button.addEventListener("click",()=>this.changeModeFromInterface("global")),this.init_button.addEventListener("click",()=>this.changeModeFromInterface("init")),this.note_button.addEventListener("click",()=>this.changeModeFromInterface("notes")),this.settings_button.addEventListener("click",()=>{var u;this.font_size_slider.value=this.settings.font_size.toString(),this.font_size_witness.innerHTML=`Font Size: ${this.settings.font_size}px`,(u=this.font_size_witness)==null||u.setAttribute("style",`font-size: ${this.settings.font_size}px;`),this.line_numbers_checkbox.checked=this.settings.line_numbers;let o=document.getElementById("modal-settings"),l=document.getElementById("editor");o==null||o.classList.remove("invisible"),l==null||l.classList.add("invisible")}),this.close_settings_button.addEventListener("click",()=>{let o=document.getElementById("modal-settings"),l=document.getElementById("editor");o==null||o.classList.add("invisible"),l==null||l.classList.remove("invisible")}),this.font_size_slider.addEventListener("input",()=>{const o=this.font_size_slider.value;this.settings.font_size=parseInt(o),this.font_size_witness.style.fontSize=`${o}px`,this.font_size_witness.innerHTML=`Font Size: ${o}px`;let l=Ae.theme({"&":{fontSize:o+"px"},".cm-gutters":{fontSize:o+"px"}});this.view.dispatch({effects:this.fontSize.reconfigure(l)}),this.settings.font_size=parseInt(o)}),this.share_button.addEventListener("click",()=>{this.share_button.classList.add("animate-spin"),setInterval(()=>this.share_button.classList.remove("animate-spin"),1e3),this.currentFile().candidate=dr.view.state.doc.toString(),this.currentFile().committed=dr.view.state.doc.toString(),this.settings.saveApplicationToLocalStorage(dr.universes,dr.settings),this.share()}),this.normal_mode_button.addEventListener("click",()=>{this.settings.vimMode=!1,this.view.dispatch({effects:this.vimModeCompartment.reconfigure([])})}),this.line_numbers_checkbox.addEventListener("change",()=>{let o=!!this.line_numbers_checkbox.checked;this.settings.line_numbers=o,this.view.dispatch({effects:this.withLineNumbers.reconfigure(o?[rg()]:[])})}),this.vim_mode_button.addEventListener("click",()=>{this.settings.vimMode=!0,this.view.dispatch({effects:this.vimModeCompartment.reconfigure(Fc())})}),this.buffer_search.addEventListener("keydown",o=>{if(o.key==="Enter"){let l=this.buffer_search.value;l.length>2&&l.length<20&&(this.loadUniverse(l),this.settings.selected_universe=l,this.buffer_search.value="",this.closeBuffersModal(),this.view.focus())}}),vl(this,this.universes[this.selected_universe.toString()].init),["introduction","interface","code","time","sound","samples","synths","midi","functions","reference","shortcuts","about"].forEach(o=>{let l="docs_"+o;document.getElementById(l).addEventListener("click",()=>{this.currentDocumentationPane=o,this.updateDocumentationContent()})}),Object.entries(this.api).forEach(([o,l])=>{globalThis[o]=l});let s=new URLSearchParams(window.location.search);if(s!==void 0){let o;if(s!==null){const l=s.get("universe");if(l!==null){o=JSON.parse(atob(l));const u=CA({dictionaries:[vA,AA,yA]});this.loadUniverse(u,o.universe),this.emptyUrl()}}}}get note_buffer(){return this.universes[this.selected_universe.toString()].notes}get global_buffer(){return this.universes[this.selected_universe.toString()].global}get init_buffer(){return this.universes[this.selected_universe.toString()].init}get local_buffer(){return this.universes[this.selected_universe.toString()].locals[this.local_index]}share(){const e=btoa(JSON.stringify({universe:this.settings.universes[this.selected_universe]})),t=new URL(window.location.href);t.searchParams.set("universe",e),window.history.replaceState({},"",t.toString()),navigator.clipboard.writeText(t.toString())}showDocumentation(){var e,t,r,i,a;(e=document.getElementById("app"))!=null&&e.classList.contains("hidden")?((t=document.getElementById("app"))==null||t.classList.remove("hidden"),(r=document.getElementById("documentation"))==null||r.classList.add("hidden")):((i=document.getElementById("app"))==null||i.classList.add("hidden"),(a=document.getElementById("documentation"))==null||a.classList.remove("hidden"),this.updateDocumentationContent())}hideDocumentation(){var e,t,r;(e=document.getElementById("app"))!=null&&e.classList.contains("hidden")&&((t=document.getElementById("app"))==null||t.classList.remove("hidden"),(r=document.getElementById("documentation"))==null||r.classList.add("hidden"))}updateDocumentationContent(){const t=new Jy.Converter({emoji:!0,moreStyling:!0,extensions:[yF({auto_detection:!0}),...RF]}).makeHtml(AF[this.currentDocumentationPane]);function r(i){let a=i.replace(//g,"
");return a=a.replace(/<\/code>/g,"
"),a}document.getElementById("documentation-content").innerHTML=r(t)}changeToLocalBuffer(e){const t=document.querySelectorAll('[id^="tab-"]'),r=t[e];r.classList.add("bg-orange-300");for(let a=0;a{t.forEach(a=>{let s=a.children[0];s.classList.contains("text-orange-300")&&(s.classList.remove("text-orange-300"),a.classList.remove("text-orange-300"))}),i.children[0].classList.remove("text-white"),i.children[0].classList.add("text-orange-300"),i.classList.add("text-orange-300")};switch(e){case"local":this.local_script_tabs.classList.contains("hidden")&&this.local_script_tabs.classList.remove("hidden"),this.editor_mode="local",this.local_index=0,this.changeToLocalBuffer(this.local_index),r(this.local_button);break;case"global":this.local_script_tabs.classList.contains("hidden")||this.local_script_tabs.classList.add("hidden"),this.editor_mode="global",r(this.global_button);break;case"init":this.local_script_tabs.classList.contains("hidden")||this.local_script_tabs.classList.add("hidden"),this.editor_mode="init",r(this.init_button);break;case"notes":this.local_script_tabs.classList.contains("hidden")||this.local_script_tabs.classList.add("hidden"),this.editor_mode="notes",r(this.note_button);break}this.view.dispatch({effects:this.chosenLanguage.reconfigure(this.editor_mode=="notes"?[ax()]:[fh()])}),this.updateEditorView()}setButtonHighlighting(e,t){this.flashBackground("#2d313d",200);const r=['[id^="play-button-"]','[id^="pause-button-"]','[id^="clear-button-"]','[id^="stop-button-"]'];let i;switch(e){case"play":i=0;break;case"pause":i=1;break;case"clear":i=2;break;case"stop":i=3;break}document.querySelectorAll(r[i]).forEach(a=>{t&&a.children[0].classList.add("fill-orange-300"),t&&a.children[0].classList.add("animate-pulse")}),document.querySelectorAll(r.filter((a,s)=>s!=i).join(",")).forEach(a=>{a.children[0].classList.remove("fill-orange-300"),a.children[0].classList.remove("text-orange-300"),a.children[0].classList.remove("bg-orange-300"),a.children[0].classList.remove("animate-pulse")})}unfocusPlayButtons(){document.querySelectorAll('[id^="play-button-"]').forEach(e=>{e.children[0].classList.remove("fill-orange-300"),e.children[0].classList.remove("animate-pulse")})}updateEditorView(){this.view.dispatch({changes:{from:0,to:this.view.state.doc.toString().length,insert:this.currentFile().candidate}})}currentFile(){switch(this.editor_mode){case"global":return this.global_buffer;case"local":return this.local_buffer;case"init":return this.init_buffer;case"notes":return this.note_buffer}}loadUniverse(e,t=PS){console.log(e,t),this.currentFile().candidate=this.view.state.doc.toString();let r=e.trim();this.universes[r]===void 0&&(this.settings.universes[r]=t,this.universes[r]=t),this.selected_universe=r,this.settings.selected_universe=this.selected_universe,this.universe_viewer.innerHTML=`Topos: ${r}`,this.updateEditorView(),vl(this,this.universes[this.selected_universe.toString()].init)}openSettingsModal(){document.getElementById("modal-settings").classList.contains("invisible")?(document.getElementById("editor").classList.add("invisible"),document.getElementById("modal-settings").classList.remove("invisible")):this.closeSettingsModal()}closeSettingsModal(){document.getElementById("editor").classList.remove("invisible"),document.getElementById("modal-settings").classList.add("invisible")}openBuffersModal(){document.getElementById("modal-buffers").classList.contains("invisible")?(document.getElementById("editor").classList.add("invisible"),document.getElementById("modal-buffers").classList.remove("invisible"),document.getElementById("buffer-search").focus()):this.closeBuffersModal()}closeBuffersModal(){document.getElementById("buffer-search").value="",document.getElementById("editor").classList.remove("invisible"),document.getElementById("modal").classList.add("invisible"),document.getElementById("modal-buffers").classList.add("invisible")}flashBackground(e,t){this.view.dom.style.backgroundColor=e;const r=this.view.dom.getElementsByClassName("cm-gutter");Array.from(r).forEach(i=>i.style.backgroundColor=e),setTimeout(()=>{this.view.dom.style.backgroundColor="",Array.from(r).forEach(i=>i.style.backgroundColor="")},t)}}const dr=new IF;function kl(){document.getElementById("editor").classList.remove("invisible"),document.getElementById("modal").classList.add("hidden"),document.getElementById("modal-container").classList.remove("motion-safe:animate-pulse"),document.getElementById("start-button").removeEventListener("click",kl),document.removeEventListener("click",kl),document.removeEventListener("keydown",pA),document.removeEventListener("click",fA),dr.clock.start(),dr.view.focus(),dr.setButtonHighlighting("play",!0)}function pA(n){(n.code==="Enter"||n.code==="Space")&&kl()}function fA(n){n.button===0&&kl()}document.addEventListener("keydown",pA);document.addEventListener("click",fA);function NF(n){dr._mouseX=n.clientX,dr._mouseY=n.clientY}window.addEventListener("mousemove",NF);window.addEventListener("beforeunload",()=>(event.preventDefault(),dr.currentFile().candidate=dr.view.state.doc.toString(),dr.currentFile().committed=dr.view.state.doc.toString(),dr.settings.saveApplicationToLocalStorage(dr.universes,dr.settings),dr.clock.stop(),null)); diff --git a/index.html b/index.html index 8808285..caeffc8 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ Topos - +