-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjon-trombone.js.map
1 lines (1 loc) · 595 KB
/
jon-trombone.js.map
1
{"version":3,"sources":["webpack://jon-trombone/webpack/universalModuleDefinition","webpack://jon-trombone/webpack/bootstrap","webpack://jon-trombone/./node_modules/ansi-html/index.js","webpack://jon-trombone/./node_modules/ansi-regex/index.js","webpack://jon-trombone/./node_modules/babel-runtime/core-js/get-iterator.js","webpack://jon-trombone/./node_modules/babel-runtime/core-js/object/define-property.js","webpack://jon-trombone/./node_modules/babel-runtime/helpers/classCallCheck.js","webpack://jon-trombone/./node_modules/babel-runtime/helpers/createClass.js","webpack://jon-trombone/./node_modules/core-js/library/fn/get-iterator.js","webpack://jon-trombone/./node_modules/core-js/library/fn/object/define-property.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_a-function.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_add-to-unscopables.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_an-object.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_array-includes.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_classof.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_cof.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_core.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_ctx.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_defined.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_descriptors.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_dom-create.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_enum-bug-keys.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_export.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_fails.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_global.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_has.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_hide.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_html.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_ie8-dom-define.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_iobject.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_is-object.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_iter-create.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_iter-define.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_iter-step.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_iterators.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_library.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_object-create.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_object-dp.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_object-dps.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_object-gpo.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_object-keys-internal.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_object-keys.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_property-desc.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_redefine.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_set-to-string-tag.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_shared-key.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_shared.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_string-at.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_to-absolute-index.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_to-integer.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_to-iobject.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_to-length.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_to-object.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_to-primitive.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_uid.js","webpack://jon-trombone/./node_modules/core-js/library/modules/_wks.js","webpack://jon-trombone/./node_modules/core-js/library/modules/core.get-iterator-method.js","webpack://jon-trombone/./node_modules/core-js/library/modules/core.get-iterator.js","webpack://jon-trombone/./node_modules/core-js/library/modules/es6.array.iterator.js","webpack://jon-trombone/./node_modules/core-js/library/modules/es6.object.define-property.js","webpack://jon-trombone/./node_modules/core-js/library/modules/es6.string.iterator.js","webpack://jon-trombone/./node_modules/core-js/library/modules/web.dom.iterable.js","webpack://jon-trombone/./node_modules/events/events.js","webpack://jon-trombone/./node_modules/html-entities/index.js","webpack://jon-trombone/./node_modules/html-entities/lib/html4-entities.js","webpack://jon-trombone/./node_modules/html-entities/lib/html5-entities.js","webpack://jon-trombone/./node_modules/html-entities/lib/xml-entities.js","webpack://jon-trombone/./node_modules/jsmidgen/lib/jsmidgen.js","webpack://jon-trombone/./node_modules/loglevel/lib/loglevel.js","webpack://jon-trombone/./node_modules/midi-file-parser/index.js","webpack://jon-trombone/./node_modules/midiconvert/src/BinaryInsert.js","webpack://jon-trombone/./node_modules/midiconvert/src/Control.js","webpack://jon-trombone/./node_modules/midiconvert/src/Header.js","webpack://jon-trombone/./node_modules/midiconvert/src/Merge.js","webpack://jon-trombone/./node_modules/midiconvert/src/Midi.js","webpack://jon-trombone/./node_modules/midiconvert/src/MidiConvert.js","webpack://jon-trombone/./node_modules/midiconvert/src/Note.js","webpack://jon-trombone/./node_modules/midiconvert/src/Track.js","webpack://jon-trombone/./node_modules/midiconvert/src/Util.js","webpack://jon-trombone/./node_modules/midiconvert/src/instrumentMaps.js","webpack://jon-trombone/./node_modules/punycode/punycode.js","webpack://jon-trombone/./node_modules/querystring-es3/decode.js","webpack://jon-trombone/./node_modules/querystring-es3/encode.js","webpack://jon-trombone/./node_modules/querystring-es3/index.js","webpack://jon-trombone/./node_modules/sockjs-client/dist/sockjs.js","webpack://jon-trombone/./node_modules/startaudiocontext/StartAudioContext.js","webpack://jon-trombone/./node_modules/strip-ansi/index.js","webpack://jon-trombone/./node_modules/url/url.js","webpack://jon-trombone/./node_modules/url/util.js","webpack://jon-trombone/(webpack)-dev-server/client?81da","webpack://jon-trombone/(webpack)-dev-server/client","webpack://jon-trombone/(webpack)-dev-server/client/overlay.js","webpack://jon-trombone/(webpack)-dev-server/client/socket.js","webpack://jon-trombone/(webpack)/buildin/global.js","webpack://jon-trombone/(webpack)/buildin/module.js","webpack://jon-trombone/(webpack)/hot sync nonrecursive ^\\.\\/log$","webpack://jon-trombone/(webpack)/hot/emitter.js","webpack://jon-trombone/(webpack)/hot/log.js","webpack://jon-trombone/./src/gui.js","webpack://jon-trombone/./src/index.js","webpack://jon-trombone/./src/jon-trombone.js","webpack://jon-trombone/./src/midi/midi-controller.js","webpack://jon-trombone/./src/pink-trombone/components/audio-system.js","webpack://jon-trombone/./src/pink-trombone/components/glottis.js","webpack://jon-trombone/./src/pink-trombone/components/tract-ui.js","webpack://jon-trombone/./src/pink-trombone/components/tract.js","webpack://jon-trombone/./src/pink-trombone/math-extensions.js","webpack://jon-trombone/./src/pink-trombone/noise.js","webpack://jon-trombone/./src/pink-trombone/pink-trombone.js","webpack://jon-trombone/./src/tts/tts-controller.js","webpack://jon-trombone/./src/utils/model-loader.js","webpack://jon-trombone/./src/utils/start-overlay.js","webpack://jon-trombone/./src/utils/webgl-detect.js"],"names":["GUI","jon","container","guify","console","log","panel","title","theme","root","width","barMode","align","opacity","Register","type","label","object","trombone","property","onChange","data","SetMute","min","max","folder","voices","glottis","step","tract","tractUI","fileReadFunc","midiController","LoadSongDirect","action","PlaySong","Stop","Restart","gui","Init","document","getElementById","HasWebGL","innerHTML","GetErrorHTML","classList","add","jonTrombone","readyState","window","onload","JonTrombone","finishedCallback","style","position","cursor","renderer","THREE","WebGLRenderer","alpha","setPixelRatio","devicePixelRatio","setSize","offsetWidth","offsetHeight","setClearColor","appendChild","domElement","aspect","camera","PerspectiveCamera","scene","Scene","clock","Clock","startDelayMS","setTimeout","StartAudio","moveJaw","jawFlapSpeed","jawOpenOffset","legato","flapWhileSinging","SetUpThree","SetUpScene","startOverlay","audioSystem","audioContext","OnUpdate","OrbitControls","undefined","controls","target","set","update","warn","light1","HemisphereLight","name","light2","DirectionalLight","LoadJSON","rotation","y","Math","degToRad","jaw","skeleton","bones","find","obj","jawShutZ","z","deltaTime","getDelta","requestAnimationFrame","bind","playing","notes","GetPitches","lastNotes","i","length","loudness","SetLipsClosed","UIFrequency","MIDIToFrequency","midi","velocity","voice","time","getElapsedTime","percent","sin","render","MidiConvert","require","MidiController","controller","currentTrack","baseFreq","path","callback","load","file","parse","trackIndex","GetSongProgress","tracks","item","noteOn","noteOff","filter","track","LoadSong","EnterSingMode","start","midiCode","pow","stop","ExitSingMode","backup_settings","autoWobble","voiceBackup","addPitchVariance","addTensenessVariance","vibratoFrequency","id","backup","AudioSystem","blockLength","blockTime","soundOn","AudioContext","webkitAudioContext","sampleRate","processors","scriptProcessor","createScriptProcessor","connect","destination","onaudioprocess","e","doScriptProcessor","whiteNoise","createWhiteNoiseNode","aspirateFilter","createBiquadFilter","frequency","value","Q","fricativeFilter","push","frameCount","myArrayBuffer","createBuffer","nowBuffering","getChannelData","random","source","createBufferSource","buffer","loop","event","index","inputArray1","inputBuffer","inputArray2","outArray","outputBuffer","N","j","lambda1","lambda2","glottalOutput","runStep","vocalOutput","lipOutput","noseOutput","finishBlock","processor","disconnect","exports","Glottis","noise","seed","Date","now","timeInWaveform","oldFrequency","newFrequency","smoothFrequency","oldTenseness","newTenseness","UITenseness","totalTime","vibratoAmount","intensity","isTouched","touch","x","baseNote","output","setupWaveform","lambda","noiseSource","timeStep","waveformLength","out","normalizedLFWaveform","aspiration","sqrt","getNoiseModulator","simplex1","voiced","PI","vibrato","alwaysVoice","clamp","tenseness","Rd","Ra","Rk","Rg","Ta","Tp","Te","epsilon","shift","exp","Delta","RHSIntegral","totalLowerIntegral","totalUpperIntegral","omega","s","E0","t","TractUI","originX","originY","radius","scale","tongueIndex","tongueDiameter","innerTongueControlRadius","outerTongueControlRadius","tongueTouch","angleScale","angleOffset","noseOffset","gridOffset","Tract","setRestDiameter","n","diameter","targetDiameter","restDiameter","tongueLowerIndexBound","bladeStart","tongueUpperIndexBound","tipStart","tongueIndexCentre","xx","yy","angle","atan2","lipStart","fixedTongueDiameter","curve","cos","progress","interp","lerp","R","L","reflection","junctionOutputR","junctionOutputL","newDiameter","A","glottalReflection","lipReflection","lastObstruction","fade","movementSpeed","transients","velumTarget","floor","Float64Array","newReflection","noseLength","noseStart","noseR","noseL","noseJunctionOutputR","noseJunctionOutputL","noseReflection","noseDiameter","noseA","d","newReflectionLeft","newReflectionRight","newReflectionNose","calculateReflections","calculateNoseReflections","amount","newLastObstruction","slowReturn","moveTowards","addTransient","reflectionLeft","reflectionRight","reflectionNose","sum","turbulenceNoise","processTransients","addTurbulenceNoise","r","w","reshapeTract","trans","timeAlive","lifeTime","strength","exponent","amplitude","splice","delta","thinness0","openness","noise0","noise1","number","current","amountUp","amountDown","gaussian","c","a","b","Grad","Noise","grad3","p","perm","Array","gradP","v","xin","yin","F2","G2","F3","G3","n0","n1","n2","x0","y0","i1","j1","x1","y1","x2","y2","gi0","gi1","gi2","t0","dot2","t1","t2","simplex2","Voice","init","PinkTrombone","noiseFreq","noiseQ","muted","startSound","doMute","mute","unmute","TTSController","ModelLoader","modelInfo","loadedCallback","onProgress","xhr","lengthComputable","percentComplete","loaded","total","round","onError","mtlLoader","MTLLoader","setPath","mtlFile","materials","preload","objLoader","OBJLoader","setMaterials","objFile","loader","JSONLoader","geometry","mat","skinning","mesh","SkinnedMesh","MultiMaterial","manager","LoadingManager","FBXLoader","StartOverlay","iOS","test","navigator","userAgent","overlay","createElement","cssText","overlayText","remove","Detector","WebGLRenderingContext","canvas","names","context","getContext","getParameter","message"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;ACnEA;;AAEA;;AAEA;AACA,mDAAmD,IAAI,SAAS,MAAM,IAAI;;AAE1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;AACD;AACA,CAAC;;AAED;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,sBAAsB;AACtB,GAAG;AACH;AACA,sBAAsB;AACtB,GAAG;AACH,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,uCAAuC,UAAU,+BAA+B;AAChF;AACA,mDAAmD;AACnD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;AC/KA;AACA;AACA,6BAA6B,YAAY,IAAI,IAAI,MAAM,IAAI;AAC3D;;;;;;;;;;;;ACHA,kBAAkB,gJ;;;;;;;;;;;ACAlB,kBAAkB,oK;;;;;;;;;;;;ACAlB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;;ACRA;;AAEA;;AAEA;;AAEA;;AAEA,sCAAsC,uCAAuC,gBAAgB;;AAE7F;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC,G;;;;;;;;;;;AC1BD;AACA;AACA;;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACJA;AACA;AACA;AACA;;;;;;;;;;;;ACHA,8BAA8B;;;;;;;;;;;;ACA9B;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,YAAY,eAAe;AAChC;AACA,KAAK;AACL;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB,EAAE;;AAE/C;AACA;AACA;AACA;AACA,GAAG,YAAY;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBA,iBAAiB;;AAEjB;AACA;AACA;;;;;;;;;;;;ACJA,6BAA6B;AAC7B,uCAAuC;;;;;;;;;;;;ACDvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACJA;AACA;AACA,iCAAiC,QAAQ,mBAAmB,UAAU,EAAE,EAAE;AAC1E,CAAC;;;;;;;;;;;;ACHD;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACNA;AACA;AACA;AACA;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA,kFAAkF;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,eAAe;AACf,eAAe;AACf,eAAe;AACf,gBAAgB;AAChB;;;;;;;;;;;;AC5DA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA,yCAAyC;;;;;;;;;;;;ACLzC,uBAAuB;AACvB;AACA;AACA;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;;;;;;;;;;;ACPA;AACA;;;;;;;;;;;;ACDA;AACA,+IAAsE,mBAAmB,UAAU,EAAE,EAAE;AACvG,CAAC;;;;;;;;;;;;ACFD;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACLA;AACA;AACA;;;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;;AAEA;AACA,uNAAkF,aAAa,EAAE;;AAEjG;AACA,qDAAqD,4BAA4B;AACjF;AACA;;;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;;AAEA,8BAA8B,aAAa;;AAE3C;AACA;AACA;AACA;AACA;AACA,yCAAyC,oCAAoC;AAC7E,6CAA6C,oCAAoC;AACjF,KAAK,4BAA4B,oCAAoC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA,kCAAkC,2BAA2B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;;;;ACrEA;AACA,UAAU;AACV;;;;;;;;;;;;ACFA;;;;;;;;;;;;ACAA;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,YAAY;AACf;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;ACZA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACPA;;;;;;;;;;;;ACAA;AACA;AACA;;AAEA;AACA,oEAAoE,iCAAiC;AACrG;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACJA;AACA;AACA,kDAAkD;AAClD;AACA,uCAAuC;AACvC;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACJA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,cAAc;AACd,iBAAiB;AACjB;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACjCA;AACA;AACA,iJAAuE,oHAA4C;;;;;;;;;;;;;ACFnH;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B,cAAc;AACd;AACA,CAAC;AACD;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,UAAU;AACV,CAAC;;;;;;;;;;;;AChBD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe,yBAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,GAAG;AACH,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;AC7SA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACLA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,SAAS;AACT,oCAAoC;AACpC,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClJA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7LA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,WAAW;AACX,WAAW;AACX,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd,cAAc;AACd,gBAAgB;AAChB,iBAAiB;AACjB,eAAe;AACf;;AAEA;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA,mCAAmC;AACnC,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1JA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,wBAAwB,2CAA2C;;AAEnE;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,GAAG;;AAEH,wBAAwB,8HAA8H;AACtJ,yBAAyB,wDAAwD;;AAEjF;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,aAAa,MAAM;AACnB,eAAe,OAAO;AACtB;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;;AAEA;AACA,2BAA2B,MAAM;AACjC;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA,UAAU;AACV;AACA,aAAa,OAAO;AACpB,eAAe,OAAO;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB,cAAc;AACtC,UAAU,OAAO;AACjB;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH,oBAAoB;AACpB;AACA,uDAAuD,yBAAyB;AAChF;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAY,oBAAoB;AAChC,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,cAAc;AAC1B;AACA,YAAY,OAAO;AACnB;AACA,YAAY,OAAO;AACnB;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,cAAc;AAC1B;AACA,YAAY,OAAO;AACnB;AACA,YAAY,OAAO;AACnB;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,cAAc;AAC1B;AACA,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB;AACA,YAAY,OAAO;AACnB;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,MAAM;AAClB;AACA,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+BAA+B;AAC/B,2CAA2C;AAC3C,mCAAmC;AACnC,mCAAmC;;AAEnC;AACA;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA;;;;;;;;;;;;;ACzqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA,KAAK,QAIL;AACA,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA,qEAAqE;AACrE,WAAW;AACX;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,eAAe;AACf;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;;;;;;;;;;;ACzPD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;;;;;;;;;;;;;ACvTA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,kBAAkB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,MAAM;AAClB,YAAY,OAAO;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEQ;;;;;;;;;;;;;;ACrDR;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEQ;;;;;;;;;;;;;;ACtCR;AAAA;AACA;AACA,aAAa,OAAO;AACpB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,gBAAgB,4BAA4B;AAC5C;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEQ;;;;;;;;;;;;;;;;AC3BR;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;ACzCA;AACA;AACA;AACc;AACM;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,YAAY,EAAE;AACd,YAAY,OAAO;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA,IAAI;AACJ;;AAEA;AACA;AACA,aAAa,mBAAmB;AAChC,aAAa,KAAK;AAClB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,iBAAiB,uBAAuB;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,YAAY,QAAQ;AACpB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B,aAAa;AACb;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,cAAc,KAAK;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEQ;;;;;;;;;;;;;;;;;;;;;;;;;;AClSK;AACuD;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,YAAY,UAAU;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,KAAK;AAClB;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC1EA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B,aAAa;AACb;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEQ;;;;;;;;;;;;;;;;;;;;AC5Ga;AACL;AACF;AACD;AACuD;;AAEpE;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA,iBAAiB,uBAAuB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA,eAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEQ;;;;;;;;;;;;;;;;;;;;;AC1VR;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yBAAyB,EAAE;AAC3B;AACA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB,EAAE;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;;;;;AClDD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;sDChKA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB,cAAc,MAAM;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,MAAM;AAClB,YAAY,SAAS;AACrB;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,SAAS;AACrB;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA,KAAK;AACL,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,MAAM;AAClB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,cAAc,OAAO;AACrB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mCAAmC;AAClE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;;AAExB,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;AACA;AACA;AACA,kCAAkC,oBAAoB;;AAEtD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0BAA0B,iBAAiB;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,cAAc,iBAAiB;AAC/B;;AAEA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B,oBAAoB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAEA;AACA;AACA;AACA;AACA,GAAG;AAAA;AACH,EAAE,QAaF;;AAEA,CAAC;;;;;;;;;;;;;;ACphBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,SAAS;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,eAAe;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACpFA;;AAEA;AACA;;;;;;;;;;;;0DCHA;AACA,aAAa,SAA2D,mBAAmB,eAAqN,CAAgB,aAAa,0BAA0B,0BAA0B,gBAAgB,UAAU,UAAU,0CAA0C,8BAAwB,oBAAoB,8CAA8C,kCAAkC,YAAY,YAAY,mCAAmC,iBAAiB,gBAAgB,sBAAsB,oBAAoB,0CAA0C,YAAY,WAAW,YAAY,SAAS,GAAG;AAC1yB;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,CAAC,qIAAqI;;AAEtI,CAAC,EAAE,kCAAkC;AACrC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,CAAC,EAAE,0BAA0B;AAC7B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC,EAAE,gCAAgC;AACnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,CAAC,GAAG;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA,CAAC,GAAG;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,CAAC,EAAE,0BAA0B;AAC7B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC,EAAE,+BAA+B;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,CAAC,aAAa,QAAQ,EAAE;;AAExB,CAAC,EAAE,uIAAuI;AAC1I;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC,aAAa,QAAQ,EAAE;;AAExB,CAAC,EAAE,mEAAmE;AACtE;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC,EAAE,sFAAsF;AACzF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC,aAAa,QAAQ,EAAE,0HAA0H;;AAElJ,CAAC,EAAE,sHAAsH;AACzH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,CAAC,aAAa,QAAQ,EAAE;;AAExB,CAAC,EAAE,wNAAwN;AAC3N;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC,qIAAqI;;AAEtI,CAAC,GAAG;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gDAAgD,WAAW;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC,aAAa,QAAQ,EAAE,0HAA0H;;AAElJ,CAAC,EAAE,8XAA8X;AACjY;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA,KAAK,YAAY;AACjB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB;AAClB;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,sCAAsC,EAAE;;AAE9H;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,qDAAqD;AACrD,qEAAqE;AACrE;AACA;AACA,wDAAwD;AACxD,8EAA8E;AAC9E;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,mBAAmB;;;AAG5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,gCAAgC;AAC9E,SAAS;;AAET;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;;AAE9D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,0BAA0B;AACrE;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kDAAkD,WAAW;AAC7D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,CAAC,GAAG;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC,EAAE,0QAA0Q;AAC7Q;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;;AAEA;;AAEA,CAAC,aAAa,QAAQ,EAAE,0HAA0H;;AAElJ,CAAC,EAAE,gFAAgF;AACnF;AACA;;AAEA,CAAC,qIAAqI;;AAEtI,CAAC,GAAG;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA,CAAC,qIAAqI;;AAEtI,CAAC,GAAG;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC,EAAE,wGAAwG;AAC3G;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC,EAAE,qFAAqF;AACxF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC,aAAa,QAAQ,EAAE;;AAExB,CAAC,EAAE,+IAA+I;AAClJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,CAAC,qIAAqI;;AAEtI,CAAC,EAAE,mFAAmF;AACtF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA,CAAC,aAAa,QAAQ,EAAE;;AAExB,CAAC,EAAE,qEAAqE;AACxE;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC,aAAa,QAAQ,EAAE;;AAExB,CAAC,EAAE,oCAAoC;AACvC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,0CAA0C;AAC1C;AACA;AACA;;AAEA;AACA;AACA,yFAAyF;;AAEzF;;AAEA;AACA;;AAEA,CAAC,qIAAqI;;AAEtI,CAAC,EAAE,qDAAqD;AACxD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC,aAAa,QAAQ,EAAE;;AAExB,CAAC,EAAE,oCAAoC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC,aAAa,QAAQ,EAAE;;AAExB,CAAC,EAAE,oFAAoF;AACvF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA,CAAC,aAAa,QAAQ,EAAE;;AAExB,CAAC,EAAE,qDAAqD;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;;AAEA,CAAC,aAAa,QAAQ,EAAE,0HAA0H;;AAElJ,CAAC,EAAE,yGAAyG;AAC5G;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,0BAA0B,qDAAqD,mBAAmB,WAAW;AAC7G;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC,aAAa,QAAQ,EAAE,0HAA0H;;AAElJ,CAAC,EAAE,kIAAkI;AACrI;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,EAAE;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC,aAAa,QAAQ,EAAE;;AAExB,CAAC,EAAE,oCAAoC;AACvC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC,aAAa,QAAQ,EAAE,0HAA0H;;AAElJ,CAAC,EAAE,wDAAwD;AAC3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC,aAAa,QAAQ,EAAE,0HAA0H;;AAElJ,CAAC,EAAE,yGAAyG;AAC5G;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,CAAC,EAAE,iCAAiC;AACpC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA,CAAC,EAAE,yBAAyB;AAC5B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;;AAEA;;AAEA,CAAC,EAAE,iCAAiC;AACpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC,aAAa,QAAQ,EAAE;;AAExB,CAAC,EAAE,kGAAkG;AACrG;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,mCAAmC;;AAEnC;;AAEA,CAAC,EAAE,+FAA+F;AAClG;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC;;AAErC;;AAEA,CAAC,EAAE,0EAA0E;AAC7E;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;;AAEnC;;AAEA,CAAC,EAAE,uGAAuG;AAC1G;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,qCAAqC;;AAErC;AACA;AACA;AACA;;AAEA;;AAEA,CAAC,qIAAqI;;AAEtI,CAAC,EAAE,6HAA6H;AAChI;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;;AAEA,CAAC,qIAAqI;;AAEtI,CAAC,GAAG;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA,CAAC,qIAAqI;;AAEtI,CAAC,GAAG;AACJ;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA,CAAC,EAAE,WAAW;AACd;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC,qIAAqI;;AAEtI,CAAC,EAAE,cAAc;AACjB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC,aAAa,QAAQ,EAAE,0HAA0H;;AAElJ,CAAC,EAAE,kDAAkD;AACrD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG,oCAAoC;AACvC,CAAC;;AAED;;AAEA,CAAC,qIAAqI;;AAEtI,CAAC,GAAG;AACJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C,YAAY;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC,GAAG;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC,EAAE,YAAY;AACf;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA,CAAC,aAAa,QAAQ,EAAE;;AAExB,CAAC,EAAE,WAAW;AACd;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,CAAC,aAAa,QAAQ,EAAE;;AAExB,CAAC,EAAE,0BAA0B;AAC7B;;AAEA,CAAC,GAAG;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,YAAY,MAAM;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC,GAAG;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA,CAAC,aAAa,QAAQ,EAAE;;AAExB,CAAC,EAAE,aAAa;;AAEhB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;;AAEA;AACA;AACA,cAAc;AACd;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,iBAAiB,SAAS;AAC1B,4BAA4B;AAC5B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA,yCAAyC,SAAS;AAClD;AACA;AACA;AACA;AACA,yCAAyC,SAAS;AAClD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,MAAM;AACjB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA,CAAC,EAAE,QAAQ;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC,GAAG;AACJ;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP,kCAAkC,iDAAiD;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oDAAoD;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,yCAAyC,8BAA8B;AACvE;AACA,SAAS;AACT;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,6BAA6B;AAC7F,uEAAuE,iCAAiC;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA,uCAAuC,UAAU;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,gBAAgB;AACpE;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE,4DAA4D;AAC5D;AACA;AACA,iDAAiD,MAAM;AACvD;AACA;AACA;AACA,eAAe;AACf,wDAAwD,0EAA0E,OAAO,0BAA0B,SAAS;AAC5K;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,gEAAgE,gBAAgB;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,2BAA2B;AAC5F;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,0CAA0C;AAC1C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,KAAK;AACpD;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA,0CAA0C,gBAAgB;AAC1D;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,kBAAkB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,6FAA6F;AACrH,mEAAmE;AACnE;AACA;AACA;AACA;AACA,0BAA0B,mGAAmG;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,mGAAmG;AAC7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA,qBAAqB;AACrB;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,UAAU;AACnD;AACA;AACA,aAAa;AACb;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF;AACxF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;;AAED,CAAC,qIAAqI;;AAEtI,CAAC,GAAG;AACJ;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC,GAAG;AACJ;;AAEA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC,GAAG;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,QAAQ,yBAAyB;AACjC;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,iBAAiB,kBAAkB;AACnC;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC,EAAE,wDAAwD;AAC3D;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yDAAyD;AACzD,GAAG;AACH,sCAAsC;AACtC;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC,qIAAqI;;AAEtI,CAAC,EAAE,QAAQ,EAAE,GAAG;AAChB,CAAC;;;AAGD;;;;;;;;;;;;;ACpmLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA,GAAG,QAIH;AACA,CAAC;;AAED;;AAEA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,aAAa;AAC1B,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,aAAa;AAC1B,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,aAAa,4BAA4B;AACzC,YAAY,MAAM;AAClB;AACA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,G;AACA;;AAEA;AACA,YAAY,aAAa;AACzB,YAAY,6BAA6B;AACzC;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,yBAAyB;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA,CAAC,E;;;;;;;;;;;;AC7LD;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gBAAgB,KAAK;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA,2CAA2C,KAAK;AAChD,0CAA0C,KAAK;AAC/C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,mBAAmB,4BAA4B;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,QAAQ;AACtC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,MAAM;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3tBA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;;;;;;;;;;;uDCfA;;AAEA;AACA;;AAEA,UCAA,mBDAA,CCAA,sCDAA;AACA,gBCAA,mBDAA,CCAA,sDDAA;AACA,UCAA,mBDAA,CCAA,yDDAA;AACA,aCAA,mBDAA,CCAA,oEDAA;AACA,cCAA,mBDAA,CCAA,sEDAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,ICAA,IDAA;AACA;AACA;AACA,CAAC,MCAA,mBDMD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,iBCAA,kEDAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,wCAAwC;AACxC;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;;AAEA,wCAAwC;AACxC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,mBAAmB,2BAA2B;AAC9C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBCAA,mBDAA,CCAA,kEDAA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,C;;;;;;;;;;;;;AE5PA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,E;;;;;;;;;;;;AC7HA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wB;;;;;;;;;;;AC7CA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kE;;;;;;;;;;;ACxBA;AACA;;;;;;;;;;;;ACDA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IC5CMA,G;;;;;;;6BAEGC,G,EAAKC,S,EAAU;;AAEhB,gBAAG,CAACC,KAAJ,EAAW;AACPC,wBAAQC,GAAR,CAAY,4EAAZ;AACA;AACH;;AAED,iBAAKC,KAAL,GAAa,IAAIH,KAAJ,CAAU;AACnBI,uBAAO,cADY;AAEnBC,uBAAO,MAFY;AAGnBC,sBAAMP,SAHa;AAInBQ,uBAAO,GAJY;AAKnBC,yBAAS,OALU;AAMnBC,uBAAO,OANY;AAOnBC,yBAAS;AAPU,aAAV,CAAb;;AAUA,iBAAKP,KAAL,CAAWQ,QAAX,CAAoB;AAChBC,sBAAM,UADU,EACEC,OAAO,MADT;AAEhBC,wBAAQhB,IAAIiB,QAFI,EAEMC,UAAU,OA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;;;;;;;;;;;;IC1DHU,Q;;;;;;;;;AAEF;mCACkB;AACd,gBAAI,CAAC,CAACla,OAAOma,qBAAb,EAAoC;AAChC,oBAAIC,SAAS7a,SAASua,aAAT,CAAuB,QAAvB,CAAb;AAAA,oBACQO,QAAQ,CAAC,OAAD,EAAU,oBAAV,EAAgC,WAAhC,EAA6C,WAA7C,CADhB;AAAA,oBAEIC,UAAU,KAFd;;AAIA,qBAAI,IAAI9V,IAAE,CAAV,EAAYA,IAAE,CAAd,EAAgBA,GAAhB,EAAqB;AACjB,wBAAI;AACA8V,kCAAUF,OAAOG,UAAP,CAAkBF,MAAM7V,CAAN,CAAlB,CAAV;AACA,4BAAI8V,WAAW,OAAOA,QAAQE,YAAf,IAA+B,UAA9C,EAA0D;AACtD;AACA,mCAAO,IAAP;AACH;AACJ,qBAND,CAME,OAAMnS,CAAN,EAAS,CAAE;AAChB;;AAED;AACA,uBAAO,KAAP;AACH;AACD;AACA,mBAAO,KAAP;AACH;;;uCAEkC;AAAA,gBAAfoS,OAAe,uEAAL,IAAK;;AAC/B,gBAAGA,WAAW,IAAd,EAAmB;AACfA;AAGH;AACD,6GAEiCA,OAFjC;AAKH;;;;;QAIIP,Q,GAAAA,Q","file":"jon-trombone.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"jon-trombone\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"jon-trombone\"] = factory();\n\telse\n\t\troot[\"jon-trombone\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","'use strict'\n\nmodule.exports = ansiHTML\n\n// Reference to https://github.com/sindresorhus/ansi-regex\nvar _regANSI = /(?:(?:\\u001b\\[)|\\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\\u001b[A-M]/\n\nvar _defColors = {\n reset: ['fff', '000'], // [FOREGROUD_COLOR, BACKGROUND_COLOR]\n black: '000',\n red: 'ff0000',\n green: '209805',\n yellow: 'e8bf03',\n blue: '0000ff',\n magenta: 'ff00ff',\n cyan: '00ffee',\n lightgrey: 'f0f0f0',\n darkgrey: '888'\n}\nvar _styles = {\n 30: 'black',\n 31: 'red',\n 32: 'green',\n 33: 'yellow',\n 34: 'blue',\n 35: 'magenta',\n 36: 'cyan',\n 37: 'lightgrey'\n}\nvar _openTags = {\n '1': 'font-weight:bold', // bold\n '2': 'opacity:0.5', // dim\n '3': '<i>', // italic\n '4': '<u>', // underscore\n '8': 'display:none', // hidden\n '9': '<del>' // delete\n}\nvar _closeTags = {\n '23': '</i>', // reset italic\n '24': '</u>', // reset underscore\n '29': '</del>' // reset delete\n}\n\n;[0, 21, 22, 27, 28, 39, 49].forEach(function (n) {\n _closeTags[n] = '</span>'\n})\n\n/**\n * Converts text with ANSI color codes to HTML markup.\n * @param {String} text\n * @returns {*}\n */\nfunction ansiHTML (text) {\n // Returns the text if the string has no ANSI escape code.\n if (!_regANSI.test(text)) {\n return text\n }\n\n // Cache opened sequence.\n var ansiCodes = []\n // Replace with markup.\n var ret = text.replace(/\\033\\[(\\d+)*m/g, function (match, seq) {\n var ot = _openTags[seq]\n if (ot) {\n // If current sequence has been opened, close it.\n if (!!~ansiCodes.indexOf(seq)) { // eslint-disable-line no-extra-boolean-cast\n ansiCodes.pop()\n return '</span>'\n }\n // Open tag.\n ansiCodes.push(seq)\n return ot[0] === '<' ? ot : '<span style=\"' + ot + ';\">'\n }\n\n var ct = _closeTags[seq]\n if (ct) {\n // Pop sequence\n ansiCodes.pop()\n return ct\n }\n return ''\n })\n\n // Make sure tags are closed.\n var l = ansiCodes.length\n ;(l > 0) && (ret += Array(l + 1).join('</span>'))\n\n return ret\n}\n\n/**\n * Customize colors.\n * @param {Object} colors reference to _defColors\n */\nansiHTML.setColors = function (colors) {\n if (typeof colors !== 'object') {\n throw new Error('`colors` parameter must be an Object.')\n }\n\n var _finalColors = {}\n for (var key in _defColors) {\n var hex = colors.hasOwnProperty(key) ? colors[key] : null\n if (!hex) {\n _finalColors[key] = _defColors[key]\n continue\n }\n if ('reset' === key) {\n if (typeof hex === 'string') {\n hex = [hex]\n }\n if (!Array.isArray(hex) || hex.length === 0 || hex.some(function (h) {\n return typeof h !== 'string'\n })) {\n throw new Error('The value of `' + key + '` property must be an Array and each item could only be a hex string, e.g.: FF0000')\n }\n var defHexColor = _defColors[key]\n if (!hex[0]) {\n hex[0] = defHexColor[0]\n }\n if (hex.length === 1 || !hex[1]) {\n hex = [hex[0]]\n hex.push(defHexColor[1])\n }\n\n hex = hex.slice(0, 2)\n } else if (typeof hex !== 'string') {\n throw new Error('The value of `' + key + '` property must be a hex string, e.g.: FF0000')\n }\n _finalColors[key] = hex\n }\n _setTags(_finalColors)\n}\n\n/**\n * Reset colors.\n */\nansiHTML.reset = function () {\n _setTags(_defColors)\n}\n\n/**\n * Expose tags, including open and close.\n * @type {Object}\n */\nansiHTML.tags = {}\n\nif (Object.defineProperty) {\n Object.defineProperty(ansiHTML.tags, 'open', {\n get: function () { return _openTags }\n })\n Object.defineProperty(ansiHTML.tags, 'close', {\n get: function () { return _closeTags }\n })\n} else {\n ansiHTML.tags.open = _openTags\n ansiHTML.tags.close = _closeTags\n}\n\nfunction _setTags (colors) {\n // reset all\n _openTags['0'] = 'font-weight:normal;opacity:1;color:#' + colors.reset[0] + ';background:#' + colors.reset[1]\n // inverse\n _openTags['7'] = 'color:#' + colors.reset[1] + ';background:#' + colors.reset[0]\n // dark grey\n _openTags['90'] = 'color:#' + colors.darkgrey\n\n for (var code in _styles) {\n var color = _styles[code]\n var oriColor = colors[color] || '000'\n _openTags[code] = 'color:#' + oriColor\n code = parseInt(code)\n _openTags[(code + 10).toString()] = 'background:#' + oriColor\n }\n}\n\nansiHTML.reset()\n","'use strict';\nmodule.exports = function () {\n\treturn /[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/get-iterator\"), __esModule: true };","module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();","require('../modules/web.dom.iterable');\nrequire('../modules/es6.string.iterator');\nmodule.exports = require('../modules/core.get-iterator');\n","require('../../modules/es6.object.define-property');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function defineProperty(it, key, desc) {\n return $Object.defineProperty(it, key, desc);\n};\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","module.exports = function () { /* empty */ };\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var core = module.exports = { version: '2.5.3' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","var global = require('./_global');\nvar core = require('./_core');\nvar ctx = require('./_ctx');\nvar hide = require('./_hide');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && key in exports) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = (!BUGGY && $native) || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n","module.exports = {};\n","module.exports = true;\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","module.exports = require('./_hide');\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","var global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function (key) {\n return store[key] || (store[key] = {});\n};\n","var toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","var anObject = require('./_an-object');\nvar get = require('./core.get-iterator-method');\nmodule.exports = require('./_core').getIterator = function (it) {\n var iterFn = get(it);\n if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');\n return anObject(iterFn.call(it));\n};\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","var $export = require('./_export');\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f });\n","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n","require('./es6.array.iterator');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar TO_STRING_TAG = require('./_wks')('toStringTag');\n\nvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n 'TextTrackList,TouchList').split(',');\n\nfor (var i = 0; i < DOMIterables.length; i++) {\n var NAME = DOMIterables[i];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n this._events = this._events || {};\n this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n if (!isNumber(n) || n < 0 || isNaN(n))\n throw TypeError('n must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n var er, handler, len, args, i, listeners;\n\n if (!this._events)\n this._events = {};\n\n // If there is no 'error' event listener then throw.\n if (type === 'error') {\n if (!this._events.error ||\n (isObject(this._events.error) && !this._events.error.length)) {\n er = arguments[1];\n if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n } else {\n // At least give some kind of context to the user\n var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n err.context = er;\n throw err;\n }\n }\n }\n\n handler = this._events[type];\n\n if (isUndefined(handler))\n return false;\n\n if (isFunction(handler)) {\n switch (arguments.length) {\n // fast cases\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n // slower\n default:\n args = Array.prototype.slice.call(arguments, 1);\n handler.apply(this, args);\n }\n } else if (isObject(handler)) {\n args = Array.prototype.slice.call(arguments, 1);\n listeners = handler.slice();\n len = listeners.length;\n for (i = 0; i < len; i++)\n listeners[i].apply(this, args);\n }\n\n return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n var m;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (this._events.newListener)\n this.emit('newListener', type,\n isFunction(listener.listener) ?\n listener.listener : listener);\n\n if (!this._events[type])\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n else if (isObject(this._events[type]))\n // If we've already got an array, just append.\n this._events[type].push(listener);\n else\n // Adding the second element, need to change to array.\n this._events[type] = [this._events[type], listener];\n\n // Check for listener leak\n if (isObject(this._events[type]) && !this._events[type].warned) {\n if (!isUndefined(this._maxListeners)) {\n m = this._maxListeners;\n } else {\n m = EventEmitter.defaultMaxListeners;\n }\n\n if (m && m > 0 && this._events[type].length > m) {\n this._events[type].warned = true;\n console.error('(node) warning: possible EventEmitter memory ' +\n 'leak detected. %d listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n if (typeof console.trace === 'function') {\n // not supported in IE 10\n console.trace();\n }\n }\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n var fired = false;\n\n function g() {\n this.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n g.listener = listener;\n this.on(type, g);\n\n return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n var list, position, length, i;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events || !this._events[type])\n return this;\n\n list = this._events[type];\n length = list.length;\n position = -1;\n\n if (list === listener ||\n (isFunction(list.listener) && list.listener === listener)) {\n delete this._events[type];\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n\n } else if (isObject(list)) {\n for (i = length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list.length = 0;\n delete this._events[type];\n } else {\n list.splice(position, 1);\n }\n\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n var key, listeners;\n\n if (!this._events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!this._events.removeListener) {\n if (arguments.length === 0)\n this._events = {};\n else if (this._events[type])\n delete this._events[type];\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n for (key in this._events) {\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = {};\n return this;\n }\n\n listeners = this._events[type];\n\n if (isFunction(listeners)) {\n this.removeListener(type, listeners);\n } else if (listeners) {\n // LIFO order\n while (listeners.length)\n this.removeListener(type, listeners[listeners.length - 1]);\n }\n delete this._events[type];\n\n return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n var ret;\n if (!this._events || !this._events[type])\n ret = [];\n else if (isFunction(this._events[type]))\n ret = [this._events[type]];\n else\n ret = this._events[type].slice();\n return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n if (this._events) {\n var evlistener = this._events[type];\n\n if (isFunction(evlistener))\n return 1;\n else if (evlistener)\n return evlistener.length;\n }\n return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n","module.exports = {\n XmlEntities: require('./lib/xml-entities.js'),\n Html4Entities: require('./lib/html4-entities.js'),\n Html5Entities: require('./lib/html5-entities.js'),\n AllHtmlEntities: require('./lib/html5-entities.js')\n};\n","var HTML_ALPHA = ['apos', 'nbsp', 'iexcl', 'cent', 'pound', 'curren', 'yen', 'brvbar', 'sect', 'uml', 'copy', 'ordf', 'laquo', 'not', 'shy', 'reg', 'macr', 'deg', 'plusmn', 'sup2', 'sup3', 'acute', 'micro', 'para', 'middot', 'cedil', 'sup1', 'ordm', 'raquo', 'frac14', 'frac12', 'frac34', 'iquest', 'Agrave', 'Aacute', 'Acirc', 'Atilde', 'Auml', 'Aring', 'Aelig', 'Ccedil', 'Egrave', 'Eacute', 'Ecirc', 'Euml', 'Igrave', 'Iacute', 'Icirc', 'Iuml', 'ETH', 'Ntilde', 'Ograve', 'Oacute', 'Ocirc', 'Otilde', 'Ouml', 'times', 'Oslash', 'Ugrave', 'Uacute', 'Ucirc', 'Uuml', 'Yacute', 'THORN', 'szlig', 'agrave', 'aacute', 'acirc', 'atilde', 'auml', 'aring', 'aelig', 'ccedil', 'egrave', 'eacute', 'ecirc', 'euml', 'igrave', 'iacute', 'icirc', 'iuml', 'eth', 'ntilde', 'ograve', 'oacute', 'ocirc', 'otilde', 'ouml', 'divide', 'oslash', 'ugrave', 'uacute', 'ucirc', 'uuml', 'yacute', 'thorn', 'yuml', 'quot', 'amp', 'lt', 'gt', 'OElig', 'oelig', 'Scaron', 'scaron', 'Yuml', 'circ', 'tilde', 'ensp', 'emsp', 'thinsp', 'zwnj', 'zwj', 'lrm', 'rlm', 'ndash', 'mdash', 'lsquo', 'rsquo', 'sbquo', 'ldquo', 'rdquo', 'bdquo', 'dagger', 'Dagger', 'permil', 'lsaquo', 'rsaquo', 'euro', 'fnof', 'Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon', 'Zeta', 'Eta', 'Theta', 'Iota', 'Kappa', 'Lambda', 'Mu', 'Nu', 'Xi', 'Omicron', 'Pi', 'Rho', 'Sigma', 'Tau', 'Upsilon', 'Phi', 'Chi', 'Psi', 'Omega', 'alpha', 'beta', 'gamma', 'delta', 'epsilon', 'zeta', 'eta', 'theta', 'iota', 'kappa', 'lambda', 'mu', 'nu', 'xi', 'omicron', 'pi', 'rho', 'sigmaf', 'sigma', 'tau', 'upsilon', 'phi', 'chi', 'psi', 'omega', 'thetasym', 'upsih', 'piv', 'bull', 'hellip', 'prime', 'Prime', 'oline', 'frasl', 'weierp', 'image', 'real', 'trade', 'alefsym', 'larr', 'uarr', 'rarr', 'darr', 'harr', 'crarr', 'lArr', 'uArr', 'rArr', 'dArr', 'hArr', 'forall', 'part', 'exist', 'empty', 'nabla', 'isin', 'notin', 'ni', 'prod', 'sum', 'minus', 'lowast', 'radic', 'prop', 'infin', 'ang', 'and', 'or', 'cap', 'cup', 'int', 'there4', 'sim', 'cong', 'asymp', 'ne', 'equiv', 'le', 'ge', 'sub', 'sup', 'nsub', 'sube', 'supe', 'oplus', 'otimes', 'perp', 'sdot', 'lceil', 'rceil', 'lfloor', 'rfloor', 'lang', 'rang', 'loz', 'spades', 'clubs', 'hearts', 'diams'];\nvar HTML_CODES = [39, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 34, 38, 60, 62, 338, 339, 352, 353, 376, 710, 732, 8194, 8195, 8201, 8204, 8205, 8206, 8207, 8211, 8212, 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, 8240, 8249, 8250, 8364, 402, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 977, 978, 982, 8226, 8230, 8242, 8243, 8254, 8260, 8472, 8465, 8476, 8482, 8501, 8592, 8593, 8594, 8595, 8596, 8629, 8656, 8657, 8658, 8659, 8660, 8704, 8706, 8707, 8709, 8711, 8712, 8713, 8715, 8719, 8721, 8722, 8727, 8730, 8733, 8734, 8736, 8743, 8744, 8745, 8746, 8747, 8756, 8764, 8773, 8776, 8800, 8801, 8804, 8805, 8834, 8835, 8836, 8838, 8839, 8853, 8855, 8869, 8901, 8968, 8969, 8970, 8971, 9001, 9002, 9674, 9824, 9827, 9829, 9830];\n\nvar alphaIndex = {};\nvar numIndex = {};\n\nvar i = 0;\nvar length = HTML_ALPHA.length;\nwhile (i < length) {\n var a = HTML_ALPHA[i];\n var c = HTML_CODES[i];\n alphaIndex[a] = String.fromCharCode(c);\n numIndex[c] = a;\n i++;\n}\n\n/**\n * @constructor\n */\nfunction Html4Entities() {}\n\n/**\n * @param {String} str\n * @returns {String}\n */\nHtml4Entities.prototype.decode = function(str) {\n if (!str || !str.length) {\n return '';\n }\n return str.replace(/&(#?[\\w\\d]+);?/g, function(s, entity) {\n var chr;\n if (entity.charAt(0) === \"#\") {\n var code = entity.charAt(1).toLowerCase() === 'x' ?\n parseInt(entity.substr(2), 16) :\n parseInt(entity.substr(1));\n\n if (!(isNaN(code) || code < -32768 || code > 65535)) {\n chr = String.fromCharCode(code);\n }\n } else {\n chr = alphaIndex[entity];\n }\n return chr || s;\n });\n};\n\n/**\n * @param {String} str\n * @returns {String}\n */\nHtml4Entities.decode = function(str) {\n return new Html4Entities().decode(str);\n};\n\n/**\n * @param {String} str\n * @returns {String}\n */\nHtml4Entities.prototype.encode = function(str) {\n if (!str || !str.length) {\n return '';\n }\n var strLength = str.length;\n var result = '';\n var i = 0;\n while (i < strLength) {\n var alpha = numIndex[str.charCodeAt(i)];\n result += alpha ? \"&\" + alpha + \";\" : str.charAt(i);\n i++;\n }\n return result;\n};\n\n/**\n * @param {String} str\n * @returns {String}\n */\nHtml4Entities.encode = function(str) {\n return new Html4Entities().encode(str);\n};\n\n/**\n * @param {String} str\n * @returns {String}\n */\nHtml4Entities.prototype.encodeNonUTF = function(str) {\n if (!str || !str.length) {\n return '';\n }\n var strLength = str.length;\n var result = '';\n var i = 0;\n while (i < strLength) {\n var cc = str.charCodeAt(i);\n var alpha = numIndex[cc];\n if (alpha) {\n result += \"&\" + alpha + \";\";\n } else if (cc < 32 || cc > 126) {\n result += \"&#\" + cc + \";\";\n } else {\n result += str.charAt(i);\n }\n i++;\n }\n return result;\n};\n\n/**\n * @param {String} str\n * @returns {String}\n */\nHtml4Entities.encodeNonUTF = function(str) {\n return new Html4Entities().encodeNonUTF(str);\n};\n\n/**\n * @param {String} str\n * @returns {String}\n */\nHtml4Entities.prototype.encodeNonASCII = function(str) {\n if (!str || !str.length) {\n return '';\n }\n var strLength = str.length;\n var result = '';\n var i = 0;\n while (i < strLength) {\n var c = str.charCodeAt(i);\n if (c <= 255) {\n result += str[i++];\n continue;\n }\n result += '&#' + c + ';';\n i++;\n }\n return result;\n};\n\n/**\n * @param {String} str\n * @returns {String}\n */\nHtml4Entities.encodeNonASCII = function(str) {\n return new Html4Entities().encodeNonASCII(str);\n};\n\nmodule.exports = Html4Entities;\n","var ENTITIES = [['Aacute', [193]], ['aacute', [225]], ['Abreve', [258]], ['abreve', [259]], ['ac', [8766]], ['acd', [8767]], ['acE', [8766, 819]], ['Acirc', [194]], ['acirc', [226]], ['acute', [180]], ['Acy', [1040]], ['acy', [1072]], ['AElig', [198]], ['aelig', [230]], ['af', [8289]], ['Afr', [120068]], ['afr', [120094]], ['Agrave', [192]], ['agrave', [224]], ['alefsym', [8501]], ['aleph', [8501]], ['Alpha', [913]], ['alpha', [945]], ['Amacr', [256]], ['amacr', [257]], ['amalg', [10815]], ['amp', [38]], ['AMP', [38]], ['andand', [10837]], ['And', [10835]], ['and', [8743]], ['andd', [10844]], ['andslope', [10840]], ['andv', [10842]], ['ang', [8736]], ['ange', [10660]], ['angle', [8736]], ['angmsdaa', [10664]], ['angmsdab', [10665]], ['angmsdac', [10666]], ['angmsdad', [10667]], ['angmsdae', [10668]], ['angmsdaf', [10669]], ['angmsdag', [10670]], ['angmsdah', [10671]], ['angmsd', [8737]], ['angrt', [8735]], ['angrtvb', [8894]], ['angrtvbd', [10653]], ['angsph', [8738]], ['angst', [197]], ['angzarr', [9084]], ['Aogon', [260]], ['aogon', [261]], ['Aopf', [120120]], ['aopf', [120146]], ['apacir', [10863]], ['ap', [8776]], ['apE', [10864]], ['ape', [8778]], ['apid', [8779]], ['apos', [39]], ['ApplyFunction', [8289]], ['approx', [8776]], ['approxeq', [8778]], ['Aring', [197]], ['aring', [229]], ['Ascr', [119964]], ['ascr', [119990]], ['Assign', [8788]], ['ast', [42]], ['asymp', [8776]], ['asympeq', [8781]], ['Atilde', [195]], ['atilde', [227]], ['Auml', [196]], ['auml', [228]], ['awconint', [8755]], ['awint', [10769]], ['backcong', [8780]], ['backepsilon', [1014]], ['backprime', [8245]], ['backsim', [8765]], ['backsimeq', [8909]], ['Backslash', [8726]], ['Barv', [10983]], ['barvee', [8893]], ['barwed', [8965]], ['Barwed', [8966]], ['barwedge', [8965]], ['bbrk', [9141]], ['bbrktbrk', [9142]], ['bcong', [8780]], ['Bcy', [1041]], ['bcy', [1073]], ['bdquo', [8222]], ['becaus', [8757]], ['because', [8757]], ['Because', [8757]], ['bemptyv', [10672]], ['bepsi', [1014]], ['bernou', [8492]], ['Bernoullis', [8492]], ['Beta', [914]], ['beta', [946]], ['beth', [8502]], ['between', [8812]], ['Bfr', [120069]], ['bfr', [120095]], ['bigcap', [8898]], ['bigcirc', [9711]], ['bigcup', [8899]], ['bigodot', [10752]], ['bigoplus', [10753]], ['bigotimes', [10754]], ['bigsqcup', [10758]], ['bigstar', [9733]], ['bigtriangledown', [9661]], ['bigtriangleup', [9651]], ['biguplus', [10756]], ['bigvee', [8897]], ['bigwedge', [8896]], ['bkarow', [10509]], ['blacklozenge', [10731]], ['blacksquare', [9642]], ['blacktriangle', [9652]], ['blacktriangledown', [9662]], ['blacktriangleleft', [9666]], ['blacktriangleright', [9656]], ['blank', [9251]], ['blk12', [9618]], ['blk14', [9617]], ['blk34', [9619]], ['block', [9608]], ['bne', [61, 8421]], ['bnequiv', [8801, 8421]], ['bNot', [10989]], ['bnot', [8976]], ['Bopf', [120121]], ['bopf', [120147]], ['bot', [8869]], ['bottom', [8869]], ['bowtie', [8904]], ['boxbox', [10697]], ['boxdl', [9488]], ['boxdL', [9557]], ['boxDl', [9558]], ['boxDL', [9559]], ['boxdr', [9484]], ['boxdR', [9554]], ['boxDr', [9555]], ['boxDR', [9556]], ['boxh', [9472]], ['boxH', [9552]], ['boxhd', [9516]], ['boxHd', [9572]], ['boxhD', [9573]], ['boxHD', [9574]], ['boxhu', [9524]], ['boxHu', [9575]], ['boxhU', [9576]], ['boxHU', [9577]], ['boxminus', [8863]], ['boxplus', [8862]], ['boxtimes', [8864]], ['boxul', [9496]], ['boxuL', [9563]], ['boxUl', [9564]], ['boxUL', [9565]], ['boxur', [9492]], ['boxuR', [9560]], ['boxUr', [9561]], ['boxUR', [9562]], ['boxv', [9474]], ['boxV', [9553]], ['boxvh', [9532]], ['boxvH', [9578]], ['boxVh', [9579]], ['boxVH', [9580]], ['boxvl', [9508]], ['boxvL', [9569]], ['boxVl', [9570]], ['boxVL', [9571]], ['boxvr', [9500]], ['boxvR', [9566]], ['boxVr', [9567]], ['boxVR', [9568]], ['bprime', [8245]], ['breve', [728]], ['Breve', [728]], ['brvbar', [166]], ['bscr', [119991]], ['Bscr', [8492]], ['bsemi', [8271]], ['bsim', [8765]], ['bsime', [8909]], ['bsolb', [10693]], ['bsol', [92]], ['bsolhsub', [10184]], ['bull', [8226]], ['bullet', [8226]], ['bump', [8782]], ['bumpE', [10926]], ['bumpe', [8783]], ['Bumpeq', [8782]], ['bumpeq', [8783]], ['Cacute', [262]], ['cacute', [263]], ['capand', [10820]], ['capbrcup', [10825]], ['capcap', [10827]], ['cap', [8745]], ['Cap', [8914]], ['capcup', [10823]], ['capdot', [10816]], ['CapitalDifferentialD', [8517]], ['caps', [8745, 65024]], ['caret', [8257]], ['caron', [711]], ['Cayleys', [8493]], ['ccaps', [10829]], ['Ccaron', [268]], ['ccaron', [269]], ['Ccedil', [199]], ['ccedil', [231]], ['Ccirc', [264]], ['ccirc', [265]], ['Cconint', [8752]], ['ccups', [10828]], ['ccupssm', [10832]], ['Cdot', [266]], ['cdot', [267]], ['cedil', [184]], ['Cedilla', [184]], ['cemptyv', [10674]], ['cent', [162]], ['centerdot', [183]], ['CenterDot', [183]], ['cfr', [120096]], ['Cfr', [8493]], ['CHcy', [1063]], ['chcy', [1095]], ['check', [10003]], ['checkmark', [10003]], ['Chi', [935]], ['chi', [967]], ['circ', [710]], ['circeq', [8791]], ['circlearrowleft', [8634]], ['circlearrowright', [8635]], ['circledast', [8859]], ['circledcirc', [8858]], ['circleddash', [8861]], ['CircleDot', [8857]], ['circledR', [174]], ['circledS', [9416]], ['CircleMinus', [8854]], ['CirclePlus', [8853]], ['CircleTimes', [8855]], ['cir', [9675]], ['cirE', [10691]], ['cire', [8791]], ['cirfnint', [10768]], ['cirmid', [10991]], ['cirscir', [10690]], ['ClockwiseContourIntegral', [8754]], ['clubs', [9827]], ['clubsuit', [9827]], ['colon', [58]], ['Colon', [8759]], ['Colone', [10868]], ['colone', [8788]], ['coloneq', [8788]], ['comma', [44]], ['commat', [64]], ['comp', [8705]], ['compfn', [8728]], ['complement', [8705]], ['complexes', [8450]], ['cong', [8773]], ['congdot', [10861]], ['Congruent', [8801]], ['conint', [8750]], ['Conint', [8751]], ['ContourIntegral', [8750]], ['copf', [120148]], ['Copf', [8450]], ['coprod', [8720]], ['Coproduct', [8720]], ['copy', [169]], ['COPY', [169]], ['copysr', [8471]], ['CounterClockwiseContourIntegral', [8755]], ['crarr', [8629]], ['cross', [10007]], ['Cross', [10799]], ['Cscr', [119966]], ['cscr', [119992]], ['csub', [10959]], ['csube', [10961]], ['csup', [10960]], ['csupe', [10962]], ['ctdot', [8943]], ['cudarrl', [10552]], ['cudarrr', [10549]], ['cuepr', [8926]], ['cuesc', [8927]], ['cularr', [8630]], ['cularrp', [10557]], ['cupbrcap', [10824]], ['cupcap', [10822]], ['CupCap', [8781]], ['cup', [8746]], ['Cup', [8915]], ['cupcup', [10826]], ['cupdot', [8845]], ['cupor', [10821]], ['cups', [8746, 65024]], ['curarr', [8631]], ['curarrm', [10556]], ['curlyeqprec', [8926]], ['curlyeqsucc', [8927]], ['curlyvee', [8910]], ['curlywedge', [8911]], ['curren', [164]], ['curvearrowleft', [8630]], ['curvearrowright', [8631]], ['cuvee', [8910]], ['cuwed', [8911]], ['cwconint', [8754]], ['cwint', [8753]], ['cylcty', [9005]], ['dagger', [8224]], ['Dagger', [8225]], ['daleth', [8504]], ['darr', [8595]], ['Darr', [8609]], ['dArr', [8659]], ['dash', [8208]], ['Dashv', [10980]], ['dashv', [8867]], ['dbkarow', [10511]], ['dblac', [733]], ['Dcaron', [270]], ['dcaron', [271]], ['Dcy', [1044]], ['dcy', [1076]], ['ddagger', [8225]], ['ddarr', [8650]], ['DD', [8517]], ['dd', [8518]], ['DDotrahd', [10513]], ['ddotseq', [10871]], ['deg', [176]], ['Del', [8711]], ['Delta', [916]], ['delta', [948]], ['demptyv', [10673]], ['dfisht', [10623]], ['Dfr', [120071]], ['dfr', [120097]], ['dHar', [10597]], ['dharl', [8643]], ['dharr', [8642]], ['DiacriticalAcute', [180]], ['DiacriticalDot', [729]], ['DiacriticalDoubleAcute', [733]], ['DiacriticalGrave', [96]], ['DiacriticalTilde', [732]], ['diam', [8900]], ['diamond', [8900]], ['Diamond', [8900]], ['diamondsuit', [9830]], ['diams', [9830]], ['die', [168]], ['DifferentialD', [8518]], ['digamma', [989]], ['disin', [8946]], ['div', [247]], ['divide', [247]], ['divideontimes', [8903]], ['divonx', [8903]], ['DJcy', [1026]], ['djcy', [1106]], ['dlcorn', [8990]], ['dlcrop', [8973]], ['dollar', [36]], ['Dopf', [120123]], ['dopf', [120149]], ['Dot', [168]], ['dot', [729]], ['DotDot', [8412]], ['doteq', [8784]], ['doteqdot', [8785]], ['DotEqual', [8784]], ['dotminus', [8760]], ['dotplus', [8724]], ['dotsquare', [8865]], ['doublebarwedge', [8966]], ['DoubleContourIntegral', [8751]], ['DoubleDot', [168]], ['DoubleDownArrow', [8659]], ['DoubleLeftArrow', [8656]], ['DoubleLeftRightArrow', [8660]], ['DoubleLeftTee', [10980]], ['DoubleLongLeftArrow', [10232]], ['DoubleLongLeftRightArrow', [10234]], ['DoubleLongRightArrow', [10233]], ['DoubleRightArrow', [8658]], ['DoubleRightTee', [8872]], ['DoubleUpArrow', [8657]], ['DoubleUpDownArrow', [8661]], ['DoubleVerticalBar', [8741]], ['DownArrowBar', [10515]], ['downarrow', [8595]], ['DownArrow', [8595]], ['Downarrow', [8659]], ['DownArrowUpArrow', [8693]], ['DownBreve', [785]], ['downdownarrows', [8650]], ['downharpoonleft', [8643]], ['downharpoonright', [8642]], ['DownLeftRightVector', [10576]], ['DownLeftTeeVector', [10590]], ['DownLeftVectorBar', [10582]], ['DownLeftVector', [8637]], ['DownRightTeeVector', [10591]], ['DownRightVectorBar', [10583]], ['DownRightVector', [8641]], ['DownTeeArrow', [8615]], ['DownTee', [8868]], ['drbkarow', [10512]], ['drcorn', [8991]], ['drcrop', [8972]], ['Dscr', [119967]], ['dscr', [119993]], ['DScy', [1029]], ['dscy', [1109]], ['dsol', [10742]], ['Dstrok', [272]], ['dstrok', [273]], ['dtdot', [8945]], ['dtri', [9663]], ['dtrif', [9662]], ['duarr', [8693]], ['duhar', [10607]], ['dwangle', [10662]], ['DZcy', [1039]], ['dzcy', [1119]], ['dzigrarr', [10239]], ['Eacute', [201]], ['eacute', [233]], ['easter', [10862]], ['Ecaron', [282]], ['ecaron', [283]], ['Ecirc', [202]], ['ecirc', [234]], ['ecir', [8790]], ['ecolon', [8789]], ['Ecy', [1069]], ['ecy', [1101]], ['eDDot', [10871]], ['Edot', [278]], ['edot', [279]], ['eDot', [8785]], ['ee', [8519]], ['efDot', [8786]], ['Efr', [120072]], ['efr', [120098]], ['eg', [10906]], ['Egrave', [200]], ['egrave', [232]], ['egs', [10902]], ['egsdot', [10904]], ['el', [10905]], ['Element', [8712]], ['elinters', [9191]], ['ell', [8467]], ['els', [10901]], ['elsdot', [10903]], ['Emacr', [274]], ['emacr', [275]], ['empty', [8709]], ['emptyset', [8709]], ['EmptySmallSquare', [9723]], ['emptyv', [8709]], ['EmptyVerySmallSquare', [9643]], ['emsp13', [8196]], ['emsp14', [8197]], ['emsp', [8195]], ['ENG', [330]], ['eng', [331]], ['ensp', [8194]], ['Eogon', [280]], ['eogon', [281]], ['Eopf', [120124]], ['eopf', [120150]], ['epar', [8917]], ['eparsl', [10723]], ['eplus', [10865]], ['epsi', [949]], ['Epsilon', [917]], ['epsilon', [949]], ['epsiv', [1013]], ['eqcirc', [8790]], ['eqcolon', [8789]], ['eqsim', [8770]], ['eqslantgtr', [10902]], ['eqslantless', [10901]], ['Equal', [10869]], ['equals', [61]], ['EqualTilde', [8770]], ['equest', [8799]], ['Equilibrium', [8652]], ['equiv', [8801]], ['equivDD', [10872]], ['eqvparsl', [10725]], ['erarr', [10609]], ['erDot', [8787]], ['escr', [8495]], ['Escr', [8496]], ['esdot', [8784]], ['Esim', [10867]], ['esim', [8770]], ['Eta', [919]], ['eta', [951]], ['ETH', [208]], ['eth', [240]], ['Euml', [203]], ['euml', [235]], ['euro', [8364]], ['excl', [33]], ['exist', [8707]], ['Exists', [8707]], ['expectation', [8496]], ['exponentiale', [8519]], ['ExponentialE', [8519]], ['fallingdotseq', [8786]], ['Fcy', [1060]], ['fcy', [1092]], ['female', [9792]], ['ffilig', [64259]], ['fflig', [64256]], ['ffllig', [64260]], ['Ffr', [120073]], ['ffr', [120099]], ['filig', [64257]], ['FilledSmallSquare', [9724]], ['FilledVerySmallSquare', [9642]], ['fjlig', [102, 106]], ['flat', [9837]], ['fllig', [64258]], ['fltns', [9649]], ['fnof', [402]], ['Fopf', [120125]], ['fopf', [120151]], ['forall', [8704]], ['ForAll', [8704]], ['fork', [8916]], ['forkv', [10969]], ['Fouriertrf', [8497]], ['fpartint', [10765]], ['frac12', [189]], ['frac13', [8531]], ['frac14', [188]], ['frac15', [8533]], ['frac16', [8537]], ['frac18', [8539]], ['frac23', [8532]], ['frac25', [8534]], ['frac34', [190]], ['frac35', [8535]], ['frac38', [8540]], ['frac45', [8536]], ['frac56', [8538]], ['frac58', [8541]], ['frac78', [8542]], ['frasl', [8260]], ['frown', [8994]], ['fscr', [119995]], ['Fscr', [8497]], ['gacute', [501]], ['Gamma', [915]], ['gamma', [947]], ['Gammad', [988]], ['gammad', [989]], ['gap', [10886]], ['Gbreve', [286]], ['gbreve', [287]], ['Gcedil', [290]], ['Gcirc', [284]], ['gcirc', [285]], ['Gcy', [1043]], ['gcy', [1075]], ['Gdot', [288]], ['gdot', [289]], ['ge', [8805]], ['gE', [8807]], ['gEl', [10892]], ['gel', [8923]], ['geq', [8805]], ['geqq', [8807]], ['geqslant', [10878]], ['gescc', [10921]], ['ges', [10878]], ['gesdot', [10880]], ['gesdoto', [10882]], ['gesdotol', [10884]], ['gesl', [8923, 65024]], ['gesles', [10900]], ['Gfr', [120074]], ['gfr', [120100]], ['gg', [8811]], ['Gg', [8921]], ['ggg', [8921]], ['gimel', [8503]], ['GJcy', [1027]], ['gjcy', [1107]], ['gla', [10917]], ['gl', [8823]], ['glE', [10898]], ['glj', [10916]], ['gnap', [10890]], ['gnapprox', [10890]], ['gne', [10888]], ['gnE', [8809]], ['gneq', [10888]], ['gneqq', [8809]], ['gnsim', [8935]], ['Gopf', [120126]], ['gopf', [120152]], ['grave', [96]], ['GreaterEqual', [8805]], ['GreaterEqualLess', [8923]], ['GreaterFullEqual', [8807]], ['GreaterGreater', [10914]], ['GreaterLess', [8823]], ['GreaterSlantEqual', [10878]], ['GreaterTilde', [8819]], ['Gscr', [119970]], ['gscr', [8458]], ['gsim', [8819]], ['gsime', [10894]], ['gsiml', [10896]], ['gtcc', [10919]], ['gtcir', [10874]], ['gt', [62]], ['GT', [62]], ['Gt', [8811]], ['gtdot', [8919]], ['gtlPar', [10645]], ['gtquest', [10876]], ['gtrapprox', [10886]], ['gtrarr', [10616]], ['gtrdot', [8919]], ['gtreqless', [8923]], ['gtreqqless', [10892]], ['gtrless', [8823]], ['gtrsim', [8819]], ['gvertneqq', [8809, 65024]], ['gvnE', [8809, 65024]], ['Hacek', [711]], ['hairsp', [8202]], ['half', [189]], ['hamilt', [8459]], ['HARDcy', [1066]], ['hardcy', [1098]], ['harrcir', [10568]], ['harr', [8596]], ['hArr', [8660]], ['harrw', [8621]], ['Hat', [94]], ['hbar', [8463]], ['Hcirc', [292]], ['hcirc', [293]], ['hearts', [9829]], ['heartsuit', [9829]], ['hellip', [8230]], ['hercon', [8889]], ['hfr', [120101]], ['Hfr', [8460]], ['HilbertSpace', [8459]], ['hksearow', [10533]], ['hkswarow', [10534]], ['hoarr', [8703]], ['homtht', [8763]], ['hookleftarrow', [8617]], ['hookrightarrow', [8618]], ['hopf', [120153]], ['Hopf', [8461]], ['horbar', [8213]], ['HorizontalLine', [9472]], ['hscr', [119997]], ['Hscr', [8459]], ['hslash', [8463]], ['Hstrok', [294]], ['hstrok', [295]], ['HumpDownHump', [8782]], ['HumpEqual', [8783]], ['hybull', [8259]], ['hyphen', [8208]], ['Iacute', [205]], ['iacute', [237]], ['ic', [8291]], ['Icirc', [206]], ['icirc', [238]], ['Icy', [1048]], ['icy', [1080]], ['Idot', [304]], ['IEcy', [1045]], ['iecy', [1077]], ['iexcl', [161]], ['iff', [8660]], ['ifr', [120102]], ['Ifr', [8465]], ['Igrave', [204]], ['igrave', [236]], ['ii', [8520]], ['iiiint', [10764]], ['iiint', [8749]], ['iinfin', [10716]], ['iiota', [8489]], ['IJlig', [306]], ['ijlig', [307]], ['Imacr', [298]], ['imacr', [299]], ['image', [8465]], ['ImaginaryI', [8520]], ['imagline', [8464]], ['imagpart', [8465]], ['imath', [305]], ['Im', [8465]], ['imof', [8887]], ['imped', [437]], ['Implies', [8658]], ['incare', [8453]], ['in', [8712]], ['infin', [8734]], ['infintie', [10717]], ['inodot', [305]], ['intcal', [8890]], ['int', [8747]], ['Int', [8748]], ['integers', [8484]], ['Integral', [8747]], ['intercal', [8890]], ['Intersection', [8898]], ['intlarhk', [10775]], ['intprod', [10812]], ['InvisibleComma', [8291]], ['InvisibleTimes', [8290]], ['IOcy', [1025]], ['iocy', [1105]], ['Iogon', [302]], ['iogon', [303]], ['Iopf', [120128]], ['iopf', [120154]], ['Iota', [921]], ['iota', [953]], ['iprod', [10812]], ['iquest', [191]], ['iscr', [119998]], ['Iscr', [8464]], ['isin', [8712]], ['isindot', [8949]], ['isinE', [8953]], ['isins', [8948]], ['isinsv', [8947]], ['isinv', [8712]], ['it', [8290]], ['Itilde', [296]], ['itilde', [297]], ['Iukcy', [1030]], ['iukcy', [1110]], ['Iuml', [207]], ['iuml', [239]], ['Jcirc', [308]], ['jcirc', [309]], ['Jcy', [1049]], ['jcy', [1081]], ['Jfr', [120077]], ['jfr', [120103]], ['jmath', [567]], ['Jopf', [120129]], ['jopf', [120155]], ['Jscr', [119973]], ['jscr', [119999]], ['Jsercy', [1032]], ['jsercy', [1112]], ['Jukcy', [1028]], ['jukcy', [1108]], ['Kappa', [922]], ['kappa', [954]], ['kappav', [1008]], ['Kcedil', [310]], ['kcedil', [311]], ['Kcy', [1050]], ['kcy', [1082]], ['Kfr', [120078]], ['kfr', [120104]], ['kgreen', [312]], ['KHcy', [1061]], ['khcy', [1093]], ['KJcy', [1036]], ['kjcy', [1116]], ['Kopf', [120130]], ['kopf', [120156]], ['Kscr', [119974]], ['kscr', [120000]], ['lAarr', [8666]], ['Lacute', [313]], ['lacute', [314]], ['laemptyv', [10676]], ['lagran', [8466]], ['Lambda', [923]], ['lambda', [955]], ['lang', [10216]], ['Lang', [10218]], ['langd', [10641]], ['langle', [10216]], ['lap', [10885]], ['Laplacetrf', [8466]], ['laquo', [171]], ['larrb', [8676]], ['larrbfs', [10527]], ['larr', [8592]], ['Larr', [8606]], ['lArr', [8656]], ['larrfs', [10525]], ['larrhk', [8617]], ['larrlp', [8619]], ['larrpl', [10553]], ['larrsim', [10611]], ['larrtl', [8610]], ['latail', [10521]], ['lAtail', [10523]], ['lat', [10923]], ['late', [10925]], ['lates', [10925, 65024]], ['lbarr', [10508]], ['lBarr', [10510]], ['lbbrk', [10098]], ['lbrace', [123]], ['lbrack', [91]], ['lbrke', [10635]], ['lbrksld', [10639]], ['lbrkslu', [10637]], ['Lcaron', [317]], ['lcaron', [318]], ['Lcedil', [315]], ['lcedil', [316]], ['lceil', [8968]], ['lcub', [123]], ['Lcy', [1051]], ['lcy', [1083]], ['ldca', [10550]], ['ldquo', [8220]], ['ldquor', [8222]], ['ldrdhar', [10599]], ['ldrushar', [10571]], ['ldsh', [8626]], ['le', [8804]], ['lE', [8806]], ['LeftAngleBracket', [10216]], ['LeftArrowBar', [8676]], ['leftarrow', [8592]], ['LeftArrow', [8592]], ['Leftarrow', [8656]], ['LeftArrowRightArrow', [8646]], ['leftarrowtail', [8610]], ['LeftCeiling', [8968]], ['LeftDoubleBracket', [10214]], ['LeftDownTeeVector', [10593]], ['LeftDownVectorBar', [10585]], ['LeftDownVector', [8643]], ['LeftFloor', [8970]], ['leftharpoondown', [8637]], ['leftharpoonup', [8636]], ['leftleftarrows', [8647]], ['leftrightarrow', [8596]], ['LeftRightArrow', [8596]], ['Leftrightarrow', [8660]], ['leftrightarrows', [8646]], ['leftrightharpoons', [8651]], ['leftrightsquigarrow', [8621]], ['LeftRightVector', [10574]], ['LeftTeeArrow', [8612]], ['LeftTee', [8867]], ['LeftTeeVector', [10586]], ['leftthreetimes', [8907]], ['LeftTriangleBar', [10703]], ['LeftTriangle', [8882]], ['LeftTriangleEqual', [8884]], ['LeftUpDownVector', [10577]], ['LeftUpTeeVector', [10592]], ['LeftUpVectorBar', [10584]], ['LeftUpVector', [8639]], ['LeftVectorBar', [10578]], ['LeftVector', [8636]], ['lEg', [10891]], ['leg', [8922]], ['leq', [8804]], ['leqq', [8806]], ['leqslant', [10877]], ['lescc', [10920]], ['les', [10877]], ['lesdot', [10879]], ['lesdoto', [10881]], ['lesdotor', [10883]], ['lesg', [8922, 65024]], ['lesges', [10899]], ['lessapprox', [10885]], ['lessdot', [8918]], ['lesseqgtr', [8922]], ['lesseqqgtr', [10891]], ['LessEqualGreater', [8922]], ['LessFullEqual', [8806]], ['LessGreater', [8822]], ['lessgtr', [8822]], ['LessLess', [10913]], ['lesssim', [8818]], ['LessSlantEqual', [10877]], ['LessTilde', [8818]], ['lfisht', [10620]], ['lfloor', [8970]], ['Lfr', [120079]], ['lfr', [120105]], ['lg', [8822]], ['lgE', [10897]], ['lHar', [10594]], ['lhard', [8637]], ['lharu', [8636]], ['lharul', [10602]], ['lhblk', [9604]], ['LJcy', [1033]], ['ljcy', [1113]], ['llarr', [8647]], ['ll', [8810]], ['Ll', [8920]], ['llcorner', [8990]], ['Lleftarrow', [8666]], ['llhard', [10603]], ['lltri', [9722]], ['Lmidot', [319]], ['lmidot', [320]], ['lmoustache', [9136]], ['lmoust', [9136]], ['lnap', [10889]], ['lnapprox', [10889]], ['lne', [10887]], ['lnE', [8808]], ['lneq', [10887]], ['lneqq', [8808]], ['lnsim', [8934]], ['loang', [10220]], ['loarr', [8701]], ['lobrk', [10214]], ['longleftarrow', [10229]], ['LongLeftArrow', [10229]], ['Longleftarrow', [10232]], ['longleftrightarrow', [10231]], ['LongLeftRightArrow', [10231]], ['Longleftrightarrow', [10234]], ['longmapsto', [10236]], ['longrightarrow', [10230]], ['LongRightArrow', [10230]], ['Longrightarrow', [10233]], ['looparrowleft', [8619]], ['looparrowright', [8620]], ['lopar', [10629]], ['Lopf', [120131]], ['lopf', [120157]], ['loplus', [10797]], ['lotimes', [10804]], ['lowast', [8727]], ['lowbar', [95]], ['LowerLeftArrow', [8601]], ['LowerRightArrow', [8600]], ['loz', [9674]], ['lozenge', [9674]], ['lozf', [10731]], ['lpar', [40]], ['lparlt', [10643]], ['lrarr', [8646]], ['lrcorner', [8991]], ['lrhar', [8651]], ['lrhard', [10605]], ['lrm', [8206]], ['lrtri', [8895]], ['lsaquo', [8249]], ['lscr', [120001]], ['Lscr', [8466]], ['lsh', [8624]], ['Lsh', [8624]], ['lsim', [8818]], ['lsime', [10893]], ['lsimg', [10895]], ['lsqb', [91]], ['lsquo', [8216]], ['lsquor', [8218]], ['Lstrok', [321]], ['lstrok', [322]], ['ltcc', [10918]], ['ltcir', [10873]], ['lt', [60]], ['LT', [60]], ['Lt', [8810]], ['ltdot', [8918]], ['lthree', [8907]], ['ltimes', [8905]], ['ltlarr', [10614]], ['ltquest', [10875]], ['ltri', [9667]], ['ltrie', [8884]], ['ltrif', [9666]], ['ltrPar', [10646]], ['lurdshar', [10570]], ['luruhar', [10598]], ['lvertneqq', [8808, 65024]], ['lvnE', [8808, 65024]], ['macr', [175]], ['male', [9794]], ['malt', [10016]], ['maltese', [10016]], ['Map', [10501]], ['map', [8614]], ['mapsto', [8614]], ['mapstodown', [8615]], ['mapstoleft', [8612]], ['mapstoup', [8613]], ['marker', [9646]], ['mcomma', [10793]], ['Mcy', [1052]], ['mcy', [1084]], ['mdash', [8212]], ['mDDot', [8762]], ['measuredangle', [8737]], ['MediumSpace', [8287]], ['Mellintrf', [8499]], ['Mfr', [120080]], ['mfr', [120106]], ['mho', [8487]], ['micro', [181]], ['midast', [42]], ['midcir', [10992]], ['mid', [8739]], ['middot', [183]], ['minusb', [8863]], ['minus', [8722]], ['minusd', [8760]], ['minusdu', [10794]], ['MinusPlus', [8723]], ['mlcp', [10971]], ['mldr', [8230]], ['mnplus', [8723]], ['models', [8871]], ['Mopf', [120132]], ['mopf', [120158]], ['mp', [8723]], ['mscr', [120002]], ['Mscr', [8499]], ['mstpos', [8766]], ['Mu', [924]], ['mu', [956]], ['multimap', [8888]], ['mumap', [8888]], ['nabla', [8711]], ['Nacute', [323]], ['nacute', [324]], ['nang', [8736, 8402]], ['nap', [8777]], ['napE', [10864, 824]], ['napid', [8779, 824]], ['napos', [329]], ['napprox', [8777]], ['natural', [9838]], ['naturals', [8469]], ['natur', [9838]], ['nbsp', [160]], ['nbump', [8782, 824]], ['nbumpe', [8783, 824]], ['ncap', [10819]], ['Ncaron', [327]], ['ncaron', [328]], ['Ncedil', [325]], ['ncedil', [326]], ['ncong', [8775]], ['ncongdot', [10861, 824]], ['ncup', [10818]], ['Ncy', [1053]], ['ncy', [1085]], ['ndash', [8211]], ['nearhk', [10532]], ['nearr', [8599]], ['neArr', [8663]], ['nearrow', [8599]], ['ne', [8800]], ['nedot', [8784, 824]], ['NegativeMediumSpace', [8203]], ['NegativeThickSpace', [8203]], ['NegativeThinSpace', [8203]], ['NegativeVeryThinSpace', [8203]], ['nequiv', [8802]], ['nesear', [10536]], ['nesim', [8770, 824]], ['NestedGreaterGreater', [8811]], ['NestedLessLess', [8810]], ['nexist', [8708]], ['nexists', [8708]], ['Nfr', [120081]], ['nfr', [120107]], ['ngE', [8807, 824]], ['nge', [8817]], ['ngeq', [8817]], ['ngeqq', [8807, 824]], ['ngeqslant', [10878, 824]], ['nges', [10878, 824]], ['nGg', [8921, 824]], ['ngsim', [8821]], ['nGt', [8811, 8402]], ['ngt', [8815]], ['ngtr', [8815]], ['nGtv', [8811, 824]], ['nharr', [8622]], ['nhArr', [8654]], ['nhpar', [10994]], ['ni', [8715]], ['nis', [8956]], ['nisd', [8954]], ['niv', [8715]], ['NJcy', [1034]], ['njcy', [1114]], ['nlarr', [8602]], ['nlArr', [8653]], ['nldr', [8229]], ['nlE', [8806, 824]], ['nle', [8816]], ['nleftarrow', [8602]], ['nLeftarrow', [8653]], ['nleftrightarrow', [8622]], ['nLeftrightarrow', [8654]], ['nleq', [8816]], ['nleqq', [8806, 824]], ['nleqslant', [10877, 824]], ['nles', [10877, 824]], ['nless', [8814]], ['nLl', [8920, 824]], ['nlsim', [8820]], ['nLt', [8810, 8402]], ['nlt', [8814]], ['nltri', [8938]], ['nltrie', [8940]], ['nLtv', [8810, 824]], ['nmid', [8740]], ['NoBreak', [8288]], ['NonBreakingSpace', [160]], ['nopf', [120159]], ['Nopf', [8469]], ['Not', [10988]], ['not', [172]], ['NotCongruent', [8802]], ['NotCupCap', [8813]], ['NotDoubleVerticalBar', [8742]], ['NotElement', [8713]], ['NotEqual', [8800]], ['NotEqualTilde', [8770, 824]], ['NotExists', [8708]], ['NotGreater', [8815]], ['NotGreaterEqual', [8817]], ['NotGreaterFullEqual', [8807, 824]], ['NotGreaterGreater', [8811, 824]], ['NotGreaterLess', [8825]], ['NotGreaterSlantEqual', [10878, 824]], ['NotGreaterTilde', [8821]], ['NotHumpDownHump', [8782, 824]], ['NotHumpEqual', [8783, 824]], ['notin', [8713]], ['notindot', [8949, 824]], ['notinE', [8953, 824]], ['notinva', [8713]], ['notinvb', [8951]], ['notinvc', [8950]], ['NotLeftTriangleBar', [10703, 824]], ['NotLeftTriangle', [8938]], ['NotLeftTriangleEqual', [8940]], ['NotLess', [8814]], ['NotLessEqual', [8816]], ['NotLessGreater', [8824]], ['NotLessLess', [8810, 824]], ['NotLessSlantEqual', [10877, 824]], ['NotLessTilde', [8820]], ['NotNestedGreaterGreater', [10914, 824]], ['NotNestedLessLess', [10913, 824]], ['notni', [8716]], ['notniva', [8716]], ['notnivb', [8958]], ['notnivc', [8957]], ['NotPrecedes', [8832]], ['NotPrecedesEqual', [10927, 824]], ['NotPrecedesSlantEqual', [8928]], ['NotReverseElement', [8716]], ['NotRightTriangleBar', [10704, 824]], ['NotRightTriangle', [8939]], ['NotRightTriangleEqual', [8941]], ['NotSquareSubset', [8847, 824]], ['NotSquareSubsetEqual', [8930]], ['NotSquareSuperset', [8848, 824]], ['NotSquareSupersetEqual', [8931]], ['NotSubset', [8834, 8402]], ['NotSubsetEqual', [8840]], ['NotSucceeds', [8833]], ['NotSucceedsEqual', [10928, 824]], ['NotSucceedsSlantEqual', [8929]], ['NotSucceedsTilde', [8831, 824]], ['NotSuperset', [8835, 8402]], ['NotSupersetEqual', [8841]], ['NotTilde', [8769]], ['NotTildeEqual', [8772]], ['NotTildeFullEqual', [8775]], ['NotTildeTilde', [8777]], ['NotVerticalBar', [8740]], ['nparallel', [8742]], ['npar', [8742]], ['nparsl', [11005, 8421]], ['npart', [8706, 824]], ['npolint', [10772]], ['npr', [8832]], ['nprcue', [8928]], ['nprec', [8832]], ['npreceq', [10927, 824]], ['npre', [10927, 824]], ['nrarrc', [10547, 824]], ['nrarr', [8603]], ['nrArr', [8655]], ['nrarrw', [8605, 824]], ['nrightarrow', [8603]], ['nRightarrow', [8655]], ['nrtri', [8939]], ['nrtrie', [8941]], ['nsc', [8833]], ['nsccue', [8929]], ['nsce', [10928, 824]], ['Nscr', [119977]], ['nscr', [120003]], ['nshortmid', [8740]], ['nshortparallel', [8742]], ['nsim', [8769]], ['nsime', [8772]], ['nsimeq', [8772]], ['nsmid', [8740]], ['nspar', [8742]], ['nsqsube', [8930]], ['nsqsupe', [8931]], ['nsub', [8836]], ['nsubE', [10949, 824]], ['nsube', [8840]], ['nsubset', [8834, 8402]], ['nsubseteq', [8840]], ['nsubseteqq', [10949, 824]], ['nsucc', [8833]], ['nsucceq', [10928, 824]], ['nsup', [8837]], ['nsupE', [10950, 824]], ['nsupe', [8841]], ['nsupset', [8835, 8402]], ['nsupseteq', [8841]], ['nsupseteqq', [10950, 824]], ['ntgl', [8825]], ['Ntilde', [209]], ['ntilde', [241]], ['ntlg', [8824]], ['ntriangleleft', [8938]], ['ntrianglelefteq', [8940]], ['ntriangleright', [8939]], ['ntrianglerighteq', [8941]], ['Nu', [925]], ['nu', [957]], ['num', [35]], ['numero', [8470]], ['numsp', [8199]], ['nvap', [8781, 8402]], ['nvdash', [8876]], ['nvDash', [8877]], ['nVdash', [8878]], ['nVDash', [8879]], ['nvge', [8805, 8402]], ['nvgt', [62, 8402]], ['nvHarr', [10500]], ['nvinfin', [10718]], ['nvlArr', [10498]], ['nvle', [8804, 8402]], ['nvlt', [60, 8402]], ['nvltrie', [8884, 8402]], ['nvrArr', [10499]], ['nvrtrie', [8885, 8402]], ['nvsim', [8764, 8402]], ['nwarhk', [10531]], ['nwarr', [8598]], ['nwArr', [8662]], ['nwarrow', [8598]], ['nwnear', [10535]], ['Oacute', [211]], ['oacute', [243]], ['oast', [8859]], ['Ocirc', [212]], ['ocirc', [244]], ['ocir', [8858]], ['Ocy', [1054]], ['ocy', [1086]], ['odash', [8861]], ['Odblac', [336]], ['odblac', [337]], ['odiv', [10808]], ['odot', [8857]], ['odsold', [10684]], ['OElig', [338]], ['oelig', [339]], ['ofcir', [10687]], ['Ofr', [120082]], ['ofr', [120108]], ['ogon', [731]], ['Ograve', [210]], ['ograve', [242]], ['ogt', [10689]], ['ohbar', [10677]], ['ohm', [937]], ['oint', [8750]], ['olarr', [8634]], ['olcir', [10686]], ['olcross', [10683]], ['oline', [8254]], ['olt', [10688]], ['Omacr', [332]], ['omacr', [333]], ['Omega', [937]], ['omega', [969]], ['Omicron', [927]], ['omicron', [959]], ['omid', [10678]], ['ominus', [8854]], ['Oopf', [120134]], ['oopf', [120160]], ['opar', [10679]], ['OpenCurlyDoubleQuote', [8220]], ['OpenCurlyQuote', [8216]], ['operp', [10681]], ['oplus', [8853]], ['orarr', [8635]], ['Or', [10836]], ['or', [8744]], ['ord', [10845]], ['order', [8500]], ['orderof', [8500]], ['ordf', [170]], ['ordm', [186]], ['origof', [8886]], ['oror', [10838]], ['orslope', [10839]], ['orv', [10843]], ['oS', [9416]], ['Oscr', [119978]], ['oscr', [8500]], ['Oslash', [216]], ['oslash', [248]], ['osol', [8856]], ['Otilde', [213]], ['otilde', [245]], ['otimesas', [10806]], ['Otimes', [10807]], ['otimes', [8855]], ['Ouml', [214]], ['ouml', [246]], ['ovbar', [9021]], ['OverBar', [8254]], ['OverBrace', [9182]], ['OverBracket', [9140]], ['OverParenthesis', [9180]], ['para', [182]], ['parallel', [8741]], ['par', [8741]], ['parsim', [10995]], ['parsl', [11005]], ['part', [8706]], ['PartialD', [8706]], ['Pcy', [1055]], ['pcy', [1087]], ['percnt', [37]], ['period', [46]], ['permil', [8240]], ['perp', [8869]], ['pertenk', [8241]], ['Pfr', [120083]], ['pfr', [120109]], ['Phi', [934]], ['phi', [966]], ['phiv', [981]], ['phmmat', [8499]], ['phone', [9742]], ['Pi', [928]], ['pi', [960]], ['pitchfork', [8916]], ['piv', [982]], ['planck', [8463]], ['planckh', [8462]], ['plankv', [8463]], ['plusacir', [10787]], ['plusb', [8862]], ['pluscir', [10786]], ['plus', [43]], ['plusdo', [8724]], ['plusdu', [10789]], ['pluse', [10866]], ['PlusMinus', [177]], ['plusmn', [177]], ['plussim', [10790]], ['plustwo', [10791]], ['pm', [177]], ['Poincareplane', [8460]], ['pointint', [10773]], ['popf', [120161]], ['Popf', [8473]], ['pound', [163]], ['prap', [10935]], ['Pr', [10939]], ['pr', [8826]], ['prcue', [8828]], ['precapprox', [10935]], ['prec', [8826]], ['preccurlyeq', [8828]], ['Precedes', [8826]], ['PrecedesEqual', [10927]], ['PrecedesSlantEqual', [8828]], ['PrecedesTilde', [8830]], ['preceq', [10927]], ['precnapprox', [10937]], ['precneqq', [10933]], ['precnsim', [8936]], ['pre', [10927]], ['prE', [10931]], ['precsim', [8830]], ['prime', [8242]], ['Prime', [8243]], ['primes', [8473]], ['prnap', [10937]], ['prnE', [10933]], ['prnsim', [8936]], ['prod', [8719]], ['Product', [8719]], ['profalar', [9006]], ['profline', [8978]], ['profsurf', [8979]], ['prop', [8733]], ['Proportional', [8733]], ['Proportion', [8759]], ['propto', [8733]], ['prsim', [8830]], ['prurel', [8880]], ['Pscr', [119979]], ['pscr', [120005]], ['Psi', [936]], ['psi', [968]], ['puncsp', [8200]], ['Qfr', [120084]], ['qfr', [120110]], ['qint', [10764]], ['qopf', [120162]], ['Qopf', [8474]], ['qprime', [8279]], ['Qscr', [119980]], ['qscr', [120006]], ['quaternions', [8461]], ['quatint', [10774]], ['quest', [63]], ['questeq', [8799]], ['quot', [34]], ['QUOT', [34]], ['rAarr', [8667]], ['race', [8765, 817]], ['Racute', [340]], ['racute', [341]], ['radic', [8730]], ['raemptyv', [10675]], ['rang', [10217]], ['Rang', [10219]], ['rangd', [10642]], ['range', [10661]], ['rangle', [10217]], ['raquo', [187]], ['rarrap', [10613]], ['rarrb', [8677]], ['rarrbfs', [10528]], ['rarrc', [10547]], ['rarr', [8594]], ['Rarr', [8608]], ['rArr', [8658]], ['rarrfs', [10526]], ['rarrhk', [8618]], ['rarrlp', [8620]], ['rarrpl', [10565]], ['rarrsim', [10612]], ['Rarrtl', [10518]], ['rarrtl', [8611]], ['rarrw', [8605]], ['ratail', [10522]], ['rAtail', [10524]], ['ratio', [8758]], ['rationals', [8474]], ['rbarr', [10509]], ['rBarr', [10511]], ['RBarr', [10512]], ['rbbrk', [10099]], ['rbrace', [125]], ['rbrack', [93]], ['rbrke', [10636]], ['rbrksld', [10638]], ['rbrkslu', [10640]], ['Rcaron', [344]], ['rcaron', [345]], ['Rcedil', [342]], ['rcedil', [343]], ['rceil', [8969]], ['rcub', [125]], ['Rcy', [1056]], ['rcy', [1088]], ['rdca', [10551]], ['rdldhar', [10601]], ['rdquo', [8221]], ['rdquor', [8221]], ['CloseCurlyDoubleQuote', [8221]], ['rdsh', [8627]], ['real', [8476]], ['realine', [8475]], ['realpart', [8476]], ['reals', [8477]], ['Re', [8476]], ['rect', [9645]], ['reg', [174]], ['REG', [174]], ['ReverseElement', [8715]], ['ReverseEquilibrium', [8651]], ['ReverseUpEquilibrium', [10607]], ['rfisht', [10621]], ['rfloor', [8971]], ['rfr', [120111]], ['Rfr', [8476]], ['rHar', [10596]], ['rhard', [8641]], ['rharu', [8640]], ['rharul', [10604]], ['Rho', [929]], ['rho', [961]], ['rhov', [1009]], ['RightAngleBracket', [10217]], ['RightArrowBar', [8677]], ['rightarrow', [8594]], ['RightArrow', [8594]], ['Rightarrow', [8658]], ['RightArrowLeftArrow', [8644]], ['rightarrowtail', [8611]], ['RightCeiling', [8969]], ['RightDoubleBracket', [10215]], ['RightDownTeeVector', [10589]], ['RightDownVectorBar', [10581]], ['RightDownVector', [8642]], ['RightFloor', [8971]], ['rightharpoondown', [8641]], ['rightharpoonup', [8640]], ['rightleftarrows', [8644]], ['rightleftharpoons', [8652]], ['rightrightarrows', [8649]], ['rightsquigarrow', [8605]], ['RightTeeArrow', [8614]], ['RightTee', [8866]], ['RightTeeVector', [10587]], ['rightthreetimes', [8908]], ['RightTriangleBar', [10704]], ['RightTriangle', [8883]], ['RightTriangleEqual', [8885]], ['RightUpDownVector', [10575]], ['RightUpTeeVector', [10588]], ['RightUpVectorBar', [10580]], ['RightUpVector', [8638]], ['RightVectorBar', [10579]], ['RightVector', [8640]], ['ring', [730]], ['risingdotseq', [8787]], ['rlarr', [8644]], ['rlhar', [8652]], ['rlm', [8207]], ['rmoustache', [9137]], ['rmoust', [9137]], ['rnmid', [10990]], ['roang', [10221]], ['roarr', [8702]], ['robrk', [10215]], ['ropar', [10630]], ['ropf', [120163]], ['Ropf', [8477]], ['roplus', [10798]], ['rotimes', [10805]], ['RoundImplies', [10608]], ['rpar', [41]], ['rpargt', [10644]], ['rppolint', [10770]], ['rrarr', [8649]], ['Rrightarrow', [8667]], ['rsaquo', [8250]], ['rscr', [120007]], ['Rscr', [8475]], ['rsh', [8625]], ['Rsh', [8625]], ['rsqb', [93]], ['rsquo', [8217]], ['rsquor', [8217]], ['CloseCurlyQuote', [8217]], ['rthree', [8908]], ['rtimes', [8906]], ['rtri', [9657]], ['rtrie', [8885]], ['rtrif', [9656]], ['rtriltri', [10702]], ['RuleDelayed', [10740]], ['ruluhar', [10600]], ['rx', [8478]], ['Sacute', [346]], ['sacute', [347]], ['sbquo', [8218]], ['scap', [10936]], ['Scaron', [352]], ['scaron', [353]], ['Sc', [10940]], ['sc', [8827]], ['sccue', [8829]], ['sce', [10928]], ['scE', [10932]], ['Scedil', [350]], ['scedil', [351]], ['Scirc', [348]], ['scirc', [349]], ['scnap', [10938]], ['scnE', [10934]], ['scnsim', [8937]], ['scpolint', [10771]], ['scsim', [8831]], ['Scy', [1057]], ['scy', [1089]], ['sdotb', [8865]], ['sdot', [8901]], ['sdote', [10854]], ['searhk', [10533]], ['searr', [8600]], ['seArr', [8664]], ['searrow', [8600]], ['sect', [167]], ['semi', [59]], ['seswar', [10537]], ['setminus', [8726]], ['setmn', [8726]], ['sext', [10038]], ['Sfr', [120086]], ['sfr', [120112]], ['sfrown', [8994]], ['sharp', [9839]], ['SHCHcy', [1065]], ['shchcy', [1097]], ['SHcy', [1064]], ['shcy', [1096]], ['ShortDownArrow', [8595]], ['ShortLeftArrow', [8592]], ['shortmid', [8739]], ['shortparallel', [8741]], ['ShortRightArrow', [8594]], ['ShortUpArrow', [8593]], ['shy', [173]], ['Sigma', [931]], ['sigma', [963]], ['sigmaf', [962]], ['sigmav', [962]], ['sim', [8764]], ['simdot', [10858]], ['sime', [8771]], ['simeq', [8771]], ['simg', [10910]], ['simgE', [10912]], ['siml', [10909]], ['simlE', [10911]], ['simne', [8774]], ['simplus', [10788]], ['simrarr', [10610]], ['slarr', [8592]], ['SmallCircle', [8728]], ['smallsetminus', [8726]], ['smashp', [10803]], ['smeparsl', [10724]], ['smid', [8739]], ['smile', [8995]], ['smt', [10922]], ['smte', [10924]], ['smtes', [10924, 65024]], ['SOFTcy', [1068]], ['softcy', [1100]], ['solbar', [9023]], ['solb', [10692]], ['sol', [47]], ['Sopf', [120138]], ['sopf', [120164]], ['spades', [9824]], ['spadesuit', [9824]], ['spar', [8741]], ['sqcap', [8851]], ['sqcaps', [8851, 65024]], ['sqcup', [8852]], ['sqcups', [8852, 65024]], ['Sqrt', [8730]], ['sqsub', [8847]], ['sqsube', [8849]], ['sqsubset', [8847]], ['sqsubseteq', [8849]], ['sqsup', [8848]], ['sqsupe', [8850]], ['sqsupset', [8848]], ['sqsupseteq', [8850]], ['square', [9633]], ['Square', [9633]], ['SquareIntersection', [8851]], ['SquareSubset', [8847]], ['SquareSubsetEqual', [8849]], ['SquareSuperset', [8848]], ['SquareSupersetEqual', [8850]], ['SquareUnion', [8852]], ['squarf', [9642]], ['squ', [9633]], ['squf', [9642]], ['srarr', [8594]], ['Sscr', [119982]], ['sscr', [120008]], ['ssetmn', [8726]], ['ssmile', [8995]], ['sstarf', [8902]], ['Star', [8902]], ['star', [9734]], ['starf', [9733]], ['straightepsilon', [1013]], ['straightphi', [981]], ['strns', [175]], ['sub', [8834]], ['Sub', [8912]], ['subdot', [10941]], ['subE', [10949]], ['sube', [8838]], ['subedot', [10947]], ['submult', [10945]], ['subnE', [10955]], ['subne', [8842]], ['subplus', [10943]], ['subrarr', [10617]], ['subset', [8834]], ['Subset', [8912]], ['subseteq', [8838]], ['subseteqq', [10949]], ['SubsetEqual', [8838]], ['subsetneq', [8842]], ['subsetneqq', [10955]], ['subsim', [10951]], ['subsub', [10965]], ['subsup', [10963]], ['succapprox', [10936]], ['succ', [8827]], ['succcurlyeq', [8829]], ['Succeeds', [8827]], ['SucceedsEqual', [10928]], ['SucceedsSlantEqual', [8829]], ['SucceedsTilde', [8831]], ['succeq', [10928]], ['succnapprox', [10938]], ['succneqq', [10934]], ['succnsim', [8937]], ['succsim', [8831]], ['SuchThat', [8715]], ['sum', [8721]], ['Sum', [8721]], ['sung', [9834]], ['sup1', [185]], ['sup2', [178]], ['sup3', [179]], ['sup', [8835]], ['Sup', [8913]], ['supdot', [10942]], ['supdsub', [10968]], ['supE', [10950]], ['supe', [8839]], ['supedot', [10948]], ['Superset', [8835]], ['SupersetEqual', [8839]], ['suphsol', [10185]], ['suphsub', [10967]], ['suplarr', [10619]], ['supmult', [10946]], ['supnE', [10956]], ['supne', [8843]], ['supplus', [10944]], ['supset', [8835]], ['Supset', [8913]], ['supseteq', [8839]], ['supseteqq', [10950]], ['supsetneq', [8843]], ['supsetneqq', [10956]], ['supsim', [10952]], ['supsub', [10964]], ['supsup', [10966]], ['swarhk', [10534]], ['swarr', [8601]], ['swArr', [8665]], ['swarrow', [8601]], ['swnwar', [10538]], ['szlig', [223]], ['Tab', [9]], ['target', [8982]], ['Tau', [932]], ['tau', [964]], ['tbrk', [9140]], ['Tcaron', [356]], ['tcaron', [357]], ['Tcedil', [354]], ['tcedil', [355]], ['Tcy', [1058]], ['tcy', [1090]], ['tdot', [8411]], ['telrec', [8981]], ['Tfr', [120087]], ['tfr', [120113]], ['there4', [8756]], ['therefore', [8756]], ['Therefore', [8756]], ['Theta', [920]], ['theta', [952]], ['thetasym', [977]], ['thetav', [977]], ['thickapprox', [8776]], ['thicksim', [8764]], ['ThickSpace', [8287, 8202]], ['ThinSpace', [8201]], ['thinsp', [8201]], ['thkap', [8776]], ['thksim', [8764]], ['THORN', [222]], ['thorn', [254]], ['tilde', [732]], ['Tilde', [8764]], ['TildeEqual', [8771]], ['TildeFullEqual', [8773]], ['TildeTilde', [8776]], ['timesbar', [10801]], ['timesb', [8864]], ['times', [215]], ['timesd', [10800]], ['tint', [8749]], ['toea', [10536]], ['topbot', [9014]], ['topcir', [10993]], ['top', [8868]], ['Topf', [120139]], ['topf', [120165]], ['topfork', [10970]], ['tosa', [10537]], ['tprime', [8244]], ['trade', [8482]], ['TRADE', [8482]], ['triangle', [9653]], ['triangledown', [9663]], ['triangleleft', [9667]], ['trianglelefteq', [8884]], ['triangleq', [8796]], ['triangleright', [9657]], ['trianglerighteq', [8885]], ['tridot', [9708]], ['trie', [8796]], ['triminus', [10810]], ['TripleDot', [8411]], ['triplus', [10809]], ['trisb', [10701]], ['tritime', [10811]], ['trpezium', [9186]], ['Tscr', [119983]], ['tscr', [120009]], ['TScy', [1062]], ['tscy', [1094]], ['TSHcy', [1035]], ['tshcy', [1115]], ['Tstrok', [358]], ['tstrok', [359]], ['twixt', [8812]], ['twoheadleftarrow', [8606]], ['twoheadrightarrow', [8608]], ['Uacute', [218]], ['uacute', [250]], ['uarr', [8593]], ['Uarr', [8607]], ['uArr', [8657]], ['Uarrocir', [10569]], ['Ubrcy', [1038]], ['ubrcy', [1118]], ['Ubreve', [364]], ['ubreve', [365]], ['Ucirc', [219]], ['ucirc', [251]], ['Ucy', [1059]], ['ucy', [1091]], ['udarr', [8645]], ['Udblac', [368]], ['udblac', [369]], ['udhar', [10606]], ['ufisht', [10622]], ['Ufr', [120088]], ['ufr', [120114]], ['Ugrave', [217]], ['ugrave', [249]], ['uHar', [10595]], ['uharl', [8639]], ['uharr', [8638]], ['uhblk', [9600]], ['ulcorn', [8988]], ['ulcorner', [8988]], ['ulcrop', [8975]], ['ultri', [9720]], ['Umacr', [362]], ['umacr', [363]], ['uml', [168]], ['UnderBar', [95]], ['UnderBrace', [9183]], ['UnderBracket', [9141]], ['UnderParenthesis', [9181]], ['Union', [8899]], ['UnionPlus', [8846]], ['Uogon', [370]], ['uogon', [371]], ['Uopf', [120140]], ['uopf', [120166]], ['UpArrowBar', [10514]], ['uparrow', [8593]], ['UpArrow', [8593]], ['Uparrow', [8657]], ['UpArrowDownArrow', [8645]], ['updownarrow', [8597]], ['UpDownArrow', [8597]], ['Updownarrow', [8661]], ['UpEquilibrium', [10606]], ['upharpoonleft', [8639]], ['upharpoonright', [8638]], ['uplus', [8846]], ['UpperLeftArrow', [8598]], ['UpperRightArrow', [8599]], ['upsi', [965]], ['Upsi', [978]], ['upsih', [978]], ['Upsilon', [933]], ['upsilon', [965]], ['UpTeeArrow', [8613]], ['UpTee', [8869]], ['upuparrows', [8648]], ['urcorn', [8989]], ['urcorner', [8989]], ['urcrop', [8974]], ['Uring', [366]], ['uring', [367]], ['urtri', [9721]], ['Uscr', [119984]], ['uscr', [120010]], ['utdot', [8944]], ['Utilde', [360]], ['utilde', [361]], ['utri', [9653]], ['utrif', [9652]], ['uuarr', [8648]], ['Uuml', [220]], ['uuml', [252]], ['uwangle', [10663]], ['vangrt', [10652]], ['varepsilon', [1013]], ['varkappa', [1008]], ['varnothing', [8709]], ['varphi', [981]], ['varpi', [982]], ['varpropto', [8733]], ['varr', [8597]], ['vArr', [8661]], ['varrho', [1009]], ['varsigma', [962]], ['varsubsetneq', [8842, 65024]], ['varsubsetneqq', [10955, 65024]], ['varsupsetneq', [8843, 65024]], ['varsupsetneqq', [10956, 65024]], ['vartheta', [977]], ['vartriangleleft', [8882]], ['vartriangleright', [8883]], ['vBar', [10984]], ['Vbar', [10987]], ['vBarv', [10985]], ['Vcy', [1042]], ['vcy', [1074]], ['vdash', [8866]], ['vDash', [8872]], ['Vdash', [8873]], ['VDash', [8875]], ['Vdashl', [10982]], ['veebar', [8891]], ['vee', [8744]], ['Vee', [8897]], ['veeeq', [8794]], ['vellip', [8942]], ['verbar', [124]], ['Verbar', [8214]], ['vert', [124]], ['Vert', [8214]], ['VerticalBar', [8739]], ['VerticalLine', [124]], ['VerticalSeparator', [10072]], ['VerticalTilde', [8768]], ['VeryThinSpace', [8202]], ['Vfr', [120089]], ['vfr', [120115]], ['vltri', [8882]], ['vnsub', [8834, 8402]], ['vnsup', [8835, 8402]], ['Vopf', [120141]], ['vopf', [120167]], ['vprop', [8733]], ['vrtri', [8883]], ['Vscr', [119985]], ['vscr', [120011]], ['vsubnE', [10955, 65024]], ['vsubne', [8842, 65024]], ['vsupnE', [10956, 65024]], ['vsupne', [8843, 65024]], ['Vvdash', [8874]], ['vzigzag', [10650]], ['Wcirc', [372]], ['wcirc', [373]], ['wedbar', [10847]], ['wedge', [8743]], ['Wedge', [8896]], ['wedgeq', [8793]], ['weierp', [8472]], ['Wfr', [120090]], ['wfr', [120116]], ['Wopf', [120142]], ['wopf', [120168]], ['wp', [8472]], ['wr', [8768]], ['wreath', [8768]], ['Wscr', [119986]], ['wscr', [120012]], ['xcap', [8898]], ['xcirc', [9711]], ['xcup', [8899]], ['xdtri', [9661]], ['Xfr', [120091]], ['xfr', [120117]], ['xharr', [10231]], ['xhArr', [10234]], ['Xi', [926]], ['xi', [958]], ['xlarr', [10229]], ['xlArr', [10232]], ['xmap', [10236]], ['xnis', [8955]], ['xodot', [10752]], ['Xopf', [120143]], ['xopf', [120169]], ['xoplus', [10753]], ['xotime', [10754]], ['xrarr', [10230]], ['xrArr', [10233]], ['Xscr', [119987]], ['xscr', [120013]], ['xsqcup', [10758]], ['xuplus', [10756]], ['xutri', [9651]], ['xvee', [8897]], ['xwedge', [8896]], ['Yacute', [221]], ['yacute', [253]], ['YAcy', [1071]], ['yacy', [1103]], ['Ycirc', [374]], ['ycirc', [375]], ['Ycy', [1067]], ['ycy', [1099]], ['yen', [165]], ['Yfr', [120092]], ['yfr', [120118]], ['YIcy', [1031]], ['yicy', [1111]], ['Yopf', [120144]], ['yopf', [120170]], ['Yscr', [119988]], ['yscr', [120014]], ['YUcy', [1070]], ['yucy', [1102]], ['yuml', [255]], ['Yuml', [376]], ['Zacute', [377]], ['zacute', [378]], ['Zcaron', [381]], ['zcaron', [382]], ['Zcy', [1047]], ['zcy', [1079]], ['Zdot', [379]], ['zdot', [380]], ['zeetrf', [8488]], ['ZeroWidthSpace', [8203]], ['Zeta', [918]], ['zeta', [950]], ['zfr', [120119]], ['Zfr', [8488]], ['ZHcy', [1046]], ['zhcy', [1078]], ['zigrarr', [8669]], ['zopf', [120171]], ['Zopf', [8484]], ['Zscr', [119989]], ['zscr', [120015]], ['zwj', [8205]], ['zwnj', [8204]]];\n\nvar alphaIndex = {};\nvar charIndex = {};\n\ncreateIndexes(alphaIndex, charIndex);\n\n/**\n * @constructor\n */\nfunction Html5Entities() {}\n\n/**\n * @param {String} str\n * @returns {String}\n */\nHtml5Entities.prototype.decode = function(str) {\n if (!str || !str.length) {\n return '';\n }\n return str.replace(/&(#?[\\w\\d]+);?/g, function(s, entity) {\n var chr;\n if (entity.charAt(0) === \"#\") {\n var code = entity.charAt(1) === 'x' ?\n parseInt(entity.substr(2).toLowerCase(), 16) :\n parseInt(entity.substr(1));\n\n if (!(isNaN(code) || code < -32768 || code > 65535)) {\n chr = String.fromCharCode(code);\n }\n } else {\n chr = alphaIndex[entity];\n }\n return chr || s;\n });\n};\n\n/**\n * @param {String} str\n * @returns {String}\n */\n Html5Entities.decode = function(str) {\n return new Html5Entities().decode(str);\n };\n\n/**\n * @param {String} str\n * @returns {String}\n */\nHtml5Entities.prototype.encode = function(str) {\n if (!str || !str.length) {\n return '';\n }\n var strLength = str.length;\n var result = '';\n var i = 0;\n while (i < strLength) {\n var charInfo = charIndex[str.charCodeAt(i)];\n if (charInfo) {\n var alpha = charInfo[str.charCodeAt(i + 1)];\n if (alpha) {\n i++;\n } else {\n alpha = charInfo[''];\n }\n if (alpha) {\n result += \"&\" + alpha + \";\";\n i++;\n continue;\n }\n }\n result += str.charAt(i);\n i++;\n }\n return result;\n};\n\n/**\n * @param {String} str\n * @returns {String}\n */\n Html5Entities.encode = function(str) {\n return new Html5Entities().encode(str);\n };\n\n/**\n * @param {String} str\n * @returns {String}\n */\nHtml5Entities.prototype.encodeNonUTF = function(str) {\n if (!str || !str.length) {\n return '';\n }\n var strLength = str.length;\n var result = '';\n var i = 0;\n while (i < strLength) {\n var c = str.charCodeAt(i);\n var charInfo = charIndex[c];\n if (charInfo) {\n var alpha = charInfo[str.charCodeAt(i + 1)];\n if (alpha) {\n i++;\n } else {\n alpha = charInfo[''];\n }\n if (alpha) {\n result += \"&\" + alpha + \";\";\n i++;\n continue;\n }\n }\n if (c < 32 || c > 126) {\n result += '&#' + c + ';';\n } else {\n result += str.charAt(i);\n }\n i++;\n }\n return result;\n};\n\n/**\n * @param {String} str\n * @returns {String}\n */\n Html5Entities.encodeNonUTF = function(str) {\n return new Html5Entities().encodeNonUTF(str);\n };\n\n/**\n * @param {String} str\n * @returns {String}\n */\nHtml5Entities.prototype.encodeNonASCII = function(str) {\n if (!str || !str.length) {\n return '';\n }\n var strLength = str.length;\n var result = '';\n var i = 0;\n while (i < strLength) {\n var c = str.charCodeAt(i);\n if (c <= 255) {\n result += str[i++];\n continue;\n }\n result += '&#' + c + ';';\n i++\n }\n return result;\n};\n\n/**\n * @param {String} str\n * @returns {String}\n */\n Html5Entities.encodeNonASCII = function(str) {\n return new Html5Entities().encodeNonASCII(str);\n };\n\n/**\n * @param {Object} alphaIndex Passed by reference.\n * @param {Object} charIndex Passed by reference.\n */\nfunction createIndexes(alphaIndex, charIndex) {\n var i = ENTITIES.length;\n var _results = [];\n while (i--) {\n var e = ENTITIES[i];\n var alpha = e[0];\n var chars = e[1];\n var chr = chars[0];\n var addChar = (chr < 32 || chr > 126) || chr === 62 || chr === 60 || chr === 38 || chr === 34 || chr === 39;\n var charInfo;\n if (addChar) {\n charInfo = charIndex[chr] = charIndex[chr] || {};\n }\n if (chars[1]) {\n var chr2 = chars[1];\n alphaIndex[alpha] = String.fromCharCode(chr) + String.fromCharCode(chr2);\n _results.push(addChar && (charInfo[chr2] = alpha));\n } else {\n alphaIndex[alpha] = String.fromCharCode(chr);\n _results.push(addChar && (charInfo[''] = alpha));\n }\n }\n}\n\nmodule.exports = Html5Entities;\n","var ALPHA_INDEX = {\n '<': '<',\n '>': '>',\n '"': '\"',\n '&apos': '\\'',\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': '\\'',\n '&': '&'\n};\n\nvar CHAR_INDEX = {\n 60: 'lt',\n 62: 'gt',\n 34: 'quot',\n 39: 'apos',\n 38: 'amp'\n};\n\nvar CHAR_S_INDEX = {\n '<': '<',\n '>': '>',\n '\"': '"',\n '\\'': ''',\n '&': '&'\n};\n\n/**\n * @constructor\n */\nfunction XmlEntities() {}\n\n/**\n * @param {String} str\n * @returns {String}\n */\nXmlEntities.prototype.encode = function(str) {\n if (!str || !str.length) {\n return '';\n }\n return str.replace(/<|>|\"|'|&/g, function(s) {\n return CHAR_S_INDEX[s];\n });\n};\n\n/**\n * @param {String} str\n * @returns {String}\n */\n XmlEntities.encode = function(str) {\n return new XmlEntities().encode(str);\n };\n\n/**\n * @param {String} str\n * @returns {String}\n */\nXmlEntities.prototype.decode = function(str) {\n if (!str || !str.length) {\n return '';\n }\n return str.replace(/&#?[0-9a-zA-Z]+;?/g, function(s) {\n if (s.charAt(1) === '#') {\n var code = s.charAt(2).toLowerCase() === 'x' ?\n parseInt(s.substr(3), 16) :\n parseInt(s.substr(2));\n\n if (isNaN(code) || code < -32768 || code > 65535) {\n return '';\n }\n return String.fromCharCode(code);\n }\n return ALPHA_INDEX[s] || s;\n });\n};\n\n/**\n * @param {String} str\n * @returns {String}\n */\n XmlEntities.decode = function(str) {\n return new XmlEntities().decode(str);\n };\n\n/**\n * @param {String} str\n * @returns {String}\n */\nXmlEntities.prototype.encodeNonUTF = function(str) {\n if (!str || !str.length) {\n return '';\n }\n var strLength = str.length;\n var result = '';\n var i = 0;\n while (i < strLength) {\n var c = str.charCodeAt(i);\n var alpha = CHAR_INDEX[c];\n if (alpha) {\n result += \"&\" + alpha + \";\";\n i++;\n continue;\n }\n if (c < 32 || c > 126) {\n result += '&#' + c + ';';\n } else {\n result += str.charAt(i);\n }\n i++;\n }\n return result;\n};\n\n/**\n * @param {String} str\n * @returns {String}\n */\n XmlEntities.encodeNonUTF = function(str) {\n return new XmlEntities().encodeNonUTF(str);\n };\n\n/**\n * @param {String} str\n * @returns {String}\n */\nXmlEntities.prototype.encodeNonASCII = function(str) {\n if (!str || !str.length) {\n return '';\n }\n var strLenght = str.length;\n var result = '';\n var i = 0;\n while (i < strLenght) {\n var c = str.charCodeAt(i);\n if (c <= 255) {\n result += str[i++];\n continue;\n }\n result += '&#' + c + ';';\n i++;\n }\n return result;\n};\n\n/**\n * @param {String} str\n * @returns {String}\n */\n XmlEntities.encodeNonASCII = function(str) {\n return new XmlEntities().encodeNonASCII(str);\n };\n\nmodule.exports = XmlEntities;\n","var Midi = {};\n\n(function(exported) {\n\n\tvar DEFAULT_VOLUME = exported.DEFAULT_VOLUME = 90;\n\tvar DEFAULT_DURATION = exported.DEFAULT_DURATION = 128;\n\tvar DEFAULT_CHANNEL = exported.DEFAULT_CHANNEL = 0;\n\n\t/* ******************************************************************\n\t * Utility functions\n\t ****************************************************************** */\n\n\tvar Util = {\n\n\t\tmidi_letter_pitches: { a:21, b:23, c:12, d:14, e:16, f:17, g:19 },\n\n\t\t/**\n\t\t * Convert a symbolic note name (e.g. \"c4\") to a numeric MIDI pitch (e.g.\n\t\t * 60, middle C).\n\t\t *\n\t\t * @param {string} n - The symbolic note name to parse.\n\t\t * @returns {number} The MIDI pitch that corresponds to the symbolic note\n\t\t * name.\n\t\t */\n\t\tmidiPitchFromNote: function(n) {\n\t\t\tvar matches = /([a-g])(#+|b+)?([0-9]+)$/i.exec(n);\n\t\t\tvar note = matches[1].toLowerCase(), accidental = matches[2] || '', octave = parseInt(matches[3], 10);\n\t\t\treturn (12 * octave) + Util.midi_letter_pitches[note] + (accidental.substr(0,1)=='#'?1:-1) * accidental.length;\n\t\t},\n\n\t\t/**\n\t\t * Ensure that the given argument is converted to a MIDI pitch. Note that\n\t\t * it may already be one (including a purely numeric string).\n\t\t *\n\t\t * @param {string|number} p - The pitch to convert.\n\t\t * @returns {number} The resulting numeric MIDI pitch.\n\t\t */\n\t\tensureMidiPitch: function(p) {\n\t\t\tif (typeof p == 'number' || !/[^0-9]/.test(p)) {\n\t\t\t\t// numeric pitch\n\t\t\t\treturn parseInt(p, 10);\n\t\t\t} else {\n\t\t\t\t// assume it's a note name\n\t\t\t\treturn Util.midiPitchFromNote(p);\n\t\t\t}\n\t\t},\n\n\t\tmidi_pitches_letter: { '12':'c', '13':'c#', '14':'d', '15':'d#', '16':'e', '17':'f', '18':'f#', '19':'g', '20':'g#', '21':'a', '22':'a#', '23':'b' },\n\t\tmidi_flattened_notes: { 'a#':'bb', 'c#':'db', 'd#':'eb', 'f#':'gb', 'g#':'ab' },\n\n\t\t/**\n\t\t * Convert a numeric MIDI pitch value (e.g. 60) to a symbolic note name\n\t\t * (e.g. \"c4\").\n\t\t *\n\t\t * @param {number} n - The numeric MIDI pitch value to convert.\n\t\t * @param {boolean} [returnFlattened=false] - Whether to prefer flattened\n\t\t * notes to sharpened ones. Optional, default false.\n\t\t * @returns {string} The resulting symbolic note name.\n\t\t */\n\t\tnoteFromMidiPitch: function(n, returnFlattened) {\n\t\t\tvar octave = 0, noteNum = n, noteName, returnFlattened = returnFlattened || false;\n\t\t\tif (n > 23) {\n\t\t\t\t// noteNum is on octave 1 or more\n\t\t\t\toctave = Math.floor(n/12) - 1;\n\t\t\t\t// subtract number of octaves from noteNum\n\t\t\t\tnoteNum = n - octave * 12;\n\t\t\t}\n\n\t\t\t// get note name (c#, d, f# etc)\n\t\t\tnoteName = Util.midi_pitches_letter[noteNum];\n\t\t\t// Use flattened notes if requested (e.g. f# should be output as gb)\n\t\t\tif (returnFlattened && noteName.indexOf('#') > 0) {\n\t\t\t\tnoteName = Util.midi_flattened_notes[noteName];\n\t\t\t}\n\t\t\treturn noteName + octave;\n\t\t},\n\n\t\t/**\n\t\t * Convert beats per minute (BPM) to microseconds per quarter note (MPQN).\n\t\t *\n\t\t * @param {number} bpm - A number in beats per minute.\n\t\t * @returns {number} The number of microseconds per quarter note.\n\t\t */\n\t\tmpqnFromBpm: function(bpm) {\n\t\t\tvar mpqn = Math.floor(60000000 / bpm);\n\t\t\tvar ret=[];\n\t\t\tdo {\n\t\t\t\tret.unshift(mpqn & 0xFF);\n\t\t\t\tmpqn >>= 8;\n\t\t\t} while (mpqn);\n\t\t\twhile (ret.length < 3) {\n\t\t\t\tret.push(0);\n\t\t\t}\n\t\t\treturn ret;\n\t\t},\n\n\t\t/**\n\t\t * Convert microseconds per quarter note (MPQN) to beats per minute (BPM).\n\t\t *\n\t\t * @param {number} mpqn - The number of microseconds per quarter note.\n\t\t * @returns {number} A number in beats per minute.\n\t\t */\n\t\tbpmFromMpqn: function(mpqn) {\n\t\t\tvar m = mpqn;\n\t\t\tif (typeof mpqn[0] != 'undefined') {\n\t\t\t\tm = 0;\n\t\t\t\tfor (var i=0, l=mpqn.length-1; l >= 0; ++i, --l) {\n\t\t\t\t\tm |= mpqn[i] << l;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn Math.floor(60000000 / mpqn);\n\t\t},\n\n\t\t/**\n\t\t * Converts an array of bytes to a string of hexadecimal characters. Prepares\n\t\t * it to be converted into a base64 string.\n\t\t *\n\t\t * @param {Array} byteArray - Array of bytes to be converted.\n\t\t * @returns {string} Hexadecimal string, e.g. \"097B8A\".\n\t\t */\n\t\tcodes2Str: function(byteArray) {\n\t\t\treturn String.fromCharCode.apply(null, byteArray);\n\t\t},\n\n\t\t/**\n\t\t * Converts a string of hexadecimal values to an array of bytes. It can also\n\t\t * add remaining \"0\" nibbles in order to have enough bytes in the array as the\n\t\t * `finalBytes` parameter.\n\t\t *\n\t\t * @param {string} str - string of hexadecimal values e.g. \"097B8A\"\n\t\t * @param {number} [finalBytes] - Optional. The desired number of bytes\n\t\t * (not nibbles) that the returned array should contain.\n\t\t * @returns {Array} An array of nibbles.\n\t\t */\n\t\tstr2Bytes: function (str, finalBytes) {\n\t\t\tif (finalBytes) {\n\t\t\t\twhile ((str.length / 2) < finalBytes) { str = \"0\" + str; }\n\t\t\t}\n\n\t\t\tvar bytes = [];\n\t\t\tfor (var i=str.length-1; i>=0; i = i-2) {\n\t\t\t\tvar chars = i === 0 ? str[i] : str[i-1] + str[i];\n\t\t\t\tbytes.unshift(parseInt(chars, 16));\n\t\t\t}\n\n\t\t\treturn bytes;\n\t\t},\n\n\t\t/**\n\t\t * Translates number of ticks to MIDI timestamp format, returning an array\n\t\t * of bytes with the time values. MIDI has a very particular way to express\n\t\t * time; take a good look at the spec before ever touching this function.\n\t\t *\n\t\t * @param {number} ticks - Number of ticks to be translated.\n\t\t * @returns {number} Array of bytes that form the MIDI time value.\n\t\t */\n\t\ttranslateTickTime: function(ticks) {\n\t\t\tvar buffer = ticks & 0x7F;\n\n\t\t\twhile (ticks = ticks >> 7) {\n\t\t\t\tbuffer <<= 8;\n\t\t\t\tbuffer |= ((ticks & 0x7F) | 0x80);\n\t\t\t}\n\n\t\t\tvar bList = [];\n\t\t\twhile (true) {\n\t\t\t\tbList.push(buffer & 0xff);\n\n\t\t\t\tif (buffer & 0x80) { buffer >>= 8; }\n\t\t\t\telse { break; }\n\t\t\t}\n\t\t\treturn bList;\n\t\t},\n\n\t};\n\n\t/* ******************************************************************\n\t * Event class\n\t ****************************************************************** */\n\n\t/**\n\t * Construct a MIDI event.\n\t *\n\t * Parameters include:\n\t * - time [optional number] - Ticks since previous event.\n\t * - type [required number] - Type of event.\n\t * - channel [required number] - Channel for the event.\n\t * - param1 [required number] - First event parameter.\n\t * - param2 [optional number] - Second event parameter.\n\t */\n\tvar MidiEvent = function(params) {\n\t\tif (!this) return new MidiEvent(params);\n\t\tif (params &&\n\t\t\t\t(params.type !== null || params.type !== undefined) &&\n\t\t\t\t(params.channel !== null || params.channel !== undefined) &&\n\t\t\t\t(params.param1 !== null || params.param1 !== undefined)) {\n\t\t\tthis.setTime(params.time);\n\t\t\tthis.setType(params.type);\n\t\t\tthis.setChannel(params.channel);\n\t\t\tthis.setParam1(params.param1);\n\t\t\tthis.setParam2(params.param2);\n\t\t}\n\t};\n\n\t// event codes\n\tMidiEvent.NOTE_OFF = 0x80;\n\tMidiEvent.NOTE_ON = 0x90;\n\tMidiEvent.AFTER_TOUCH = 0xA0;\n\tMidiEvent.CONTROLLER = 0xB0;\n\tMidiEvent.PROGRAM_CHANGE = 0xC0;\n\tMidiEvent.CHANNEL_AFTERTOUCH = 0xD0;\n\tMidiEvent.PITCH_BEND = 0xE0;\n\n\n\t/**\n\t * Set the time for the event in ticks since the previous event.\n\t *\n\t * @param {number} ticks - The number of ticks since the previous event. May\n\t * be zero.\n\t */\n\tMidiEvent.prototype.setTime = function(ticks) {\n\t\tthis.time = Util.translateTickTime(ticks || 0);\n\t};\n\n\t/**\n\t * Set the type of the event. Must be one of the event codes on MidiEvent.\n\t *\n\t * @param {number} type - Event type.\n\t */\n\tMidiEvent.prototype.setType = function(type) {\n\t\tif (type < MidiEvent.NOTE_OFF || type > MidiEvent.PITCH_BEND) {\n\t\t\tthrow new Error(\"Trying to set an unknown event: \" + type);\n\t\t}\n\n\t\tthis.type = type;\n\t};\n\n\t/**\n\t * Set the channel for the event. Must be between 0 and 15, inclusive.\n\t *\n\t * @param {number} channel - The event channel.\n\t */\n\tMidiEvent.prototype.setChannel = function(channel) {\n\t\tif (channel < 0 || channel > 15) {\n\t\t\tthrow new Error(\"Channel is out of bounds.\");\n\t\t}\n\n\t\tthis.channel = channel;\n\t};\n\n\t/**\n\t * Set the first parameter for the event. Must be between 0 and 255,\n\t * inclusive.\n\t *\n\t * @param {number} p - The first event parameter value.\n\t */\n\tMidiEvent.prototype.setParam1 = function(p) {\n\t\tthis.param1 = p;\n\t};\n\n\t/**\n\t * Set the second parameter for the event. Must be between 0 and 255,\n\t * inclusive.\n\t *\n\t * @param {number} p - The second event parameter value.\n\t */\n\tMidiEvent.prototype.setParam2 = function(p) {\n\t\tthis.param2 = p;\n\t};\n\n\t/**\n\t * Serialize the event to an array of bytes.\n\t *\n\t * @returns {Array} The array of serialized bytes.\n\t */\n\tMidiEvent.prototype.toBytes = function() {\n\t\tvar byteArray = [];\n\n\t\tvar typeChannelByte = this.type | (this.channel & 0xF);\n\n\t\tbyteArray.push.apply(byteArray, this.time);\n\t\tbyteArray.push(typeChannelByte);\n\t\tbyteArray.push(this.param1);\n\n\t\t// Some events don't have a second parameter\n\t\tif (this.param2 !== undefined && this.param2 !== null) {\n\t\t\tbyteArray.push(this.param2);\n\t\t}\n\t\treturn byteArray;\n\t};\n\n\t/* ******************************************************************\n\t * MetaEvent class\n\t ****************************************************************** */\n\n\t/**\n\t * Construct a meta event.\n\t *\n\t * Parameters include:\n\t * - time [optional number] - Ticks since previous event.\n\t * - type [required number] - Type of event.\n\t * - data [optional array|string] - Event data.\n\t */\n\tvar MetaEvent = function(params) {\n\t\tif (!this) return new MetaEvent(params);\n\t\tvar p = params || {};\n\t\tthis.setTime(params.time);\n\t\tthis.setType(params.type);\n\t\tthis.setData(params.data);\n\t};\n\n\tMetaEvent.SEQUENCE = 0x00;\n\tMetaEvent.TEXT = 0x01;\n\tMetaEvent.COPYRIGHT = 0x02;\n\tMetaEvent.TRACK_NAME = 0x03;\n\tMetaEvent.INSTRUMENT = 0x04;\n\tMetaEvent.LYRIC = 0x05;\n\tMetaEvent.MARKER = 0x06;\n\tMetaEvent.CUE_POINT = 0x07;\n\tMetaEvent.CHANNEL_PREFIX = 0x20;\n\tMetaEvent.END_OF_TRACK = 0x2f;\n\tMetaEvent.TEMPO = 0x51;\n\tMetaEvent.SMPTE = 0x54;\n\tMetaEvent.TIME_SIG = 0x58;\n\tMetaEvent.KEY_SIG = 0x59;\n\tMetaEvent.SEQ_EVENT = 0x7f;\n\n\t/**\n\t * Set the time for the event in ticks since the previous event.\n\t *\n\t * @param {number} ticks - The number of ticks since the previous event. May\n\t * be zero.\n\t */\n\tMetaEvent.prototype.setTime = function(ticks) {\n\t\tthis.time = Util.translateTickTime(ticks || 0);\n\t};\n\n\t/**\n\t * Set the type of the event. Must be one of the event codes on MetaEvent.\n\t *\n\t * @param {number} t - Event type.\n\t */\n\tMetaEvent.prototype.setType = function(t) {\n\t\tthis.type = t;\n\t};\n\n\t/**\n\t * Set the data associated with the event. May be a string or array of byte\n\t * values.\n\t *\n\t * @param {string|Array} d - Event data.\n\t */\n\tMetaEvent.prototype.setData = function(d) {\n\t\tthis.data = d;\n\t};\n\n\t/**\n\t * Serialize the event to an array of bytes.\n\t *\n\t * @returns {Array} The array of serialized bytes.\n\t */\n\tMetaEvent.prototype.toBytes = function() {\n\t\tif (!this.type) {\n\t\t\tthrow new Error(\"Type for meta-event not specified.\");\n\t\t}\n\n\t\tvar byteArray = [];\n\t\tbyteArray.push.apply(byteArray, this.time);\n\t\tbyteArray.push(0xFF, this.type);\n\n\t\t// If data is an array, we assume that it contains several bytes. We\n\t\t// apend them to byteArray.\n\t\tif (Array.isArray(this.data)) {\n\t\t\tbyteArray.push(this.data.length);\n\t\t\tbyteArray.push.apply(byteArray, this.data);\n\t\t} else if (typeof this.data == 'number') {\n\t\t\tbyteArray.push(1, this.data);\n\t\t} else if (this.data !== null && this.data !== undefined) {\n\t\t\t// assume string; may be a bad assumption\n\t\t\tbyteArray.push(this.data.length);\n\t\t\tvar dataBytes = this.data.split('').map(function(x){ return x.charCodeAt(0) });\n\t\t\tbyteArray.push.apply(byteArray, dataBytes);\n\t\t} else {\n\t\t\tbyteArray.push(0);\n\t\t}\n\n\t\treturn byteArray;\n\t};\n\n\t/* ******************************************************************\n\t * Track class\n\t ****************************************************************** */\n\n\t/**\n\t * Construct a MIDI track.\n\t *\n\t * Parameters include:\n\t * - events [optional array] - Array of events for the track.\n\t */\n\tvar Track = function(config) {\n\t\tif (!this) return new Track(config);\n\t\tvar c = config || {};\n\t\tthis.events = c.events || [];\n\t};\n\n\tTrack.START_BYTES = [0x4d, 0x54, 0x72, 0x6b];\n\tTrack.END_BYTES = [0x00, 0xFF, 0x2F, 0x00];\n\n\t/**\n\t * Add an event to the track.\n\t *\n\t * @param {MidiEvent|MetaEvent} event - The event to add.\n\t * @returns {Track} The current track.\n\t */\n\tTrack.prototype.addEvent = function(event) {\n\t\tthis.events.push(event);\n\t\treturn this;\n\t};\n\n\t/**\n\t * Add a note-on event to the track.\n\t *\n\t * @param {number} channel - The channel to add the event to.\n\t * @param {number|string} pitch - The pitch of the note, either numeric or\n\t * symbolic.\n\t * @param {number} [time=0] - The number of ticks since the previous event,\n\t * defaults to 0.\n\t * @param {number} [velocity=90] - The volume for the note, defaults to\n\t * DEFAULT_VOLUME.\n\t * @returns {Track} The current track.\n\t */\n\tTrack.prototype.addNoteOn = Track.prototype.noteOn = function(channel, pitch, time, velocity) {\n\t\tthis.events.push(new MidiEvent({\n\t\t\ttype: MidiEvent.NOTE_ON,\n\t\t\tchannel: channel,\n\t\t\tparam1: Util.ensureMidiPitch(pitch),\n\t\t\tparam2: velocity || DEFAULT_VOLUME,\n\t\t\ttime: time || 0,\n\t\t}));\n\t\treturn this;\n\t};\n\n\t/**\n\t * Add a note-off event to the track.\n\t *\n\t * @param {number} channel - The channel to add the event to.\n\t * @param {number|string} pitch - The pitch of the note, either numeric or\n\t * symbolic.\n\t * @param {number} [time=0] - The number of ticks since the previous event,\n\t * defaults to 0.\n\t * @param {number} [velocity=90] - The velocity the note was released,\n\t * defaults to DEFAULT_VOLUME.\n\t * @returns {Track} The current track.\n\t */\n\tTrack.prototype.addNoteOff = Track.prototype.noteOff = function(channel, pitch, time, velocity) {\n\t\tthis.events.push(new MidiEvent({\n\t\t\ttype: MidiEvent.NOTE_OFF,\n\t\t\tchannel: channel,\n\t\t\tparam1: Util.ensureMidiPitch(pitch),\n\t\t\tparam2: velocity || DEFAULT_VOLUME,\n\t\t\ttime: time || 0,\n\t\t}));\n\t\treturn this;\n\t};\n\n\t/**\n\t * Add a note-on and -off event to the track.\n\t *\n\t * @param {number} channel - The channel to add the event to.\n\t * @param {number|string} pitch - The pitch of the note, either numeric or\n\t * symbolic.\n\t * @param {number} dur - The duration of the note, in ticks.\n\t * @param {number} [time=0] - The number of ticks since the previous event,\n\t * defaults to 0.\n\t * @param {number} [velocity=90] - The velocity the note was released,\n\t * defaults to DEFAULT_VOLUME.\n\t * @returns {Track} The current track.\n\t */\n\tTrack.prototype.addNote = Track.prototype.note = function(channel, pitch, dur, time, velocity) {\n\t\tthis.noteOn(channel, pitch, time, velocity);\n\t\tif (dur) {\n\t\t\tthis.noteOff(channel, pitch, dur, velocity);\n\t\t}\n\t\treturn this;\n\t};\n\n\t/**\n\t * Add a note-on and -off event to the track for each pitch in an array of pitches.\n\t *\n\t * @param {number} channel - The channel to add the event to.\n\t * @param {array} chord - An array of pitches, either numeric or\n\t * symbolic.\n\t * @param {number} dur - The duration of the chord, in ticks.\n\t * @param {number} [velocity=90] - The velocity of the chord,\n\t * defaults to DEFAULT_VOLUME.\n\t * @returns {Track} The current track.\n\t */\n\tTrack.prototype.addChord = Track.prototype.chord = function(channel, chord, dur, velocity) {\n\t\tif (!Array.isArray(chord) && !chord.length) {\n\t\t\tthrow new Error('Chord must be an array of pitches');\n\t\t}\n\t\tchord.forEach(function(note) {\n\t\t\tthis.noteOn(channel, note, 0, velocity);\n\t\t}, this);\n\t\tchord.forEach(function(note, index) {\n\t\t\tif (index === 0) {\n\t\t\t\tthis.noteOff(channel, note, dur);\n\t\t\t} else {\n\t\t\t\tthis.noteOff(channel, note);\n\t\t\t}\n\t\t}, this);\n\t\treturn this;\n\t};\n\n\t/**\n\t * Set instrument for the track.\n\t *\n\t * @param {number} channel - The channel to set the instrument on.\n\t * @param {number} instrument - The instrument to set it to.\n\t * @param {number} [time=0] - The number of ticks since the previous event,\n\t * defaults to 0.\n\t * @returns {Track} The current track.\n\t */\n\tTrack.prototype.setInstrument = Track.prototype.instrument = function(channel, instrument, time) {\n\t\tthis.events.push(new MidiEvent({\n\t\t\ttype: MidiEvent.PROGRAM_CHANGE,\n\t\t\tchannel: channel,\n\t\t\tparam1: instrument,\n\t\t\ttime: time || 0,\n\t\t}));\n\t\treturn this;\n\t};\n\n\t/**\n\t * Set the tempo for the track.\n\t *\n\t * @param {number} bpm - The new number of beats per minute.\n\t * @param {number} [time=0] - The number of ticks since the previous event,\n\t * defaults to 0.\n\t * @returns {Track} The current track.\n\t */\n\tTrack.prototype.setTempo = Track.prototype.tempo = function(bpm, time) {\n\t\tthis.events.push(new MetaEvent({\n\t\t\ttype: MetaEvent.TEMPO,\n\t\t\tdata: Util.mpqnFromBpm(bpm),\n\t\t\ttime: time || 0,\n\t\t}));\n\t\treturn this;\n\t};\n\n\t/**\n\t * Serialize the track to an array of bytes.\n\t *\n\t * @returns {Array} The array of serialized bytes.\n\t */\n\tTrack.prototype.toBytes = function() {\n\t\tvar trackLength = 0;\n\t\tvar eventBytes = [];\n\t\tvar startBytes = Track.START_BYTES;\n\t\tvar endBytes = Track.END_BYTES;\n\n\t\tvar addEventBytes = function(event) {\n\t\t\tvar bytes = event.toBytes();\n\t\t\ttrackLength += bytes.length;\n\t\t\teventBytes.push.apply(eventBytes, bytes);\n\t\t};\n\n\t\tthis.events.forEach(addEventBytes);\n\n\t\t// Add the end-of-track bytes to the sum of bytes for the track, since\n\t\t// they are counted (unlike the start-of-track ones).\n\t\ttrackLength += endBytes.length;\n\n\t\t// Makes sure that track length will fill up 4 bytes with 0s in case\n\t\t// the length is less than that (the usual case).\n\t\tvar lengthBytes = Util.str2Bytes(trackLength.toString(16), 4);\n\n\t\treturn startBytes.concat(lengthBytes, eventBytes, endBytes);\n\t};\n\n\t/* ******************************************************************\n\t * File class\n\t ****************************************************************** */\n\n\t/**\n\t * Construct a file object.\n\t *\n\t * Parameters include:\n\t * - ticks [optional number] - Number of ticks per beat, defaults to 128.\n\t * Must be 1-32767.\n\t * - tracks [optional array] - Track data.\n\t */\n\tvar File = function(config){\n\t\tif (!this) return new File(config);\n\n\t\tvar c = config || {};\n\t\tif (c.ticks) {\n\t\t\tif (typeof c.ticks !== 'number') {\n\t\t\t\tthrow new Error('Ticks per beat must be a number!');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (c.ticks <= 0 || c.ticks >= (1 << 15) || c.ticks % 1 !== 0) {\n\t\t\t\tthrow new Error('Ticks per beat must be an integer between 1 and 32767!');\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tthis.ticks = c.ticks || 128;\n\t\tthis.tracks = c.tracks || [];\n\t};\n\n\tFile.HDR_CHUNKID = \"MThd\"; // File magic cookie\n\tFile.HDR_CHUNK_SIZE = \"\\x00\\x00\\x00\\x06\"; // Header length for SMF\n\tFile.HDR_TYPE0 = \"\\x00\\x00\"; // Midi Type 0 id\n\tFile.HDR_TYPE1 = \"\\x00\\x01\"; // Midi Type 1 id\n\n\t/**\n\t * Add a track to the file.\n\t *\n\t * @param {Track} track - The track to add.\n\t */\n\tFile.prototype.addTrack = function(track) {\n\t\tif (track) {\n\t\t\tthis.tracks.push(track);\n\t\t\treturn this;\n\t\t} else {\n\t\t\ttrack = new Track();\n\t\t\tthis.tracks.push(track);\n\t\t\treturn track;\n\t\t}\n\t};\n\n\t/**\n\t * Serialize the MIDI file to an array of bytes.\n\t *\n\t * @returns {Array} The array of serialized bytes.\n\t */\n\tFile.prototype.toBytes = function() {\n\t\tvar trackCount = this.tracks.length.toString(16);\n\n\t\t// prepare the file header\n\t\tvar bytes = File.HDR_CHUNKID + File.HDR_CHUNK_SIZE;\n\n\t\t// set Midi type based on number of tracks\n\t\tif (parseInt(trackCount, 16) > 1) {\n\t\t\tbytes += File.HDR_TYPE1;\n\t\t} else {\n\t\t\tbytes += File.HDR_TYPE0;\n\t\t}\n\n\t\t// add the number of tracks (2 bytes)\n\t\tbytes += Util.codes2Str(Util.str2Bytes(trackCount, 2));\n\t\t// add the number of ticks per beat (currently hardcoded)\n\t\tbytes += String.fromCharCode((this.ticks/256), this.ticks%256);;\n\n\t\t// iterate over the tracks, converting to bytes too\n\t\tthis.tracks.forEach(function(track) {\n\t\t\tbytes += Util.codes2Str(track.toBytes());\n\t\t});\n\n\t\treturn bytes;\n\t};\n\n\t/* ******************************************************************\n\t * Exports\n\t ****************************************************************** */\n\n\texported.Util = Util;\n\texported.File = File;\n\texported.Track = Track;\n\texported.Event = MidiEvent;\n\texported.MetaEvent = MetaEvent;\n\n})( Midi );\n\nif (typeof module != 'undefined' && module !== null) {\n\tmodule.exports = Midi;\n} else if (typeof exports != 'undefined' && exports !== null) {\n\texports = Midi;\n} else {\n\tthis.Midi = Midi;\n}\n","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n var storageKey = \"loglevel\";\n if (name) {\n storageKey += \":\" + name;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if (typeof name !== \"string\" || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n return defaultLogger;\n}));\n","// https://github.com/gasman/jasmid\n//\n//\n\nmodule.exports = function(file){\n\treturn MidiFile(file)\n};\n\nfunction MidiFile(data) {\n\tfunction readChunk(stream) {\n\t\tvar id = stream.read(4);\n\t\tvar length = stream.readInt32();\n\t\treturn {\n\t\t\t'id': id,\n\t\t\t'length': length,\n\t\t\t'data': stream.read(length)\n\t\t};\n\t}\n\t\n\tvar lastEventTypeByte;\n\t\n\tfunction readEvent(stream) {\n\t\tvar event = {};\n\t\tevent.deltaTime = stream.readVarInt();\n\t\tvar eventTypeByte = stream.readInt8();\n\t\tif ((eventTypeByte & 0xf0) == 0xf0) {\n\t\t\t/* system / meta event */\n\t\t\tif (eventTypeByte == 0xff) {\n\t\t\t\t/* meta event */\n\t\t\t\tevent.type = 'meta';\n\t\t\t\tvar subtypeByte = stream.readInt8();\n\t\t\t\tvar length = stream.readVarInt();\n\t\t\t\tswitch(subtypeByte) {\n\t\t\t\t\tcase 0x00:\n\t\t\t\t\t\tevent.subtype = 'sequenceNumber';\n\t\t\t\t\t\tif (length != 2) throw \"Expected length for sequenceNumber event is 2, got \" + length;\n\t\t\t\t\t\tevent.number = stream.readInt16();\n\t\t\t\t\t\treturn event;\n\t\t\t\t\tcase 0x01:\n\t\t\t\t\t\tevent.subtype = 'text';\n\t\t\t\t\t\tevent.text = stream.read(length);\n\t\t\t\t\t\treturn event;\n\t\t\t\t\tcase 0x02:\n\t\t\t\t\t\tevent.subtype = 'copyrightNotice';\n\t\t\t\t\t\tevent.text = stream.read(length);\n\t\t\t\t\t\treturn event;\n\t\t\t\t\tcase 0x03:\n\t\t\t\t\t\tevent.subtype = 'trackName';\n\t\t\t\t\t\tevent.text = stream.read(length);\n\t\t\t\t\t\treturn event;\n\t\t\t\t\tcase 0x04:\n\t\t\t\t\t\tevent.subtype = 'instrumentName';\n\t\t\t\t\t\tevent.text = stream.read(length);\n\t\t\t\t\t\treturn event;\n\t\t\t\t\tcase 0x05:\n\t\t\t\t\t\tevent.subtype = 'lyrics';\n\t\t\t\t\t\tevent.text = stream.read(length);\n\t\t\t\t\t\treturn event;\n\t\t\t\t\tcase 0x06:\n\t\t\t\t\t\tevent.subtype = 'marker';\n\t\t\t\t\t\tevent.text = stream.read(length);\n\t\t\t\t\t\treturn event;\n\t\t\t\t\tcase 0x07:\n\t\t\t\t\t\tevent.subtype = 'cuePoint';\n\t\t\t\t\t\tevent.text = stream.read(length);\n\t\t\t\t\t\treturn event;\n\t\t\t\t\tcase 0x20:\n\t\t\t\t\t\tevent.subtype = 'midiChannelPrefix';\n\t\t\t\t\t\tif (length != 1) throw \"Expected length for midiChannelPrefix event is 1, got \" + length;\n\t\t\t\t\t\tevent.channel = stream.readInt8();\n\t\t\t\t\t\treturn event;\n\t\t\t\t\tcase 0x2f:\n\t\t\t\t\t\tevent.subtype = 'endOfTrack';\n\t\t\t\t\t\tif (length != 0) throw \"Expected length for endOfTrack event is 0, got \" + length;\n\t\t\t\t\t\treturn event;\n\t\t\t\t\tcase 0x51:\n\t\t\t\t\t\tevent.subtype = 'setTempo';\n\t\t\t\t\t\tif (length != 3) throw \"Expected length for setTempo event is 3, got \" + length;\n\t\t\t\t\t\tevent.microsecondsPerBeat = (\n\t\t\t\t\t\t\t(stream.readInt8() << 16)\n\t\t\t\t\t\t\t+ (stream.readInt8() << 8)\n\t\t\t\t\t\t\t+ stream.readInt8()\n\t\t\t\t\t\t)\n\t\t\t\t\t\treturn event;\n\t\t\t\t\tcase 0x54:\n\t\t\t\t\t\tevent.subtype = 'smpteOffset';\n\t\t\t\t\t\tif (length != 5) throw \"Expected length for smpteOffset event is 5, got \" + length;\n\t\t\t\t\t\tvar hourByte = stream.readInt8();\n\t\t\t\t\t\tevent.frameRate = {\n\t\t\t\t\t\t\t0x00: 24, 0x20: 25, 0x40: 29, 0x60: 30\n\t\t\t\t\t\t}[hourByte & 0x60];\n\t\t\t\t\t\tevent.hour = hourByte & 0x1f;\n\t\t\t\t\t\tevent.min = stream.readInt8();\n\t\t\t\t\t\tevent.sec = stream.readInt8();\n\t\t\t\t\t\tevent.frame = stream.readInt8();\n\t\t\t\t\t\tevent.subframe = stream.readInt8();\n\t\t\t\t\t\treturn event;\n\t\t\t\t\tcase 0x58:\n\t\t\t\t\t\tevent.subtype = 'timeSignature';\n\t\t\t\t\t\tif (length != 4) throw \"Expected length for timeSignature event is 4, got \" + length;\n\t\t\t\t\t\tevent.numerator = stream.readInt8();\n\t\t\t\t\t\tevent.denominator = Math.pow(2, stream.readInt8());\n\t\t\t\t\t\tevent.metronome = stream.readInt8();\n\t\t\t\t\t\tevent.thirtyseconds = stream.readInt8();\n\t\t\t\t\t\treturn event;\n\t\t\t\t\tcase 0x59:\n\t\t\t\t\t\tevent.subtype = 'keySignature';\n\t\t\t\t\t\tif (length != 2) throw \"Expected length for keySignature event is 2, got \" + length;\n\t\t\t\t\t\tevent.key = stream.readInt8(true);\n\t\t\t\t\t\tevent.scale = stream.readInt8();\n\t\t\t\t\t\treturn event;\n\t\t\t\t\tcase 0x7f:\n\t\t\t\t\t\tevent.subtype = 'sequencerSpecific';\n\t\t\t\t\t\tevent.data = stream.read(length);\n\t\t\t\t\t\treturn event;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// console.log(\"Unrecognised meta event subtype: \" + subtypeByte);\n\t\t\t\t\t\tevent.subtype = 'unknown'\n\t\t\t\t\t\tevent.data = stream.read(length);\n\t\t\t\t\t\treturn event;\n\t\t\t\t}\n\t\t\t\tevent.data = stream.read(length);\n\t\t\t\treturn event;\n\t\t\t} else if (eventTypeByte == 0xf0) {\n\t\t\t\tevent.type = 'sysEx';\n\t\t\t\tvar length = stream.readVarInt();\n\t\t\t\tevent.data = stream.read(length);\n\t\t\t\treturn event;\n\t\t\t} else if (eventTypeByte == 0xf7) {\n\t\t\t\tevent.type = 'dividedSysEx';\n\t\t\t\tvar length = stream.readVarInt();\n\t\t\t\tevent.data = stream.read(length);\n\t\t\t\treturn event;\n\t\t\t} else {\n\t\t\t\tthrow \"Unrecognised MIDI event type byte: \" + eventTypeByte;\n\t\t\t}\n\t\t} else {\n\t\t\t/* channel event */\n\t\t\tvar param1;\n\t\t\tif ((eventTypeByte & 0x80) == 0) {\n\t\t\t\t/* running status - reuse lastEventTypeByte as the event type.\n\t\t\t\t\teventTypeByte is actually the first parameter\n\t\t\t\t*/\n\t\t\t\tparam1 = eventTypeByte;\n\t\t\t\teventTypeByte = lastEventTypeByte;\n\t\t\t} else {\n\t\t\t\tparam1 = stream.readInt8();\n\t\t\t\tlastEventTypeByte = eventTypeByte;\n\t\t\t}\n\t\t\tvar eventType = eventTypeByte >> 4;\n\t\t\tevent.channel = eventTypeByte & 0x0f;\n\t\t\tevent.type = 'channel';\n\t\t\tswitch (eventType) {\n\t\t\t\tcase 0x08:\n\t\t\t\t\tevent.subtype = 'noteOff';\n\t\t\t\t\tevent.noteNumber = param1;\n\t\t\t\t\tevent.velocity = stream.readInt8();\n\t\t\t\t\treturn event;\n\t\t\t\tcase 0x09:\n\t\t\t\t\tevent.noteNumber = param1;\n\t\t\t\t\tevent.velocity = stream.readInt8();\n\t\t\t\t\tif (event.velocity == 0) {\n\t\t\t\t\t\tevent.subtype = 'noteOff';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tevent.subtype = 'noteOn';\n\t\t\t\t\t}\n\t\t\t\t\treturn event;\n\t\t\t\tcase 0x0a:\n\t\t\t\t\tevent.subtype = 'noteAftertouch';\n\t\t\t\t\tevent.noteNumber = param1;\n\t\t\t\t\tevent.amount = stream.readInt8();\n\t\t\t\t\treturn event;\n\t\t\t\tcase 0x0b:\n\t\t\t\t\tevent.subtype = 'controller';\n\t\t\t\t\tevent.controllerType = param1;\n\t\t\t\t\tevent.value = stream.readInt8();\n\t\t\t\t\treturn event;\n\t\t\t\tcase 0x0c:\n\t\t\t\t\tevent.subtype = 'programChange';\n\t\t\t\t\tevent.programNumber = param1;\n\t\t\t\t\treturn event;\n\t\t\t\tcase 0x0d:\n\t\t\t\t\tevent.subtype = 'channelAftertouch';\n\t\t\t\t\tevent.amount = param1;\n\t\t\t\t\treturn event;\n\t\t\t\tcase 0x0e:\n\t\t\t\t\tevent.subtype = 'pitchBend';\n\t\t\t\t\tevent.value = param1 + (stream.readInt8() << 7);\n\t\t\t\t\treturn event;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow \"Unrecognised MIDI event type: \" + eventType\n\t\t\t\t\t/* \n\t\t\t\t\tconsole.log(\"Unrecognised MIDI event type: \" + eventType);\n\t\t\t\t\tstream.readInt8();\n\t\t\t\t\tevent.subtype = 'unknown';\n\t\t\t\t\treturn event;\n\t\t\t\t\t*/\n\t\t\t}\n\t\t}\n\t}\n\t\n\tstream = Stream(data);\n\tvar headerChunk = readChunk(stream);\n\tif (headerChunk.id != 'MThd' || headerChunk.length != 6) {\n\t\tthrow \"Bad .mid file - header not found\";\n\t}\n\tvar headerStream = Stream(headerChunk.data);\n\tvar formatType = headerStream.readInt16();\n\tvar trackCount = headerStream.readInt16();\n\tvar timeDivision = headerStream.readInt16();\n\t\n\tif (timeDivision & 0x8000) {\n\t\tthrow \"Expressing time division in SMTPE frames is not supported yet\"\n\t} else {\n\t\tticksPerBeat = timeDivision;\n\t}\n\t\n\tvar header = {\n\t\t'formatType': formatType,\n\t\t'trackCount': trackCount,\n\t\t'ticksPerBeat': ticksPerBeat\n\t}\n\tvar tracks = [];\n\tfor (var i = 0; i < header.trackCount; i++) {\n\t\ttracks[i] = [];\n\t\tvar trackChunk = readChunk(stream);\n\t\tif (trackChunk.id != 'MTrk') {\n\t\t\tthrow \"Unexpected chunk - expected MTrk, got \"+ trackChunk.id;\n\t\t}\n\t\tvar trackStream = Stream(trackChunk.data);\n\t\twhile (!trackStream.eof()) {\n\t\t\tvar event = readEvent(trackStream);\n\t\t\ttracks[i].push(event);\n\t\t\t//console.log(event);\n\t\t}\n\t}\n\t\n\treturn {\n\t\t'header': header,\n\t\t'tracks': tracks\n\t}\n};\n\n/* Wrapper for accessing strings through sequential reads */\nfunction Stream(str) {\n\tvar position = 0;\n\t\n\tfunction read(length) {\n\t\tvar result = str.substr(position, length);\n\t\tposition += length;\n\t\treturn result;\n\t}\n\t\n\t/* read a big-endian 32-bit integer */\n\tfunction readInt32() {\n\t\tvar result = (\n\t\t\t(str.charCodeAt(position) << 24)\n\t\t\t+ (str.charCodeAt(position + 1) << 16)\n\t\t\t+ (str.charCodeAt(position + 2) << 8)\n\t\t\t+ str.charCodeAt(position + 3));\n\t\tposition += 4;\n\t\treturn result;\n\t}\n\n\t/* read a big-endian 16-bit integer */\n\tfunction readInt16() {\n\t\tvar result = (\n\t\t\t(str.charCodeAt(position) << 8)\n\t\t\t+ str.charCodeAt(position + 1));\n\t\tposition += 2;\n\t\treturn result;\n\t}\n\t\n\t/* read an 8-bit integer */\n\tfunction readInt8(signed) {\n\t\tvar result = str.charCodeAt(position);\n\t\tif (signed && result > 127) result -= 256;\n\t\tposition += 1;\n\t\treturn result;\n\t}\n\t\n\tfunction eof() {\n\t\treturn position >= str.length;\n\t}\n\t\n\t/* read a MIDI-style variable-length integer\n\t\t(big-endian value in groups of 7 bits,\n\t\twith top bit set to signify that another byte follows)\n\t*/\n\tfunction readVarInt() {\n\t\tvar result = 0;\n\t\twhile (true) {\n\t\t\tvar b = readInt8();\n\t\t\tif (b & 0x80) {\n\t\t\t\tresult += (b & 0x7f);\n\t\t\t\tresult <<= 7;\n\t\t\t} else {\n\t\t\t\t/* b is the last byte */\n\t\t\t\treturn result + b;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn {\n\t\t'eof': eof,\n\t\t'read': read,\n\t\t'readInt32': readInt32,\n\t\t'readInt16': readInt16,\n\t\t'readInt8': readInt8,\n\t\t'readVarInt': readVarInt\n\t}\n}","/**\n * Return the index of the element at or before the given time\n */\nfunction findElement(array, time) {\n\tlet beginning = 0\n\tconst len = array.length\n\tlet end = len\n\tif (len > 0 && array[len - 1].time <= time){\n\t\treturn len - 1\n\t}\n\twhile (beginning < end){\n\t\t// calculate the midpoint for roughly equal partition\n\t\tlet midPoint = Math.floor(beginning + (end - beginning) / 2)\n\t\tconst event = array[midPoint]\n\t\tconst nextEvent = array[midPoint + 1]\n\t\tif (event.time === time){\n\t\t\t//choose the last one that has the same time\n\t\t\tfor (let i = midPoint; i < array.length; i++){\n\t\t\t\tlet testEvent = array[i]\n\t\t\t\tif (testEvent.time === time){\n\t\t\t\t\tmidPoint = i\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn midPoint\n\t\t} else if (event.time < time && nextEvent.time > time){\n\t\t\treturn midPoint\n\t\t} else if (event.time > time){\n\t\t\t//search lower\n\t\t\tend = midPoint\n\t\t} else if (event.time < time){\n\t\t\t//search upper\n\t\t\tbeginning = midPoint + 1\n\t\t}\n\t}\n\treturn -1\n}\n\n/**\n * Does a binary search to insert the note\n * in the correct spot in the array\n * @param {Array} array\n * @param {Object} event\n * @param {Number=} offset\n */\nfunction BinaryInsert(array, event){\n\tif (array.length){\n\t\tconst index = findElement(array, event.time)\n\t\tarray.splice(index + 1, 0, event)\n\t} else {\n\t\tarray.push(event)\n\t}\n}\n\nexport {BinaryInsert}\n","const channelNames = {\n\t\"1\" : \"modulationWheel\",\n\t\"2\" : \"breath\",\n\t\"4\" : \"footController\",\n\t\"5\" : \"portamentoTime\",\n\t\"7\" : \"volume\",\n\t\"8\" : \"balance\",\n\t\"10\" : \"pan\",\n\t\"64\" : \"sustain\",\n\t\"65\" : \"portamentoTime\",\n\t\"66\" : \"sostenuto\",\n\t\"67\" : \"softPedal\",\n\t\"68\" : \"legatoFootswitch\",\n\t\"84\" : \"portamentoContro\"\n}\n\nclass Control{\n\tconstructor(number, time, value){\n\n\t\tthis.number = number\n\n\t\tthis.time = time\n\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * The common name of the control change event\n\t * @type {String}\n\t * @readOnly\n\t */\n\tget name(){\n\t\tif (channelNames.hasOwnProperty(this.number)){\n\t\t\treturn channelNames[this.number]\n\t\t}\n\t}\n}\n\nexport {Control}\n","/**\n * Parse tempo and time signature from the midiJson\n * @param {Object} midiJson\n * @return {Object}\n */\nfunction parseHeader(midiJson){\n\tvar ret = {\n\t\tPPQ : midiJson.header.ticksPerBeat\n\t}\n\tfor (var i = 0; i < midiJson.tracks.length; i++){\n\t\tvar track = midiJson.tracks[i]\n\t\tfor (var j = 0; j < track.length; j++){\n\t\t\tvar datum = track[j]\n\t\t\tif (datum.type === \"meta\"){\n\t\t\t\tif (datum.subtype === \"timeSignature\"){\n\t\t\t\t\tret.timeSignature = [datum.numerator, datum.denominator]\n\t\t\t\t} else if (datum.subtype === \"setTempo\"){\n\t\t\t\t\tif (!ret.bpm){\n\t\t\t\t\t\tret.bpm = 60000000 / datum.microsecondsPerBeat\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tret.bpm = ret.bpm || 120\n\treturn ret\n}\n\nexport {parseHeader}\n","\nfunction hasMoreValues(arrays, positions){\n\tfor (let i = 0; i < arrays.length; i++){\n\t\tlet arr = arrays[i]\n\t\tlet pos = positions[i]\n\t\tif (arr.length > pos){\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunction getLowestAtPosition(arrays, positions, encoders){\n\tlet lowestIndex = 0\n\tlet lowestValue = Infinity\n\tfor (let i = 0; i < arrays.length; i++){\n\t\tlet arr = arrays[i]\n\t\tlet pos = positions[i]\n\t\tif (arr[pos] && (arr[pos].time < lowestValue)){\n\t\t\tlowestIndex = i\n\t\t\tlowestValue = arr[pos].time\n\t\t}\n\t}\n\tencoders[lowestIndex](arrays[lowestIndex][positions[lowestIndex]])\n\t// increment array\n\tpositions[lowestIndex] += 1\n}\n\n/**\n * Combine multiple arrays keeping the timing in order\n * The arguments should alternate between the array and the encoder callback\n * @param {...Array|Function} args\n */\nfunction Merge(...args){\n\tconst arrays = args.filter((v, i) => (i % 2) === 0)\n\tconst positions = new Uint32Array(arrays.length)\n\tconst encoders = args.filter((v, i) => (i % 2) === 1)\n\tconst output = []\n\twhile(hasMoreValues(arrays, positions)){\n\t\tgetLowestAtPosition(arrays, positions, encoders)\n\t}\n}\n\nexport {Merge}","import * as Decoder from 'midi-file-parser'\nimport * as Encoder from 'jsmidgen'\nimport * as Util from './Util'\nimport {Track} from './Track'\nimport {parseHeader} from './Header'\n\n/**\n * @class The Midi object. Contains tracks and the header info.\n */\nclass Midi {\n\t/**\n\t * Convert JSON to Midi object\n\t * @param {object} json\n\t * @static\n\t * @returns {Midi}\n\t */\n\tstatic fromJSON(json){\n\t\tvar midi = new Midi()\n\n\t\tmidi.header = json.header\n\t\tjson.tracks.forEach((track) => {\n\t\t\tvar newTrack = Track.fromJSON(track)\n\t\t\tmidi.tracks.push(newTrack)\n\t\t})\n\n\t\treturn midi\n\t}\n\t\n\tconstructor(){\n\n\t\tthis.header = {\n\t\t\t//defaults\n\t\t\tbpm : 120,\n\t\t\ttimeSignature : [4, 4],\n\t\t\tPPQ : 480\n\t\t}\n\n\t\tthis.tracks = []\n\t}\n\n\t/**\n\t * Load the given url and parse the midi at that url\n\t * @param {String} url\n\t * @param {*} data Anything that should be sent in the XHR\n\t * @param {String} method Either GET or POST\n\t * @return {Promise}\n\t */\n\tload(url, data=null, method='GET'){\n\t\treturn new Promise((success, fail) => {\n\t\t\tvar request = new XMLHttpRequest()\n\t\t\trequest.open(method, url)\n\t\t\trequest.responseType = 'arraybuffer'\n\t\t\t// decode asynchronously\n\t\t\trequest.addEventListener('load', () => {\n\t\t\t\tif (request.readyState === 4 && request.status === 200){\n\t\t\t\t\tsuccess(this.decode(request.response))\n\t\t\t\t} else {\n\t\t\t\t\tfail(request.status)\n\t\t\t\t}\n\t\t\t})\n\t\t\trequest.addEventListener('error', fail)\n\t\t\trequest.send(data)\n\t\t}).catch(function(error) {\n\t\t\t\tconsole.log(error);\n\t\t\t});\n\t}\n\n\t/**\n\t * Decode the bytes\n\t * @param {String|ArrayBuffer} bytes The midi file encoded as a string or ArrayBuffer\n\t * @return {Midi} this\n\t */\n\tdecode(bytes){\n\n\t\tif (bytes instanceof ArrayBuffer){\n\t\t\tvar byteArray = new Uint8Array(bytes)\n\t\t\tbytes = String.fromCharCode.apply(null, byteArray)\n\t\t}\n\n\t\tconst midiData = Decoder(bytes)\n\n\t\tthis.header = parseHeader(midiData)\n\n\t\t//replace the previous tracks\n\t\tthis.tracks = []\n\n\t\tmidiData.tracks.forEach((trackData, i) => {\n\n\t\t\tconst track = new Track()\n\t\t\ttrack.id = i\n\t\t\tthis.tracks.push(track)\n\n\t\t\tlet absoluteTime = 0\n\t\t\ttrackData.forEach((event) => {\n\t\t\t\tabsoluteTime += Util.ticksToSeconds(event.deltaTime, this.header)\n\t\t\t\tif (event.type === 'meta' && event.subtype === 'trackName'){\n\t\t\t\t\ttrack.name = Util.cleanName(event.text)\n\t\t\t\t} else if (event.subtype === 'noteOn'){\n\t\t\t\t\ttrack.noteOn(event.noteNumber, absoluteTime, event.velocity / 127)\n\n\t\t\t\t\tif (track.channelNumber === -1) {\n\t\t\t\t\t\ttrack.channelNumber = event.channel\n\t\t\t\t\t}\n\t\t\t\t} else if (event.subtype === 'noteOff'){\n\t\t\t\t\ttrack.noteOff(event.noteNumber, absoluteTime)\n\t\t\t\t} else if (event.subtype === 'controller' && event.controllerType){\n\t\t\t\t\ttrack.cc(event.controllerType, absoluteTime, event.value / 127)\n\t\t\t\t} else if (event.type === 'meta' && event.subtype === 'instrumentName'){\n\t\t\t\t\ttrack.instrument = event.text\n\t\t\t\t} else if (event.type === 'channel' && event.subtype === 'programChange'){\n\t\t\t\t\ttrack.patch(event.programNumber)\n\t\t\t\t\ttrack.channelNumber = event.channel\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t//if the track is empty, then it is the file name\n\t\t\tif (!this.header.name && !track.length && track.name) {\n\t\t\t\tthis.header.name = track.name;\n\t\t\t}\n\t\t})\n\n\t\treturn this\n\t}\n\n\t/**\n\t * Encode the Midi object as a Buffer String\n\t * @returns {String}\n\t */\n\tencode(){\n\t\tconst output = new Encoder.File({\n\t\t\tticks : this.header.PPQ\n\t\t})\n\n\t\tconst firstEmptyTrack = this.tracks.filter(track => !track.length)[0];\n\n\t\tif (this.header.name && !(firstEmptyTrack && firstEmptyTrack.name === this.header.name)) {\n\t\t\tconst track = output.addTrack()\n\t\t\ttrack.addEvent(\n\t\t\t\tnew Encoder.MetaEvent({\n\t\t\t\t\ttime: 0,\n\t\t\t\t\ttype: Encoder.MetaEvent.TRACK_NAME,\n\t\t\t\t\tdata: this.header.name\n\t\t\t\t})\n\t\t\t)\n\t\t}\n\n\t\tthis.tracks.forEach((track) => {\n\t\t\tconst trackEncoder = output.addTrack()\n\t\t\ttrackEncoder.setTempo(this.bpm)\n\n\t\t\tif (track.name) {\n\t\t\t\ttrackEncoder.addEvent(\n\t\t\t\t\tnew Encoder.MetaEvent({\n\t\t\t\t\t\ttime: 0,\n\t\t\t\t\t\ttype: Encoder.MetaEvent.TRACK_NAME,\n\t\t\t\t\t\tdata: track.name\n\t\t\t\t\t})\n\t\t\t\t)\n\t\t\t}\n\n\t\t\ttrack.encode(trackEncoder, this.header)\n\t\t})\n\t\treturn output.toBytes()\n\t}\n\n\t/**\n\t * Convert the output encoding into an Array\n\t * @return {Array}\n\t */\n\ttoArray(){\n\t\tconst encodedStr = this.encode()\n\t\tconst buffer = new Array(encodedStr.length)\n\t\tfor (let i = 0; i < encodedStr.length; i++){\n\t\t\tbuffer[i] = encodedStr.charCodeAt(i)\n\t\t}\n\t\treturn buffer\n\t}\n\n\t/**\n\t * Convert all of the fields to JSON\n\t * @return {Object}\n\t */\n\ttoJSON(){\n\t\tconst ret = {\n\t\t\theader: this.header,\n\t\t\tstartTime: this.startTime,\n\t\t\tduration: this.duration,\n\t\t\ttracks: (this.tracks || []).map(\n\t\t\t\ttrack => track.toJSON()\n\t\t\t)\n\t\t}\n\n\t\tif (!ret.header.name)\n\t\t\tret.header.name = ''\n\n\t\treturn ret\n\t}\n\n\t/**\n\t * Add a new track.\n\t * @param {String=} name Optionally include the name of the track\n\t * @returns {Track}\n\t */\n\ttrack(name){\n\t\tconst track = new Track(name)\n\t\tthis.tracks.push(track)\n\t\treturn track\n\t}\n\n\t/**\n\t * Get a track either by it's name or track index\n\t * @param {Number|String} trackName\n\t * @return {Track}\n\t */\n\tget(trackName){\n\t\tif (Util.isNumber(trackName)){\n\t\t\treturn this.tracks[trackName]\n\t\t} else {\n\t\t\treturn this.tracks.find((t) => t.name === trackName)\n\t\t}\n\t}\n\n\t/**\n\t * Slice the midi file between the startTime and endTime. Returns a copy of the\n\t * midi\n\t * @param {Number} startTime\n\t * @param {Number} endTime\n\t * @returns {Midi} this\n\t */\n\tslice(startTime=0, endTime=this.duration){\n\t\tconst midi = new Midi()\n\t\tmidi.header = this.header\n\t\tmidi.tracks = this.tracks.map((t) => t.slice(startTime, endTime))\n\t\treturn midi\n\t}\n\n\t/**\n\t * the time of the first event\n\t * @type {Number}\n\t */\n\tget startTime(){\n\t\tconst startTimes = this.tracks.map((t) => t.startTime)\n\n\t\tif (!startTimes.length)\n\t\t\treturn 0\n\n\t\treturn Math.min.apply(Math, startTimes) || 0\n\t}\n\n\t/**\n\t * The bpm of the midi file in beats per minute\n\t * @type {Number}\n\t */\n\tget bpm(){\n\t\treturn this.header.bpm\n\t}\n\tset bpm(bpm){\n\t\tconst prevTempo = this.header.bpm\n\t\tthis.header.bpm = bpm\n\t\t//adjust the timing of all the notes\n\t\tconst ratio = prevTempo / bpm\n\t\tthis.tracks.forEach((track) => track.scale(ratio))\n\n\t}\n\n\t/**\n\t * The timeSignature of the midi file\n\t * @type {Array}\n\t */\n\tget timeSignature(){\n\t\treturn this.header.timeSignature\n\t}\n\tset timeSignature(timeSig){\n\t\tthis.header.timeSignature = timeSig\n\t}\n\n\t/**\n\t * The duration is the end time of the longest track\n\t * @type {Number}\n\t */\n\tget duration(){\n\t\tconst durations = this.tracks.map((t) => t.duration)\n\n\t\tif (!durations.length)\n\t\t\treturn 0\n\n\t\treturn Math.max.apply(Math, durations) || 0\n\t}\n}\n\nexport {Midi}\n","import {Midi} from './Midi'\nexport {instrumentByPatchID, instrumentFamilyByID, drumKitByPatchID} from './instrumentMaps'\n\n/**\n * Parse all the data from the Midi file into this format:\n * {\n * \t// the transport and timing data\n * \theader : {\n * \t\tbpm : Number, // tempo, e.g. 120\n * \t\ttimeSignature : [Number, Number], // time signature, e.g. [4, 4],\n * \t\tPPQ : Number // PPQ of the midi file\n * \t}\n * \t// an array for each of the midi tracks\n * \ttracks : [\n * \t\t{\n * \t\t\tname : String, // the track name if one was given\n * \t\t\tnotes : [\n * \t\t\t\t{\n * \t\t\t\t\ttime : Number, // time in seconds\n * \t\t\t\t\tname : String, // note name, e.g. 'C4'\n * \t\t\t\t\tmidi : Number, // midi number, e.g. 60\n * \t\t\t\t\tvelocity : Number, // normalized velocity\n * \t\t\t\t\tduration : Number // duration between noteOn and noteOff\n * \t\t\t\t}\n * \t\t\t],\n * \t\t\tcontrolChanges : { //all of the control changes\n * \t\t\t\t64 : [ //array for each cc value\n * \t\t\t\t\t{\n * \t\t\t\t\t\tnumber : Number, //the cc number\n * \t\t\t\t\t\ttime : Number, //the time of the event in seconds\n * \t\t\t\t\t\tname : String, // if the cc value has a common name (e.g. 'sustain')\n * \t\t\t\t\t\tvalue : Number, //the normalized value\n * \t\t\t\t\t}\n * \t\t\t\t]\n * \t\t\t}\n * \t\t}\n * \t]\n * }\n * @param {Binary String} fileBlob The output from fs.readFile or FileReader\n * @returns {Object} All of the options parsed from the midi file.\n */\nexport function parse(fileBlob){\n\treturn new Midi().decode(fileBlob)\n}\n\n/**\n * Load and parse a midi file. See `parse` for what the results look like.\n * @param {String} url\n * @param {Function=} callback\n * @returns {Promise} A promise which is invoked with the returned Midi object\n */\nexport function load(url, callback){\n\tconst promise = new Midi().load(url)\n\tif (callback){\n\t\tpromise.then(callback)\n\t}\n\treturn promise\n}\n\n/**\n * Create an empty midi file\n * @return {Midi}\n */\nexport function create(){\n\treturn new Midi()\n}\n\n/**\n * Create midi object from json\n * @param {object} json\n * @returns {Midi} Deserialized midi object\n */\nexport function fromJSON(json){\n\treturn Midi.fromJSON(json)\n}\n","import * as Util from './Util'\n\nclass Note{\n\t/**\n\t * Convert JSON to Note object\n\t * @param {object} json\n\t * @static\n\t * @returns {Note}\n\t */\n\tstatic fromJSON(json) {\n\t\tvar note = new Note(json.midi, json.time, json.duration, json.velocity)\n\t\treturn note\n\t}\n\t\n\tconstructor(midi, time, duration=0, velocity=1){\n\n\t\t/**\n\t\t * The MIDI note number\n\t\t * @type {Number}\n\t\t */\n\t\tif (Util.isNumber(midi)){\n\t\t\tthis.midi = midi\n\t\t} else if (Util.isPitch(midi)){\n\t\t\tthis.name = midi\n\t\t} else {\n\t\t\tthrow new Error('the midi value must either be in Pitch Notation (e.g. C#4) or a midi value')\n\t\t}\n\n\t\t/**\n\t\t * The note on time in seconds\n\t\t * @type {Number}\n\t\t */\n\t\tthis.time = time\n\n\t\t/**\n\t\t * The duration in seconds\n\t\t * @type {Number}\n\t\t */\n\t\tthis.duration = duration\n\n\t\t/**\n\t\t * The velocity 0-1\n\t\t * @type {Number}\n\t\t */\n\t\tthis.velocity = velocity\n\t}\n\n\t/**\n\t * If the note is the same as the given note\n\t * @param {String|Number} note\n\t * @return {Boolean}\n\t */\n\tmatch(note){\n\t\tif (Util.isNumber(note)){\n\t\t\treturn this.midi === note\n\t\t} else if (Util.isPitch(note)){\n\t\t\treturn this.name.toLowerCase() === note.toLowerCase()\n\t\t}\n\t}\n\n\t/**\n\t * The note in Scientific Pitch Notation\n\t * @type {String}\n\t */\n\tget name(){\n\t\treturn Util.midiToPitch(this.midi)\n\t}\n\tset name(name){\n\t\tthis.midi = Util.pitchToMidi(name)\n\t}\n\n\t/**\n\t * Alias for time\n\t * @type {Number}\n\t */\n\tget noteOn(){\n\t\treturn this.time\n\t}\n\tset noteOn(t){\n\t\tthis.time = t\n\t}\n\n\t/**\n\t * The note off time\n\t * @type {Number}\n\t */\n\tget noteOff(){\n\t\treturn this.time + this.duration\n\t}\n\tset noteOff(time){\n\t\tthis.duration = time - this.time\n\t}\n\n\t/**\n\t * Convert the note to JSON\n\t * @returns {Object}\n\t */\n\ttoJSON(){\n\t\treturn {\n\t\t\tname : this.name,\n\t\t\tmidi : this.midi,\n\t\t\ttime : this.time,\n\t\t\tvelocity : this.velocity,\n\t\t\tduration : this.duration\n\t\t}\n\t}\n}\n\nexport {Note}\n","import {BinaryInsert} from './BinaryInsert'\nimport {Control} from './Control'\nimport {Merge} from './Merge'\nimport {Note} from './Note'\nimport {instrumentByPatchID, instrumentFamilyByID, drumKitByPatchID} from './instrumentMaps'\n\nclass Track {\n/**\n\t * Convert JSON to Track object\n\t * @param {object} json\n\t * @static\n\t * @returns {Track}\n\t */\n\tstatic fromJSON(json){\n\t\tvar track = new Track(json.name, json.instrumentNumber, json.channelNumber )\n\n\t\ttrack.id = json.id\n\t\t\n\t\tif (json.notes) {\n\t\t\tjson.notes.forEach((note) => {\n\t\t\t\tvar newNote = Note.fromJSON(note)\n\t\t\t\ttrack.notes.push(newNote)\n\t\t\t})\n\t\t}\n\n\t\tif (json.controlChanges) {\n\t\t\ttrack.controlChanges = json.controlChanges\n\t\t}\n\n\t\treturn track\n\t}\n\t\n\tconstructor(name, instrumentNumber=-1, channel=-1){\n\n\t\t/**\n\t\t * The name of the track\n\t\t * @type {String}\n\t\t */\n\t\tthis.name = name\n\n\t\t/**\n\t\t * The MIDI channel of the track\n\t\t * @type {number}\n\t\t */\n\t\tthis.channelNumber = channel\n\n\t\t/**\n\t\t * The note events\n\t\t * @type {Array}\n\t\t */\n\t\tthis.notes = []\n\n\t\t/**\n\t\t * The control changes\n\t\t * @type {Object}\n\t\t */\n\t\tthis.controlChanges = {}\n\n\t\t/**\n\t\t * The MIDI patch ID of the instrument. -1 if none is set.\n\t\t * @type {Number}\n\t\t */\n\t\tthis.instrumentNumber = instrumentNumber\n\t}\n\n\tnote(midi, time, duration=0, velocity=1){\n\t\tconst note = new Note(midi, time, duration, velocity)\n\t\tBinaryInsert(this.notes, note)\n\t\treturn this\n\t}\n\n\t/**\n\t * Add a note on event\n\t * @param {Number|String} midi The midi note as either a midi number or\n\t * Pitch Notation like ('C#4')\n\t * @param {Number} time The time in seconds\n\t * @param {Number} velocity The velocity value 0-1\n\t * @return {Track} this\n\t */\n\tnoteOn(midi, time, velocity=1){\n\t\tconst note = new Note(midi, time, 0, velocity)\n\t\tBinaryInsert(this.notes, note)\n\t\treturn this\n\t}\n\n\t/**\n\t * Add a note off event. Go through and find an unresolved\n\t * noteOn event with the same pitch.\n\t * @param {String|Number} midi The midi number or note name.\n\t * @param {Number} time The time of the event in seconds\n\t * @return {Track} this\n\t */\n\tnoteOff(midi, time){\n\t\tfor (let i = 0; i < this.notes.length; i++){\n\t\t\tlet note = this.notes[i]\n\t\t\tif (note.match(midi) && note.duration === 0){\n\t\t\t\tnote.noteOff = time\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn this\n\t}\n\n\t/**\n\t * Add a CC event\n\t * @param {Number} num The CC number\n\t * @param {Number} time The time of the event in seconds\n\t * @param {Number} value The value of the CC\n\t * @return {Track} this\n\t */\n\tcc(num, time, value){\n\t\tif (!this.controlChanges.hasOwnProperty(num)){\n\t\t\tthis.controlChanges[num] = []\n\t\t}\n\t\tconst cc = new Control(num, time, value)\n\t\tBinaryInsert(this.controlChanges[num], cc)\n\t\treturn this\n\t}\n\n\t/**\n\t * Sets instrumentNumber.\n\t * For a list of possible values, see the [General MIDI Instrument Patch Map](https://www.midi.org/specifications/item/gm-level-1-sound-set)\n\t * @param {Number} id The Patch ID for this instrument, as specified in the General MIDI Instrument Patch Map\n\t */\n\tpatch(id){\n\t\tthis.instrumentNumber = id\n\t\treturn this\n\t}\n\n\t/**\n\t * Sets channelNumber.\n\t * @param {Number} id The MIDI channel number, between 0 and 0xF. 0x9 and 0xA are percussion\n\t */\n\tchannel(id){\n\t\tthis.channelNumber = id\n\t\treturn this\n\t}\n\n\t/**\n\t * An array of all the note on events\n\t * @type {Array<Object>}\n\t * @readOnly\n\t */\n\tget noteOns(){\n\t\tconst noteOns = []\n\t\tthis.notes.forEach((note) => {\n\t\t\tnoteOns.push({\n\t\t\t\ttime : note.noteOn,\n\t\t\t\tmidi : note.midi,\n\t\t\t\tname : note.name,\n\t\t\t\tvelocity : note.velocity\n\t\t\t})\n\t\t})\n\t\treturn noteOns\n\t}\n\n\t/**\n\t * An array of all the noteOff events\n\t * @type {Array<Object>}\n\t * @readOnly\n\t */\n\tget noteOffs(){\n\t\tconst noteOffs = []\n\t\tthis.notes.forEach((note) => {\n\t\t\tnoteOffs.push({\n\t\t\t\ttime : note.noteOff,\n\t\t\t\tmidi : note.midi,\n\t\t\t\tname : note.name\n\t\t\t})\n\t\t})\n\t\treturn noteOffs\n\t}\n\n\t/**\n\t * The length in seconds of the track\n\t * @type {Number}\n\t */\n\tget length() {\n\t\treturn this.notes.length\n\t}\n\n\t/**\n\t * The time of the first event in seconds\n\t * @type {Number}\n\t */\n\tget startTime() {\n\t\tif (this.notes.length){\n\t\t\tlet firstNote = this.notes[0]\n\t\t\treturn firstNote.noteOn\n\t\t} else {\n\t\t\treturn 0\n\t\t}\n\t}\n\n\t/**\n\t * The time of the last event in seconds\n\t * @type {Number}\n\t */\n\tget duration() {\n\t\tif (this.notes.length){\n\t\t\tlet lastNote = this.notes[this.notes.length - 1]\n\t\t\treturn lastNote.noteOff\n\t\t} else {\n\t\t\treturn 0\n\t\t}\n\t}\n\n\t/**\n\t * The name of the midi instrument\n\t * @type {String}\n\t */\n\tget instrument() {\n\t\tif (this.isPercussion){\n\t\t\treturn drumKitByPatchID[this.instrumentNumber]\n\t\t} else {\n\t\t\treturn instrumentByPatchID[this.instrumentNumber]\n\t\t}\n\t}\n\tset instrument(inst) {\n\t\tconst index = instrumentByPatchID.indexOf(inst)\n\t\tif (index !== -1){\n\t\t\tthis.instrumentNumber = index\n\t\t}\n\t}\n\n\n\t/**\n\t * Whether or not this is a percussion track\n\t * @type {Boolean}\n\t */\n\tget isPercussion() {\n\t\treturn [0x9, 0xA].includes(this.channelNumber)\n\t}\n\n\t/**\n\t * The family that the instrument belongs to\n\t * @type {String}\n\t * @readOnly\n\t */\n\tget instrumentFamily() {\n\t\tif (this.isPercussion){\n\t\t\treturn 'drums'\n\t\t} else {\n\t\t\treturn instrumentFamilyByID[Math.floor(this.instrumentNumber / 8)]\n\t\t}\n\t}\n\n\t/**\n\t * Scale the timing of all the events in the track\n\t * @param {Number} amount The amount to scale all the values\n\t */\n\tscale(amount){\n\t\tthis.notes.forEach((note) => {\n\t\t\tnote.time *= amount\n\t\t\tnote.duration *= amount\n\t\t})\n\t\treturn this\n\t}\n\n\t/**\n\t * Slice returns a new track with only events that occured between startTime and endTime.\n\t * Modifies this track.\n\t * @param {Number} startTime\n\t * @param {Number} endTime\n\t * @returns {Track}\n\t */\n\tslice(startTime=0, endTime=this.duration){\n\t\t// get the index before the startTime\n\t\tconst noteStartIndex = Math.max(this.notes.findIndex((note) => note.time >= startTime), 0)\n\t\tconst noteEndIndex = this.notes.findIndex((note) => note.noteOff >= endTime) + 1\n\t\tconst track = new Track(this.name)\n\t\ttrack.notes = this.notes.slice(noteStartIndex, noteEndIndex)\n\t\t//shift the start time\n\t\ttrack.notes.forEach((note) => note.time = note.time - startTime)\n\t\treturn track\n\t}\n\n\t/**\n\t * Write the output to the stream\n\t */\n\tencode(trackEncoder, header){\n\n\t\tconst ticksPerSecond = header.PPQ / (60 / header.bpm)\n\t\tlet lastEventTime = 0\n\n\t\t// unset, `channelNumber` defaults to -1, but that's not a valid MIDI channel\n\t\tconst channelNumber = Math.max(0, this.channelNumber)\n\n\t\tfunction getDeltaTime(time){\n\t\t\tconst ticks = Math.floor(ticksPerSecond * time)\n\t\t\tconst delta = Math.max(ticks - lastEventTime, 0)\n\t\t\tlastEventTime = ticks\n\t\t\treturn delta\n\t\t}\n\n\t\tif (this.instrumentNumber !== -1) {\n\t\t\ttrackEncoder.instrument(channelNumber, this.instrumentNumber)\n\t\t}\n\n\t\tMerge(this.noteOns, (noteOn) => {\n\t\t\ttrackEncoder.addNoteOn(channelNumber, noteOn.name, getDeltaTime(noteOn.time), Math.floor(noteOn.velocity * 127))\n\t\t}, this.noteOffs, (noteOff) => {\n\t\t\ttrackEncoder.addNoteOff(channelNumber, noteOff.name, getDeltaTime(noteOff.time))\n\t\t})\n\t}\n\n\t/**\n\t * Convert all of the fields to JSON\n\t * @return {Object}\n\t */\n\ttoJSON(){\n\n\t\tconst ret = {\n\t\t\tstartTime: this.startTime,\n\t\t\tduration: this.duration,\n\t\t\tlength: this.length,\n\t\t\tnotes: [],\n\t\t\tcontrolChanges: {},\n\t\t}\n\n\t\tif (typeof this.id !== 'undefined')\n\t\t\tret.id = this.id\n\n\t\tret.name = this.name\n\n\t\tif (this.instrumentNumber !== -1){\n\t\t\tret.instrumentNumber = this.instrumentNumber\n\t\t\tret.instrument = this.instrument\n\t\t\tret.instrumentFamily = this.instrumentFamily\n\t\t}\n\n\t\tif (this.channelNumber !== -1){\n\t\t\tret.channelNumber = this.channelNumber\n\t\t\tret.isPercussion = this.isPercussion\n\t\t}\n\n\t\tif (this.notes.length)\n\t\t\tret.notes = this.notes.map((n) => n.toJSON())\n\n\t\tif (Object.keys(this.controlChanges).length)\n\t\t\tret.controlChanges = this.controlChanges\n\n\t\treturn ret\n\t}\n}\n\nexport {Track}\n","export function cleanName(str){\n\t//ableton adds some weird stuff to the track\n\treturn str.replace(/\\u0000/g, '')\n}\n\nexport function ticksToSeconds(ticks, header){\n\treturn (60 / header.bpm) * (ticks / header.PPQ);\n}\n\nexport function isNumber(val){\n\treturn typeof val === 'number'\n}\n\nexport function isString(val){\n\treturn typeof val === 'string'\n}\n\nexport const isPitch = (function(){\n\tconst regexp = /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i\n\treturn (val) => {\n\t\treturn isString(val) && regexp.test(val)\n\t}\n}())\n\n\nexport function midiToPitch(midi){\n\tconst scaleIndexToNote = [\"C\", \"C#\", \"D\", \"D#\", \"E\", \"F\", \"F#\", \"G\", \"G#\", \"A\", \"A#\", \"B\"];\n\tconst octave = Math.floor(midi / 12) - 1;\n\tconst note = midi % 12;\n\treturn scaleIndexToNote[note] + octave;\n}\n\nexport const pitchToMidi = (function(){\n\tconst regexp = /^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i\n\tconst noteToScaleIndex = {\n\t\t\"cbb\" : -2, \"cb\" : -1, \"c\" : 0, \"c#\" : 1, \"cx\" : 2,\n\t\t\"dbb\" : 0, \"db\" : 1, \"d\" : 2, \"d#\" : 3, \"dx\" : 4,\n\t\t\"ebb\" : 2, \"eb\" : 3, \"e\" : 4, \"e#\" : 5, \"ex\" : 6,\n\t\t\"fbb\" : 3, \"fb\" : 4, \"f\" : 5, \"f#\" : 6, \"fx\" : 7,\n\t\t\"gbb\" : 5, \"gb\" : 6, \"g\" : 7, \"g#\" : 8, \"gx\" : 9,\n\t\t\"abb\" : 7, \"ab\" : 8, \"a\" : 9, \"a#\" : 10, \"ax\" : 11,\n\t\t\"bbb\" : 9, \"bb\" : 10, \"b\" : 11, \"b#\" : 12, \"bx\" : 13,\n\t}\n\treturn (note) => {\n\t\tconst split = regexp.exec(note)\n\t\tconst pitch = split[1]\n\t\tconst octave = split[2]\n\t\tconst index = noteToScaleIndex[pitch.toLowerCase()]\n\t\treturn index + (parseInt(octave) + 1) * 12\n\t}\n}())\n","export const instrumentByPatchID = [\n\t\"acoustic grand piano\",\n\t\"bright acoustic piano\",\n\t\"electric grand piano\",\n\t\"honky-tonk piano\",\n\t\"electric piano 1\",\n\t\"electric piano 2\",\n\t\"harpsichord\",\n\t\"clavi\",\n\t\"celesta\",\n\t\"glockenspiel\",\n\t\"music box\",\n\t\"vibraphone\",\n\t\"marimba\",\n\t\"xylophone\",\n\t\"tubular bells\",\n\t\"dulcimer\",\n\t\"drawbar organ\",\n\t\"percussive organ\",\n\t\"rock organ\",\n\t\"church organ\",\n\t\"reed organ\",\n\t\"accordion\",\n\t\"harmonica\",\n\t\"tango accordion\",\n\t\"acoustic guitar (nylon)\",\n\t\"acoustic guitar (steel)\",\n\t\"electric guitar (jazz)\",\n\t\"electric guitar (clean)\",\n\t\"electric guitar (muted)\",\n\t\"overdriven guitar\",\n\t\"distortion guitar\",\n\t\"guitar harmonics\",\n\t\"acoustic bass\",\n\t\"electric bass (finger)\",\n\t\"electric bass (pick)\",\n\t\"fretless bass\",\n\t\"slap bass 1\",\n\t\"slap bass 2\",\n\t\"synth bass 1\",\n\t\"synth bass 2\",\n\t\"violin\",\n\t\"viola\",\n\t\"cello\",\n\t\"contrabass\",\n\t\"tremolo strings\",\n\t\"pizzicato strings\",\n\t\"orchestral harp\",\n\t\"timpani\",\n\t\"string ensemble 1\",\n\t\"string ensemble 2\",\n\t\"synthstrings 1\",\n\t\"synthstrings 2\",\n\t\"choir aahs\",\n\t\"voice oohs\",\n\t\"synth voice\",\n\t\"orchestra hit\",\n\t\"trumpet\",\n\t\"trombone\",\n\t\"tuba\",\n\t\"muted trumpet\",\n\t\"french horn\",\n\t\"brass section\",\n\t\"synthbrass 1\",\n\t\"synthbrass 2\",\n\t\"soprano sax\",\n\t\"alto sax\",\n\t\"tenor sax\",\n\t\"baritone sax\",\n\t\"oboe\",\n\t\"english horn\",\n\t\"bassoon\",\n\t\"clarinet\",\n\t\"piccolo\",\n\t\"flute\",\n\t\"recorder\",\n\t\"pan flute\",\n\t\"blown bottle\",\n\t\"shakuhachi\",\n\t\"whistle\",\n\t\"ocarina\",\n\t\"lead 1 (square)\",\n\t\"lead 2 (sawtooth)\",\n\t\"lead 3 (calliope)\",\n\t\"lead 4 (chiff)\",\n\t\"lead 5 (charang)\",\n\t\"lead 6 (voice)\",\n\t\"lead 7 (fifths)\",\n\t\"lead 8 (bass + lead)\",\n\t\"pad 1 (new age)\",\n\t\"pad 2 (warm)\",\n\t\"pad 3 (polysynth)\",\n\t\"pad 4 (choir)\",\n\t\"pad 5 (bowed)\",\n\t\"pad 6 (metallic)\",\n\t\"pad 7 (halo)\",\n\t\"pad 8 (sweep)\",\n\t\"fx 1 (rain)\",\n\t\"fx 2 (soundtrack)\",\n\t\"fx 3 (crystal)\",\n\t\"fx 4 (atmosphere)\",\n\t\"fx 5 (brightness)\",\n\t\"fx 6 (goblins)\",\n\t\"fx 7 (echoes)\",\n\t\"fx 8 (sci-fi)\",\n\t\"sitar\",\n\t\"banjo\",\n\t\"shamisen\",\n\t\"koto\",\n\t\"kalimba\",\n\t\"bag pipe\",\n\t\"fiddle\",\n\t\"shanai\",\n\t\"tinkle bell\",\n\t\"agogo\",\n\t\"steel drums\",\n\t\"woodblock\",\n\t\"taiko drum\",\n\t\"melodic tom\",\n\t\"synth drum\",\n\t\"reverse cymbal\",\n\t\"guitar fret noise\",\n\t\"breath noise\",\n\t\"seashore\",\n\t\"bird tweet\",\n\t\"telephone ring\",\n\t\"helicopter\",\n\t\"applause\",\n\t\"gunshot\",\n]\n\nexport const instrumentFamilyByID = [\n\t\"piano\",\n\t\"chromatic percussion\",\n\t\"organ\",\n\t\"guitar\",\n\t\"bass\",\n\t\"strings\",\n\t\"ensemble\",\n\t\"brass\",\n\t\"reed\",\n\t\"pipe\",\n\t\"synth lead\",\n\t\"synth pad\",\n\t\"synth effects\",\n\t\"ethnic\",\n\t\"percussive\",\n\t\"sound effects\",\n]\n\nexport const drumKitByPatchID = {\n\t 0: \"standard kit\",\n\t 8: \"room kit\",\n\t16: \"power kit\",\n\t24: \"electronic kit\",\n\t25: \"tr-808 kit\",\n\t32: \"jazz kit\",\n\t40: \"brush kit\",\n\t48: \"orchestra kit\",\n\t56: \"sound fx kit\",\n}\n","/*! https://mths.be/punycode v1.4.1 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow new RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.4.1',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) {\n\t\t\t// in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else {\n\t\t\t// in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","/* sockjs-client v1.1.4 | http://sockjs.org | MIT license */\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.SockJS = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n(function (global){\n'use strict';\n\nvar transportList = require('./transport-list');\n\nmodule.exports = require('./main')(transportList);\n\n// TODO can't get rid of this until all servers do\nif ('_sockjs_onload' in global) {\n setTimeout(global._sockjs_onload, 1);\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./main\":14,\"./transport-list\":16}],2:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , Event = require('./event')\n ;\n\nfunction CloseEvent() {\n Event.call(this);\n this.initEvent('close', false, false);\n this.wasClean = false;\n this.code = 0;\n this.reason = '';\n}\n\ninherits(CloseEvent, Event);\n\nmodule.exports = CloseEvent;\n\n},{\"./event\":4,\"inherits\":57}],3:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , EventTarget = require('./eventtarget')\n ;\n\nfunction EventEmitter() {\n EventTarget.call(this);\n}\n\ninherits(EventEmitter, EventTarget);\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n if (type) {\n delete this._listeners[type];\n } else {\n this._listeners = {};\n }\n};\n\nEventEmitter.prototype.once = function(type, listener) {\n var self = this\n , fired = false;\n\n function g() {\n self.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n this.on(type, g);\n};\n\nEventEmitter.prototype.emit = function() {\n var type = arguments[0];\n var listeners = this._listeners[type];\n if (!listeners) {\n return;\n }\n // equivalent of Array.prototype.slice.call(arguments, 1);\n var l = arguments.length;\n var args = new Array(l - 1);\n for (var ai = 1; ai < l; ai++) {\n args[ai - 1] = arguments[ai];\n }\n for (var i = 0; i < listeners.length; i++) {\n listeners[i].apply(this, args);\n }\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener = EventTarget.prototype.addEventListener;\nEventEmitter.prototype.removeListener = EventTarget.prototype.removeEventListener;\n\nmodule.exports.EventEmitter = EventEmitter;\n\n},{\"./eventtarget\":5,\"inherits\":57}],4:[function(require,module,exports){\n'use strict';\n\nfunction Event(eventType) {\n this.type = eventType;\n}\n\nEvent.prototype.initEvent = function(eventType, canBubble, cancelable) {\n this.type = eventType;\n this.bubbles = canBubble;\n this.cancelable = cancelable;\n this.timeStamp = +new Date();\n return this;\n};\n\nEvent.prototype.stopPropagation = function() {};\nEvent.prototype.preventDefault = function() {};\n\nEvent.CAPTURING_PHASE = 1;\nEvent.AT_TARGET = 2;\nEvent.BUBBLING_PHASE = 3;\n\nmodule.exports = Event;\n\n},{}],5:[function(require,module,exports){\n'use strict';\n\n/* Simplified implementation of DOM2 EventTarget.\n * http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget\n */\n\nfunction EventTarget() {\n this._listeners = {};\n}\n\nEventTarget.prototype.addEventListener = function(eventType, listener) {\n if (!(eventType in this._listeners)) {\n this._listeners[eventType] = [];\n }\n var arr = this._listeners[eventType];\n // #4\n if (arr.indexOf(listener) === -1) {\n // Make a copy so as not to interfere with a current dispatchEvent.\n arr = arr.concat([listener]);\n }\n this._listeners[eventType] = arr;\n};\n\nEventTarget.prototype.removeEventListener = function(eventType, listener) {\n var arr = this._listeners[eventType];\n if (!arr) {\n return;\n }\n var idx = arr.indexOf(listener);\n if (idx !== -1) {\n if (arr.length > 1) {\n // Make a copy so as not to interfere with a current dispatchEvent.\n this._listeners[eventType] = arr.slice(0, idx).concat(arr.slice(idx + 1));\n } else {\n delete this._listeners[eventType];\n }\n return;\n }\n};\n\nEventTarget.prototype.dispatchEvent = function() {\n var event = arguments[0];\n var t = event.type;\n // equivalent of Array.prototype.slice.call(arguments, 0);\n var args = arguments.length === 1 ? [event] : Array.apply(null, arguments);\n // TODO: This doesn't match the real behavior; per spec, onfoo get\n // their place in line from the /first/ time they're set from\n // non-null. Although WebKit bumps it to the end every time it's\n // set.\n if (this['on' + t]) {\n this['on' + t].apply(this, args);\n }\n if (t in this._listeners) {\n // Grab a reference to the listeners list. removeEventListener may alter the list.\n var listeners = this._listeners[t];\n for (var i = 0; i < listeners.length; i++) {\n listeners[i].apply(this, args);\n }\n }\n};\n\nmodule.exports = EventTarget;\n\n},{}],6:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , Event = require('./event')\n ;\n\nfunction TransportMessageEvent(data) {\n Event.call(this);\n this.initEvent('message', false, false);\n this.data = data;\n}\n\ninherits(TransportMessageEvent, Event);\n\nmodule.exports = TransportMessageEvent;\n\n},{\"./event\":4,\"inherits\":57}],7:[function(require,module,exports){\n'use strict';\n\nvar JSON3 = require('json3')\n , iframeUtils = require('./utils/iframe')\n ;\n\nfunction FacadeJS(transport) {\n this._transport = transport;\n transport.on('message', this._transportMessage.bind(this));\n transport.on('close', this._transportClose.bind(this));\n}\n\nFacadeJS.prototype._transportClose = function(code, reason) {\n iframeUtils.postMessage('c', JSON3.stringify([code, reason]));\n};\nFacadeJS.prototype._transportMessage = function(frame) {\n iframeUtils.postMessage('t', frame);\n};\nFacadeJS.prototype._send = function(data) {\n this._transport.send(data);\n};\nFacadeJS.prototype._close = function() {\n this._transport.close();\n this._transport.removeAllListeners();\n};\n\nmodule.exports = FacadeJS;\n\n},{\"./utils/iframe\":47,\"json3\":58}],8:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar urlUtils = require('./utils/url')\n , eventUtils = require('./utils/event')\n , JSON3 = require('json3')\n , FacadeJS = require('./facade')\n , InfoIframeReceiver = require('./info-iframe-receiver')\n , iframeUtils = require('./utils/iframe')\n , loc = require('./location')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:iframe-bootstrap');\n}\n\nmodule.exports = function(SockJS, availableTransports) {\n var transportMap = {};\n availableTransports.forEach(function(at) {\n if (at.facadeTransport) {\n transportMap[at.facadeTransport.transportName] = at.facadeTransport;\n }\n });\n\n // hard-coded for the info iframe\n // TODO see if we can make this more dynamic\n transportMap[InfoIframeReceiver.transportName] = InfoIframeReceiver;\n var parentOrigin;\n\n /* eslint-disable camelcase */\n SockJS.bootstrap_iframe = function() {\n /* eslint-enable camelcase */\n var facade;\n iframeUtils.currentWindowId = loc.hash.slice(1);\n var onMessage = function(e) {\n if (e.source !== parent) {\n return;\n }\n if (typeof parentOrigin === 'undefined') {\n parentOrigin = e.origin;\n }\n if (e.origin !== parentOrigin) {\n return;\n }\n\n var iframeMessage;\n try {\n iframeMessage = JSON3.parse(e.data);\n } catch (ignored) {\n debug('bad json', e.data);\n return;\n }\n\n if (iframeMessage.windowId !== iframeUtils.currentWindowId) {\n return;\n }\n switch (iframeMessage.type) {\n case 's':\n var p;\n try {\n p = JSON3.parse(iframeMessage.data);\n } catch (ignored) {\n debug('bad json', iframeMessage.data);\n break;\n }\n var version = p[0];\n var transport = p[1];\n var transUrl = p[2];\n var baseUrl = p[3];\n debug(version, transport, transUrl, baseUrl);\n // change this to semver logic\n if (version !== SockJS.version) {\n throw new Error('Incompatible SockJS! Main site uses:' +\n ' \"' + version + '\", the iframe:' +\n ' \"' + SockJS.version + '\".');\n }\n\n if (!urlUtils.isOriginEqual(transUrl, loc.href) ||\n !urlUtils.isOriginEqual(baseUrl, loc.href)) {\n throw new Error('Can\\'t connect to different domain from within an ' +\n 'iframe. (' + loc.href + ', ' + transUrl + ', ' + baseUrl + ')');\n }\n facade = new FacadeJS(new transportMap[transport](transUrl, baseUrl));\n break;\n case 'm':\n facade._send(iframeMessage.data);\n break;\n case 'c':\n if (facade) {\n facade._close();\n }\n facade = null;\n break;\n }\n };\n\n eventUtils.attachEvent('message', onMessage);\n\n // Start\n iframeUtils.postMessage('s');\n };\n};\n\n}).call(this,{ env: {} })\n\n},{\"./facade\":7,\"./info-iframe-receiver\":10,\"./location\":13,\"./utils/event\":46,\"./utils/iframe\":47,\"./utils/url\":52,\"debug\":55,\"json3\":58}],9:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar EventEmitter = require('events').EventEmitter\n , inherits = require('inherits')\n , JSON3 = require('json3')\n , objectUtils = require('./utils/object')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:info-ajax');\n}\n\nfunction InfoAjax(url, AjaxObject) {\n EventEmitter.call(this);\n\n var self = this;\n var t0 = +new Date();\n this.xo = new AjaxObject('GET', url);\n\n this.xo.once('finish', function(status, text) {\n var info, rtt;\n if (status === 200) {\n rtt = (+new Date()) - t0;\n if (text) {\n try {\n info = JSON3.parse(text);\n } catch (e) {\n debug('bad json', text);\n }\n }\n\n if (!objectUtils.isObject(info)) {\n info = {};\n }\n }\n self.emit('finish', info, rtt);\n self.removeAllListeners();\n });\n}\n\ninherits(InfoAjax, EventEmitter);\n\nInfoAjax.prototype.close = function() {\n this.removeAllListeners();\n this.xo.close();\n};\n\nmodule.exports = InfoAjax;\n\n}).call(this,{ env: {} })\n\n},{\"./utils/object\":49,\"debug\":55,\"events\":3,\"inherits\":57,\"json3\":58}],10:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , EventEmitter = require('events').EventEmitter\n , JSON3 = require('json3')\n , XHRLocalObject = require('./transport/sender/xhr-local')\n , InfoAjax = require('./info-ajax')\n ;\n\nfunction InfoReceiverIframe(transUrl) {\n var self = this;\n EventEmitter.call(this);\n\n this.ir = new InfoAjax(transUrl, XHRLocalObject);\n this.ir.once('finish', function(info, rtt) {\n self.ir = null;\n self.emit('message', JSON3.stringify([info, rtt]));\n });\n}\n\ninherits(InfoReceiverIframe, EventEmitter);\n\nInfoReceiverIframe.transportName = 'iframe-info-receiver';\n\nInfoReceiverIframe.prototype.close = function() {\n if (this.ir) {\n this.ir.close();\n this.ir = null;\n }\n this.removeAllListeners();\n};\n\nmodule.exports = InfoReceiverIframe;\n\n},{\"./info-ajax\":9,\"./transport/sender/xhr-local\":37,\"events\":3,\"inherits\":57,\"json3\":58}],11:[function(require,module,exports){\n(function (process,global){\n'use strict';\n\nvar EventEmitter = require('events').EventEmitter\n , inherits = require('inherits')\n , JSON3 = require('json3')\n , utils = require('./utils/event')\n , IframeTransport = require('./transport/iframe')\n , InfoReceiverIframe = require('./info-iframe-receiver')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:info-iframe');\n}\n\nfunction InfoIframe(baseUrl, url) {\n var self = this;\n EventEmitter.call(this);\n\n var go = function() {\n var ifr = self.ifr = new IframeTransport(InfoReceiverIframe.transportName, url, baseUrl);\n\n ifr.once('message', function(msg) {\n if (msg) {\n var d;\n try {\n d = JSON3.parse(msg);\n } catch (e) {\n debug('bad json', msg);\n self.emit('finish');\n self.close();\n return;\n }\n\n var info = d[0], rtt = d[1];\n self.emit('finish', info, rtt);\n }\n self.close();\n });\n\n ifr.once('close', function() {\n self.emit('finish');\n self.close();\n });\n };\n\n // TODO this seems the same as the 'needBody' from transports\n if (!global.document.body) {\n utils.attachEvent('load', go);\n } else {\n go();\n }\n}\n\ninherits(InfoIframe, EventEmitter);\n\nInfoIframe.enabled = function() {\n return IframeTransport.enabled();\n};\n\nInfoIframe.prototype.close = function() {\n if (this.ifr) {\n this.ifr.close();\n }\n this.removeAllListeners();\n this.ifr = null;\n};\n\nmodule.exports = InfoIframe;\n\n}).call(this,{ env: {} },typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./info-iframe-receiver\":10,\"./transport/iframe\":22,\"./utils/event\":46,\"debug\":55,\"events\":3,\"inherits\":57,\"json3\":58}],12:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar EventEmitter = require('events').EventEmitter\n , inherits = require('inherits')\n , urlUtils = require('./utils/url')\n , XDR = require('./transport/sender/xdr')\n , XHRCors = require('./transport/sender/xhr-cors')\n , XHRLocal = require('./transport/sender/xhr-local')\n , XHRFake = require('./transport/sender/xhr-fake')\n , InfoIframe = require('./info-iframe')\n , InfoAjax = require('./info-ajax')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:info-receiver');\n}\n\nfunction InfoReceiver(baseUrl, urlInfo) {\n debug(baseUrl);\n var self = this;\n EventEmitter.call(this);\n\n setTimeout(function() {\n self.doXhr(baseUrl, urlInfo);\n }, 0);\n}\n\ninherits(InfoReceiver, EventEmitter);\n\n// TODO this is currently ignoring the list of available transports and the whitelist\n\nInfoReceiver._getReceiver = function(baseUrl, url, urlInfo) {\n // determine method of CORS support (if needed)\n if (urlInfo.sameOrigin) {\n return new InfoAjax(url, XHRLocal);\n }\n if (XHRCors.enabled) {\n return new InfoAjax(url, XHRCors);\n }\n if (XDR.enabled && urlInfo.sameScheme) {\n return new InfoAjax(url, XDR);\n }\n if (InfoIframe.enabled()) {\n return new InfoIframe(baseUrl, url);\n }\n return new InfoAjax(url, XHRFake);\n};\n\nInfoReceiver.prototype.doXhr = function(baseUrl, urlInfo) {\n var self = this\n , url = urlUtils.addPath(baseUrl, '/info')\n ;\n debug('doXhr', url);\n\n this.xo = InfoReceiver._getReceiver(baseUrl, url, urlInfo);\n\n this.timeoutRef = setTimeout(function() {\n debug('timeout');\n self._cleanup(false);\n self.emit('finish');\n }, InfoReceiver.timeout);\n\n this.xo.once('finish', function(info, rtt) {\n debug('finish', info, rtt);\n self._cleanup(true);\n self.emit('finish', info, rtt);\n });\n};\n\nInfoReceiver.prototype._cleanup = function(wasClean) {\n debug('_cleanup');\n clearTimeout(this.timeoutRef);\n this.timeoutRef = null;\n if (!wasClean && this.xo) {\n this.xo.close();\n }\n this.xo = null;\n};\n\nInfoReceiver.prototype.close = function() {\n debug('close');\n this.removeAllListeners();\n this._cleanup(false);\n};\n\nInfoReceiver.timeout = 8000;\n\nmodule.exports = InfoReceiver;\n\n}).call(this,{ env: {} })\n\n},{\"./info-ajax\":9,\"./info-iframe\":11,\"./transport/sender/xdr\":34,\"./transport/sender/xhr-cors\":35,\"./transport/sender/xhr-fake\":36,\"./transport/sender/xhr-local\":37,\"./utils/url\":52,\"debug\":55,\"events\":3,\"inherits\":57}],13:[function(require,module,exports){\n(function (global){\n'use strict';\n\nmodule.exports = global.location || {\n origin: 'http://localhost:80'\n, protocol: 'http'\n, host: 'localhost'\n, port: 80\n, href: 'http://localhost/'\n, hash: ''\n};\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],14:[function(require,module,exports){\n(function (process,global){\n'use strict';\n\nrequire('./shims');\n\nvar URL = require('url-parse')\n , inherits = require('inherits')\n , JSON3 = require('json3')\n , random = require('./utils/random')\n , escape = require('./utils/escape')\n , urlUtils = require('./utils/url')\n , eventUtils = require('./utils/event')\n , transport = require('./utils/transport')\n , objectUtils = require('./utils/object')\n , browser = require('./utils/browser')\n , log = require('./utils/log')\n , Event = require('./event/event')\n , EventTarget = require('./event/eventtarget')\n , loc = require('./location')\n , CloseEvent = require('./event/close')\n , TransportMessageEvent = require('./event/trans-message')\n , InfoReceiver = require('./info-receiver')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:main');\n}\n\nvar transports;\n\n// follow constructor steps defined at http://dev.w3.org/html5/websockets/#the-websocket-interface\nfunction SockJS(url, protocols, options) {\n if (!(this instanceof SockJS)) {\n return new SockJS(url, protocols, options);\n }\n if (arguments.length < 1) {\n throw new TypeError(\"Failed to construct 'SockJS: 1 argument required, but only 0 present\");\n }\n EventTarget.call(this);\n\n this.readyState = SockJS.CONNECTING;\n this.extensions = '';\n this.protocol = '';\n\n // non-standard extension\n options = options || {};\n if (options.protocols_whitelist) {\n log.warn(\"'protocols_whitelist' is DEPRECATED. Use 'transports' instead.\");\n }\n this._transportsWhitelist = options.transports;\n this._transportOptions = options.transportOptions || {};\n\n var sessionId = options.sessionId || 8;\n if (typeof sessionId === 'function') {\n this._generateSessionId = sessionId;\n } else if (typeof sessionId === 'number') {\n this._generateSessionId = function() {\n return random.string(sessionId);\n };\n } else {\n throw new TypeError('If sessionId is used in the options, it needs to be a number or a function.');\n }\n\n this._server = options.server || random.numberString(1000);\n\n // Step 1 of WS spec - parse and validate the url. Issue #8\n var parsedUrl = new URL(url);\n if (!parsedUrl.host || !parsedUrl.protocol) {\n throw new SyntaxError(\"The URL '\" + url + \"' is invalid\");\n } else if (parsedUrl.hash) {\n throw new SyntaxError('The URL must not contain a fragment');\n } else if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {\n throw new SyntaxError(\"The URL's scheme must be either 'http:' or 'https:'. '\" + parsedUrl.protocol + \"' is not allowed.\");\n }\n\n var secure = parsedUrl.protocol === 'https:';\n // Step 2 - don't allow secure origin with an insecure protocol\n if (loc.protocol === 'https' && !secure) {\n throw new Error('SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS');\n }\n\n // Step 3 - check port access - no need here\n // Step 4 - parse protocols argument\n if (!protocols) {\n protocols = [];\n } else if (!Array.isArray(protocols)) {\n protocols = [protocols];\n }\n\n // Step 5 - check protocols argument\n var sortedProtocols = protocols.sort();\n sortedProtocols.forEach(function(proto, i) {\n if (!proto) {\n throw new SyntaxError(\"The protocols entry '\" + proto + \"' is invalid.\");\n }\n if (i < (sortedProtocols.length - 1) && proto === sortedProtocols[i + 1]) {\n throw new SyntaxError(\"The protocols entry '\" + proto + \"' is duplicated.\");\n }\n });\n\n // Step 6 - convert origin\n var o = urlUtils.getOrigin(loc.href);\n this._origin = o ? o.toLowerCase() : null;\n\n // remove the trailing slash\n parsedUrl.set('pathname', parsedUrl.pathname.replace(/\\/+$/, ''));\n\n // store the sanitized url\n this.url = parsedUrl.href;\n debug('using url', this.url);\n\n // Step 7 - start connection in background\n // obtain server info\n // http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html#section-26\n this._urlInfo = {\n nullOrigin: !browser.hasDomain()\n , sameOrigin: urlUtils.isOriginEqual(this.url, loc.href)\n , sameScheme: urlUtils.isSchemeEqual(this.url, loc.href)\n };\n\n this._ir = new InfoReceiver(this.url, this._urlInfo);\n this._ir.once('finish', this._receiveInfo.bind(this));\n}\n\ninherits(SockJS, EventTarget);\n\nfunction userSetCode(code) {\n return code === 1000 || (code >= 3000 && code <= 4999);\n}\n\nSockJS.prototype.close = function(code, reason) {\n // Step 1\n if (code && !userSetCode(code)) {\n throw new Error('InvalidAccessError: Invalid code');\n }\n // Step 2.4 states the max is 123 bytes, but we are just checking length\n if (reason && reason.length > 123) {\n throw new SyntaxError('reason argument has an invalid length');\n }\n\n // Step 3.1\n if (this.readyState === SockJS.CLOSING || this.readyState === SockJS.CLOSED) {\n return;\n }\n\n // TODO look at docs to determine how to set this\n var wasClean = true;\n this._close(code || 1000, reason || 'Normal closure', wasClean);\n};\n\nSockJS.prototype.send = function(data) {\n // #13 - convert anything non-string to string\n // TODO this currently turns objects into [object Object]\n if (typeof data !== 'string') {\n data = '' + data;\n }\n if (this.readyState === SockJS.CONNECTING) {\n throw new Error('InvalidStateError: The connection has not been established yet');\n }\n if (this.readyState !== SockJS.OPEN) {\n return;\n }\n this._transport.send(escape.quote(data));\n};\n\nSockJS.version = require('./version');\n\nSockJS.CONNECTING = 0;\nSockJS.OPEN = 1;\nSockJS.CLOSING = 2;\nSockJS.CLOSED = 3;\n\nSockJS.prototype._receiveInfo = function(info, rtt) {\n debug('_receiveInfo', rtt);\n this._ir = null;\n if (!info) {\n this._close(1002, 'Cannot connect to server');\n return;\n }\n\n // establish a round-trip timeout (RTO) based on the\n // round-trip time (RTT)\n this._rto = this.countRTO(rtt);\n // allow server to override url used for the actual transport\n this._transUrl = info.base_url ? info.base_url : this.url;\n info = objectUtils.extend(info, this._urlInfo);\n debug('info', info);\n // determine list of desired and supported transports\n var enabledTransports = transports.filterToEnabled(this._transportsWhitelist, info);\n this._transports = enabledTransports.main;\n debug(this._transports.length + ' enabled transports');\n\n this._connect();\n};\n\nSockJS.prototype._connect = function() {\n for (var Transport = this._transports.shift(); Transport; Transport = this._transports.shift()) {\n debug('attempt', Transport.transportName);\n if (Transport.needBody) {\n if (!global.document.body ||\n (typeof global.document.readyState !== 'undefined' &&\n global.document.readyState !== 'complete' &&\n global.document.readyState !== 'interactive')) {\n debug('waiting for body');\n this._transports.unshift(Transport);\n eventUtils.attachEvent('load', this._connect.bind(this));\n return;\n }\n }\n\n // calculate timeout based on RTO and round trips. Default to 5s\n var timeoutMs = (this._rto * Transport.roundTrips) || 5000;\n this._transportTimeoutId = setTimeout(this._transportTimeout.bind(this), timeoutMs);\n debug('using timeout', timeoutMs);\n\n var transportUrl = urlUtils.addPath(this._transUrl, '/' + this._server + '/' + this._generateSessionId());\n var options = this._transportOptions[Transport.transportName];\n debug('transport url', transportUrl);\n var transportObj = new Transport(transportUrl, this._transUrl, options);\n transportObj.on('message', this._transportMessage.bind(this));\n transportObj.once('close', this._transportClose.bind(this));\n transportObj.transportName = Transport.transportName;\n this._transport = transportObj;\n\n return;\n }\n this._close(2000, 'All transports failed', false);\n};\n\nSockJS.prototype._transportTimeout = function() {\n debug('_transportTimeout');\n if (this.readyState === SockJS.CONNECTING) {\n this._transportClose(2007, 'Transport timed out');\n }\n};\n\nSockJS.prototype._transportMessage = function(msg) {\n debug('_transportMessage', msg);\n var self = this\n , type = msg.slice(0, 1)\n , content = msg.slice(1)\n , payload\n ;\n\n // first check for messages that don't need a payload\n switch (type) {\n case 'o':\n this._open();\n return;\n case 'h':\n this.dispatchEvent(new Event('heartbeat'));\n debug('heartbeat', this.transport);\n return;\n }\n\n if (content) {\n try {\n payload = JSON3.parse(content);\n } catch (e) {\n debug('bad json', content);\n }\n }\n\n if (typeof payload === 'undefined') {\n debug('empty payload', content);\n return;\n }\n\n switch (type) {\n case 'a':\n if (Array.isArray(payload)) {\n payload.forEach(function(p) {\n debug('message', self.transport, p);\n self.dispatchEvent(new TransportMessageEvent(p));\n });\n }\n break;\n case 'm':\n debug('message', this.transport, payload);\n this.dispatchEvent(new TransportMessageEvent(payload));\n break;\n case 'c':\n if (Array.isArray(payload) && payload.length === 2) {\n this._close(payload[0], payload[1], true);\n }\n break;\n }\n};\n\nSockJS.prototype._transportClose = function(code, reason) {\n debug('_transportClose', this.transport, code, reason);\n if (this._transport) {\n this._transport.removeAllListeners();\n this._transport = null;\n this.transport = null;\n }\n\n if (!userSetCode(code) && code !== 2000 && this.readyState === SockJS.CONNECTING) {\n this._connect();\n return;\n }\n\n this._close(code, reason);\n};\n\nSockJS.prototype._open = function() {\n debug('_open', this._transport.transportName, this.readyState);\n if (this.readyState === SockJS.CONNECTING) {\n if (this._transportTimeoutId) {\n clearTimeout(this._transportTimeoutId);\n this._transportTimeoutId = null;\n }\n this.readyState = SockJS.OPEN;\n this.transport = this._transport.transportName;\n this.dispatchEvent(new Event('open'));\n debug('connected', this.transport);\n } else {\n // The server might have been restarted, and lost track of our\n // connection.\n this._close(1006, 'Server lost session');\n }\n};\n\nSockJS.prototype._close = function(code, reason, wasClean) {\n debug('_close', this.transport, code, reason, wasClean, this.readyState);\n var forceFail = false;\n\n if (this._ir) {\n forceFail = true;\n this._ir.close();\n this._ir = null;\n }\n if (this._transport) {\n this._transport.close();\n this._transport = null;\n this.transport = null;\n }\n\n if (this.readyState === SockJS.CLOSED) {\n throw new Error('InvalidStateError: SockJS has already been closed');\n }\n\n this.readyState = SockJS.CLOSING;\n setTimeout(function() {\n this.readyState = SockJS.CLOSED;\n\n if (forceFail) {\n this.dispatchEvent(new Event('error'));\n }\n\n var e = new CloseEvent('close');\n e.wasClean = wasClean || false;\n e.code = code || 1000;\n e.reason = reason;\n\n this.dispatchEvent(e);\n this.onmessage = this.onclose = this.onerror = null;\n debug('disconnected');\n }.bind(this), 0);\n};\n\n// See: http://www.erg.abdn.ac.uk/~gerrit/dccp/notes/ccid2/rto_estimator/\n// and RFC 2988.\nSockJS.prototype.countRTO = function(rtt) {\n // In a local environment, when using IE8/9 and the `jsonp-polling`\n // transport the time needed to establish a connection (the time that pass\n // from the opening of the transport to the call of `_dispatchOpen`) is\n // around 200msec (the lower bound used in the article above) and this\n // causes spurious timeouts. For this reason we calculate a value slightly\n // larger than that used in the article.\n if (rtt > 100) {\n return 4 * rtt; // rto > 400msec\n }\n return 300 + rtt; // 300msec < rto <= 400msec\n};\n\nmodule.exports = function(availableTransports) {\n transports = transport(availableTransports);\n require('./iframe-bootstrap')(SockJS, availableTransports);\n return SockJS;\n};\n\n}).call(this,{ env: {} },typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./event/close\":2,\"./event/event\":4,\"./event/eventtarget\":5,\"./event/trans-message\":6,\"./iframe-bootstrap\":8,\"./info-receiver\":12,\"./location\":13,\"./shims\":15,\"./utils/browser\":44,\"./utils/escape\":45,\"./utils/event\":46,\"./utils/log\":48,\"./utils/object\":49,\"./utils/random\":50,\"./utils/transport\":51,\"./utils/url\":52,\"./version\":53,\"debug\":55,\"inherits\":57,\"json3\":58,\"url-parse\":61}],15:[function(require,module,exports){\n/* eslint-disable */\n/* jscs: disable */\n'use strict';\n\n// pulled specific shims from https://github.com/es-shims/es5-shim\n\nvar ArrayPrototype = Array.prototype;\nvar ObjectPrototype = Object.prototype;\nvar FunctionPrototype = Function.prototype;\nvar StringPrototype = String.prototype;\nvar array_slice = ArrayPrototype.slice;\n\nvar _toString = ObjectPrototype.toString;\nvar isFunction = function (val) {\n return ObjectPrototype.toString.call(val) === '[object Function]';\n};\nvar isArray = function isArray(obj) {\n return _toString.call(obj) === '[object Array]';\n};\nvar isString = function isString(obj) {\n return _toString.call(obj) === '[object String]';\n};\n\nvar supportsDescriptors = Object.defineProperty && (function () {\n try {\n Object.defineProperty({}, 'x', {});\n return true;\n } catch (e) { /* this is ES3 */\n return false;\n }\n}());\n\n// Define configurable, writable and non-enumerable props\n// if they don't exist.\nvar defineProperty;\nif (supportsDescriptors) {\n defineProperty = function (object, name, method, forceAssign) {\n if (!forceAssign && (name in object)) { return; }\n Object.defineProperty(object, name, {\n configurable: true,\n enumerable: false,\n writable: true,\n value: method\n });\n };\n} else {\n defineProperty = function (object, name, method, forceAssign) {\n if (!forceAssign && (name in object)) { return; }\n object[name] = method;\n };\n}\nvar defineProperties = function (object, map, forceAssign) {\n for (var name in map) {\n if (ObjectPrototype.hasOwnProperty.call(map, name)) {\n defineProperty(object, name, map[name], forceAssign);\n }\n }\n};\n\nvar toObject = function (o) {\n if (o == null) { // this matches both null and undefined\n throw new TypeError(\"can't convert \" + o + ' to object');\n }\n return Object(o);\n};\n\n//\n// Util\n// ======\n//\n\n// ES5 9.4\n// http://es5.github.com/#x9.4\n// http://jsperf.com/to-integer\n\nfunction toInteger(num) {\n var n = +num;\n if (n !== n) { // isNaN\n n = 0;\n } else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n return n;\n}\n\nfunction ToUint32(x) {\n return x >>> 0;\n}\n\n//\n// Function\n// ========\n//\n\n// ES-5 15.3.4.5\n// http://es5.github.com/#x15.3.4.5\n\nfunction Empty() {}\n\ndefineProperties(FunctionPrototype, {\n bind: function bind(that) { // .length is 1\n // 1. Let Target be the this value.\n var target = this;\n // 2. If IsCallable(Target) is false, throw a TypeError exception.\n if (!isFunction(target)) {\n throw new TypeError('Function.prototype.bind called on incompatible ' + target);\n }\n // 3. Let A be a new (possibly empty) internal list of all of the\n // argument values provided after thisArg (arg1, arg2 etc), in order.\n // XXX slicedArgs will stand in for \"A\" if used\n var args = array_slice.call(arguments, 1); // for normal call\n // 4. Let F be a new native ECMAScript object.\n // 11. Set the [[Prototype]] internal property of F to the standard\n // built-in Function prototype object as specified in 15.3.3.1.\n // 12. Set the [[Call]] internal property of F as described in\n // 15.3.4.5.1.\n // 13. Set the [[Construct]] internal property of F as described in\n // 15.3.4.5.2.\n // 14. Set the [[HasInstance]] internal property of F as described in\n // 15.3.4.5.3.\n var binder = function () {\n\n if (this instanceof bound) {\n // 15.3.4.5.2 [[Construct]]\n // When the [[Construct]] internal method of a function object,\n // F that was created using the bind function is called with a\n // list of arguments ExtraArgs, the following steps are taken:\n // 1. Let target be the value of F's [[TargetFunction]]\n // internal property.\n // 2. If target has no [[Construct]] internal method, a\n // TypeError exception is thrown.\n // 3. Let boundArgs be the value of F's [[BoundArgs]] internal\n // property.\n // 4. Let args be a new list containing the same values as the\n // list boundArgs in the same order followed by the same\n // values as the list ExtraArgs in the same order.\n // 5. Return the result of calling the [[Construct]] internal\n // method of target providing args as the arguments.\n\n var result = target.apply(\n this,\n args.concat(array_slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n\n } else {\n // 15.3.4.5.1 [[Call]]\n // When the [[Call]] internal method of a function object, F,\n // which was created using the bind function is called with a\n // this value and a list of arguments ExtraArgs, the following\n // steps are taken:\n // 1. Let boundArgs be the value of F's [[BoundArgs]] internal\n // property.\n // 2. Let boundThis be the value of F's [[BoundThis]] internal\n // property.\n // 3. Let target be the value of F's [[TargetFunction]] internal\n // property.\n // 4. Let args be a new list containing the same values as the\n // list boundArgs in the same order followed by the same\n // values as the list ExtraArgs in the same order.\n // 5. Return the result of calling the [[Call]] internal method\n // of target providing boundThis as the this value and\n // providing args as the arguments.\n\n // equiv: target.call(this, ...boundArgs, ...args)\n return target.apply(\n that,\n args.concat(array_slice.call(arguments))\n );\n\n }\n\n };\n\n // 15. If the [[Class]] internal property of Target is \"Function\", then\n // a. Let L be the length property of Target minus the length of A.\n // b. Set the length own property of F to either 0 or L, whichever is\n // larger.\n // 16. Else set the length own property of F to 0.\n\n var boundLength = Math.max(0, target.length - args.length);\n\n // 17. Set the attributes of the length own property of F to the values\n // specified in 15.3.5.1.\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n // XXX Build a dynamic function with desired amount of arguments is the only\n // way to set the length property of a function.\n // In environments where Content Security Policies enabled (Chrome extensions,\n // for ex.) all use of eval or Function costructor throws an exception.\n // However in all of these environments Function.prototype.bind exists\n // and so this code will never be executed.\n var bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder);\n\n if (target.prototype) {\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n // Clean up dangling references.\n Empty.prototype = null;\n }\n\n // TODO\n // 18. Set the [[Extensible]] internal property of F to true.\n\n // TODO\n // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).\n // 20. Call the [[DefineOwnProperty]] internal method of F with\n // arguments \"caller\", PropertyDescriptor {[[Get]]: thrower, [[Set]]:\n // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and\n // false.\n // 21. Call the [[DefineOwnProperty]] internal method of F with\n // arguments \"arguments\", PropertyDescriptor {[[Get]]: thrower,\n // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},\n // and false.\n\n // TODO\n // NOTE Function objects created using Function.prototype.bind do not\n // have a prototype property or the [[Code]], [[FormalParameters]], and\n // [[Scope]] internal properties.\n // XXX can't delete prototype in pure-js.\n\n // 22. Return F.\n return bound;\n }\n});\n\n//\n// Array\n// =====\n//\n\n// ES5 15.4.3.2\n// http://es5.github.com/#x15.4.3.2\n// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray\ndefineProperties(Array, { isArray: isArray });\n\n\nvar boxedString = Object('a');\nvar splitString = boxedString[0] !== 'a' || !(0 in boxedString);\n\nvar properlyBoxesContext = function properlyBoxed(method) {\n // Check node 0.6.21 bug where third parameter is not boxed\n var properlyBoxesNonStrict = true;\n var properlyBoxesStrict = true;\n if (method) {\n method.call('foo', function (_, __, context) {\n if (typeof context !== 'object') { properlyBoxesNonStrict = false; }\n });\n\n method.call([1], function () {\n 'use strict';\n properlyBoxesStrict = typeof this === 'string';\n }, 'x');\n }\n return !!method && properlyBoxesNonStrict && properlyBoxesStrict;\n};\n\ndefineProperties(ArrayPrototype, {\n forEach: function forEach(fun /*, thisp*/) {\n var object = toObject(this),\n self = splitString && isString(this) ? this.split('') : object,\n thisp = arguments[1],\n i = -1,\n length = self.length >>> 0;\n\n // If no callback function or if callback is not a callable function\n if (!isFunction(fun)) {\n throw new TypeError(); // TODO message\n }\n\n while (++i < length) {\n if (i in self) {\n // Invoke the callback function with call, passing arguments:\n // context, property value, property key, thisArg object\n // context\n fun.call(thisp, self[i], i, object);\n }\n }\n }\n}, !properlyBoxesContext(ArrayPrototype.forEach));\n\n// ES5 15.4.4.14\n// http://es5.github.com/#x15.4.4.14\n// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf\nvar hasFirefox2IndexOfBug = Array.prototype.indexOf && [0, 1].indexOf(1, 2) !== -1;\ndefineProperties(ArrayPrototype, {\n indexOf: function indexOf(sought /*, fromIndex */ ) {\n var self = splitString && isString(this) ? this.split('') : toObject(this),\n length = self.length >>> 0;\n\n if (!length) {\n return -1;\n }\n\n var i = 0;\n if (arguments.length > 1) {\n i = toInteger(arguments[1]);\n }\n\n // handle negative indices\n i = i >= 0 ? i : Math.max(0, length + i);\n for (; i < length; i++) {\n if (i in self && self[i] === sought) {\n return i;\n }\n }\n return -1;\n }\n}, hasFirefox2IndexOfBug);\n\n//\n// String\n// ======\n//\n\n// ES5 15.5.4.14\n// http://es5.github.com/#x15.5.4.14\n\n// [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers]\n// Many browsers do not split properly with regular expressions or they\n// do not perform the split correctly under obscure conditions.\n// See http://blog.stevenlevithan.com/archives/cross-browser-split\n// I've tested in many browsers and this seems to cover the deviant ones:\n// 'ab'.split(/(?:ab)*/) should be [\"\", \"\"], not [\"\"]\n// '.'.split(/(.?)(.?)/) should be [\"\", \".\", \"\", \"\"], not [\"\", \"\"]\n// 'tesst'.split(/(s)*/) should be [\"t\", undefined, \"e\", \"s\", \"t\"], not\n// [undefined, \"t\", undefined, \"e\", ...]\n// ''.split(/.?/) should be [], not [\"\"]\n// '.'.split(/()()/) should be [\".\"], not [\"\", \"\", \".\"]\n\nvar string_split = StringPrototype.split;\nif (\n 'ab'.split(/(?:ab)*/).length !== 2 ||\n '.'.split(/(.?)(.?)/).length !== 4 ||\n 'tesst'.split(/(s)*/)[1] === 't' ||\n 'test'.split(/(?:)/, -1).length !== 4 ||\n ''.split(/.?/).length ||\n '.'.split(/()()/).length > 1\n) {\n (function () {\n var compliantExecNpcg = /()??/.exec('')[1] === void 0; // NPCG: nonparticipating capturing group\n\n StringPrototype.split = function (separator, limit) {\n var string = this;\n if (separator === void 0 && limit === 0) {\n return [];\n }\n\n // If `separator` is not a regex, use native split\n if (_toString.call(separator) !== '[object RegExp]') {\n return string_split.call(this, separator, limit);\n }\n\n var output = [],\n flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.extended ? 'x' : '') + // Proposed for ES6\n (separator.sticky ? 'y' : ''), // Firefox 3+\n lastLastIndex = 0,\n // Make `global` and avoid `lastIndex` issues by working with a copy\n separator2, match, lastIndex, lastLength;\n separator = new RegExp(separator.source, flags + 'g');\n string += ''; // Type-convert\n if (!compliantExecNpcg) {\n // Doesn't need flags gy, but they don't hurt\n separator2 = new RegExp('^' + separator.source + '$(?!\\\\s)', flags);\n }\n /* Values for `limit`, per the spec:\n * If undefined: 4294967295 // Math.pow(2, 32) - 1\n * If 0, Infinity, or NaN: 0\n * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;\n * If negative number: 4294967296 - Math.floor(Math.abs(limit))\n * If other: Type-convert, then use the above rules\n */\n limit = limit === void 0 ?\n -1 >>> 0 : // Math.pow(2, 32) - 1\n ToUint32(limit);\n while (match = separator.exec(string)) {\n // `separator.lastIndex` is not reliable cross-browser\n lastIndex = match.index + match[0].length;\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n // Fix browsers whose `exec` methods don't consistently return `undefined` for\n // nonparticipating capturing groups\n if (!compliantExecNpcg && match.length > 1) {\n match[0].replace(separator2, function () {\n for (var i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === void 0) {\n match[i] = void 0;\n }\n }\n });\n }\n if (match.length > 1 && match.index < string.length) {\n ArrayPrototype.push.apply(output, match.slice(1));\n }\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= limit) {\n break;\n }\n }\n if (separator.lastIndex === match.index) {\n separator.lastIndex++; // Avoid an infinite loop\n }\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !separator.test('')) {\n output.push('');\n }\n } else {\n output.push(string.slice(lastLastIndex));\n }\n return output.length > limit ? output.slice(0, limit) : output;\n };\n }());\n\n// [bugfix, chrome]\n// If separator is undefined, then the result array contains just one String,\n// which is the this value (converted to a String). If limit is not undefined,\n// then the output array is truncated so that it contains no more than limit\n// elements.\n// \"0\".split(undefined, 0) -> []\n} else if ('0'.split(void 0, 0).length) {\n StringPrototype.split = function split(separator, limit) {\n if (separator === void 0 && limit === 0) { return []; }\n return string_split.call(this, separator, limit);\n };\n}\n\n// ECMA-262, 3rd B.2.3\n// Not an ECMAScript standard, although ECMAScript 3rd Edition has a\n// non-normative section suggesting uniform semantics and it should be\n// normalized across all browsers\n// [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE\nvar string_substr = StringPrototype.substr;\nvar hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b';\ndefineProperties(StringPrototype, {\n substr: function substr(start, length) {\n return string_substr.call(\n this,\n start < 0 ? ((start = this.length + start) < 0 ? 0 : start) : start,\n length\n );\n }\n}, hasNegativeSubstrBug);\n\n},{}],16:[function(require,module,exports){\n'use strict';\n\nmodule.exports = [\n // streaming transports\n require('./transport/websocket')\n, require('./transport/xhr-streaming')\n, require('./transport/xdr-streaming')\n, require('./transport/eventsource')\n, require('./transport/lib/iframe-wrap')(require('./transport/eventsource'))\n\n // polling transports\n, require('./transport/htmlfile')\n, require('./transport/lib/iframe-wrap')(require('./transport/htmlfile'))\n, require('./transport/xhr-polling')\n, require('./transport/xdr-polling')\n, require('./transport/lib/iframe-wrap')(require('./transport/xhr-polling'))\n, require('./transport/jsonp-polling')\n];\n\n},{\"./transport/eventsource\":20,\"./transport/htmlfile\":21,\"./transport/jsonp-polling\":23,\"./transport/lib/iframe-wrap\":26,\"./transport/websocket\":38,\"./transport/xdr-polling\":39,\"./transport/xdr-streaming\":40,\"./transport/xhr-polling\":41,\"./transport/xhr-streaming\":42}],17:[function(require,module,exports){\n(function (process,global){\n'use strict';\n\nvar EventEmitter = require('events').EventEmitter\n , inherits = require('inherits')\n , utils = require('../../utils/event')\n , urlUtils = require('../../utils/url')\n , XHR = global.XMLHttpRequest\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:browser:xhr');\n}\n\nfunction AbstractXHRObject(method, url, payload, opts) {\n debug(method, url);\n var self = this;\n EventEmitter.call(this);\n\n setTimeout(function () {\n self._start(method, url, payload, opts);\n }, 0);\n}\n\ninherits(AbstractXHRObject, EventEmitter);\n\nAbstractXHRObject.prototype._start = function(method, url, payload, opts) {\n var self = this;\n\n try {\n this.xhr = new XHR();\n } catch (x) {\n // intentionally empty\n }\n\n if (!this.xhr) {\n debug('no xhr');\n this.emit('finish', 0, 'no xhr support');\n this._cleanup();\n return;\n }\n\n // several browsers cache POSTs\n url = urlUtils.addQuery(url, 't=' + (+new Date()));\n\n // Explorer tends to keep connection open, even after the\n // tab gets closed: http://bugs.jquery.com/ticket/5280\n this.unloadRef = utils.unloadAdd(function() {\n debug('unload cleanup');\n self._cleanup(true);\n });\n try {\n this.xhr.open(method, url, true);\n if (this.timeout && 'timeout' in this.xhr) {\n this.xhr.timeout = this.timeout;\n this.xhr.ontimeout = function() {\n debug('xhr timeout');\n self.emit('finish', 0, '');\n self._cleanup(false);\n };\n }\n } catch (e) {\n debug('exception', e);\n // IE raises an exception on wrong port.\n this.emit('finish', 0, '');\n this._cleanup(false);\n return;\n }\n\n if ((!opts || !opts.noCredentials) && AbstractXHRObject.supportsCORS) {\n debug('withCredentials');\n // Mozilla docs says https://developer.mozilla.org/en/XMLHttpRequest :\n // \"This never affects same-site requests.\"\n\n this.xhr.withCredentials = 'true';\n }\n if (opts && opts.headers) {\n for (var key in opts.headers) {\n this.xhr.setRequestHeader(key, opts.headers[key]);\n }\n }\n\n this.xhr.onreadystatechange = function() {\n if (self.xhr) {\n var x = self.xhr;\n var text, status;\n debug('readyState', x.readyState);\n switch (x.readyState) {\n case 3:\n // IE doesn't like peeking into responseText or status\n // on Microsoft.XMLHTTP and readystate=3\n try {\n status = x.status;\n text = x.responseText;\n } catch (e) {\n // intentionally empty\n }\n debug('status', status);\n // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450\n if (status === 1223) {\n status = 204;\n }\n\n // IE does return readystate == 3 for 404 answers.\n if (status === 200 && text && text.length > 0) {\n debug('chunk');\n self.emit('chunk', status, text);\n }\n break;\n case 4:\n status = x.status;\n debug('status', status);\n // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450\n if (status === 1223) {\n status = 204;\n }\n // IE returns this for a bad port\n // http://msdn.microsoft.com/en-us/library/windows/desktop/aa383770(v=vs.85).aspx\n if (status === 12005 || status === 12029) {\n status = 0;\n }\n\n debug('finish', status, x.responseText);\n self.emit('finish', status, x.responseText);\n self._cleanup(false);\n break;\n }\n }\n };\n\n try {\n self.xhr.send(payload);\n } catch (e) {\n self.emit('finish', 0, '');\n self._cleanup(false);\n }\n};\n\nAbstractXHRObject.prototype._cleanup = function(abort) {\n debug('cleanup');\n if (!this.xhr) {\n return;\n }\n this.removeAllListeners();\n utils.unloadDel(this.unloadRef);\n\n // IE needs this field to be a function\n this.xhr.onreadystatechange = function() {};\n if (this.xhr.ontimeout) {\n this.xhr.ontimeout = null;\n }\n\n if (abort) {\n try {\n this.xhr.abort();\n } catch (x) {\n // intentionally empty\n }\n }\n this.unloadRef = this.xhr = null;\n};\n\nAbstractXHRObject.prototype.close = function() {\n debug('close');\n this._cleanup(true);\n};\n\nAbstractXHRObject.enabled = !!XHR;\n// override XMLHttpRequest for IE6/7\n// obfuscate to avoid firewalls\nvar axo = ['Active'].concat('Object').join('X');\nif (!AbstractXHRObject.enabled && (axo in global)) {\n debug('overriding xmlhttprequest');\n XHR = function() {\n try {\n return new global[axo]('Microsoft.XMLHTTP');\n } catch (e) {\n return null;\n }\n };\n AbstractXHRObject.enabled = !!new XHR();\n}\n\nvar cors = false;\ntry {\n cors = 'withCredentials' in new XHR();\n} catch (ignored) {\n // intentionally empty\n}\n\nAbstractXHRObject.supportsCORS = cors;\n\nmodule.exports = AbstractXHRObject;\n\n}).call(this,{ env: {} },typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../../utils/event\":46,\"../../utils/url\":52,\"debug\":55,\"events\":3,\"inherits\":57}],18:[function(require,module,exports){\n(function (global){\nmodule.exports = global.EventSource;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],19:[function(require,module,exports){\n(function (global){\n'use strict';\n\nvar Driver = global.WebSocket || global.MozWebSocket;\nif (Driver) {\n\tmodule.exports = function WebSocketBrowserDriver(url) {\n\t\treturn new Driver(url);\n\t};\n} else {\n\tmodule.exports = undefined;\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],20:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , AjaxBasedTransport = require('./lib/ajax-based')\n , EventSourceReceiver = require('./receiver/eventsource')\n , XHRCorsObject = require('./sender/xhr-cors')\n , EventSourceDriver = require('eventsource')\n ;\n\nfunction EventSourceTransport(transUrl) {\n if (!EventSourceTransport.enabled()) {\n throw new Error('Transport created when disabled');\n }\n\n AjaxBasedTransport.call(this, transUrl, '/eventsource', EventSourceReceiver, XHRCorsObject);\n}\n\ninherits(EventSourceTransport, AjaxBasedTransport);\n\nEventSourceTransport.enabled = function() {\n return !!EventSourceDriver;\n};\n\nEventSourceTransport.transportName = 'eventsource';\nEventSourceTransport.roundTrips = 2;\n\nmodule.exports = EventSourceTransport;\n\n},{\"./lib/ajax-based\":24,\"./receiver/eventsource\":29,\"./sender/xhr-cors\":35,\"eventsource\":18,\"inherits\":57}],21:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , HtmlfileReceiver = require('./receiver/htmlfile')\n , XHRLocalObject = require('./sender/xhr-local')\n , AjaxBasedTransport = require('./lib/ajax-based')\n ;\n\nfunction HtmlFileTransport(transUrl) {\n if (!HtmlfileReceiver.enabled) {\n throw new Error('Transport created when disabled');\n }\n AjaxBasedTransport.call(this, transUrl, '/htmlfile', HtmlfileReceiver, XHRLocalObject);\n}\n\ninherits(HtmlFileTransport, AjaxBasedTransport);\n\nHtmlFileTransport.enabled = function(info) {\n return HtmlfileReceiver.enabled && info.sameOrigin;\n};\n\nHtmlFileTransport.transportName = 'htmlfile';\nHtmlFileTransport.roundTrips = 2;\n\nmodule.exports = HtmlFileTransport;\n\n},{\"./lib/ajax-based\":24,\"./receiver/htmlfile\":30,\"./sender/xhr-local\":37,\"inherits\":57}],22:[function(require,module,exports){\n(function (process){\n'use strict';\n\n// Few cool transports do work only for same-origin. In order to make\n// them work cross-domain we shall use iframe, served from the\n// remote domain. New browsers have capabilities to communicate with\n// cross domain iframe using postMessage(). In IE it was implemented\n// from IE 8+, but of course, IE got some details wrong:\n// http://msdn.microsoft.com/en-us/library/cc197015(v=VS.85).aspx\n// http://stevesouders.com/misc/test-postmessage.php\n\nvar inherits = require('inherits')\n , JSON3 = require('json3')\n , EventEmitter = require('events').EventEmitter\n , version = require('../version')\n , urlUtils = require('../utils/url')\n , iframeUtils = require('../utils/iframe')\n , eventUtils = require('../utils/event')\n , random = require('../utils/random')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:transport:iframe');\n}\n\nfunction IframeTransport(transport, transUrl, baseUrl) {\n if (!IframeTransport.enabled()) {\n throw new Error('Transport created when disabled');\n }\n EventEmitter.call(this);\n\n var self = this;\n this.origin = urlUtils.getOrigin(baseUrl);\n this.baseUrl = baseUrl;\n this.transUrl = transUrl;\n this.transport = transport;\n this.windowId = random.string(8);\n\n var iframeUrl = urlUtils.addPath(baseUrl, '/iframe.html') + '#' + this.windowId;\n debug(transport, transUrl, iframeUrl);\n\n this.iframeObj = iframeUtils.createIframe(iframeUrl, function(r) {\n debug('err callback');\n self.emit('close', 1006, 'Unable to load an iframe (' + r + ')');\n self.close();\n });\n\n this.onmessageCallback = this._message.bind(this);\n eventUtils.attachEvent('message', this.onmessageCallback);\n}\n\ninherits(IframeTransport, EventEmitter);\n\nIframeTransport.prototype.close = function() {\n debug('close');\n this.removeAllListeners();\n if (this.iframeObj) {\n eventUtils.detachEvent('message', this.onmessageCallback);\n try {\n // When the iframe is not loaded, IE raises an exception\n // on 'contentWindow'.\n this.postMessage('c');\n } catch (x) {\n // intentionally empty\n }\n this.iframeObj.cleanup();\n this.iframeObj = null;\n this.onmessageCallback = this.iframeObj = null;\n }\n};\n\nIframeTransport.prototype._message = function(e) {\n debug('message', e.data);\n if (!urlUtils.isOriginEqual(e.origin, this.origin)) {\n debug('not same origin', e.origin, this.origin);\n return;\n }\n\n var iframeMessage;\n try {\n iframeMessage = JSON3.parse(e.data);\n } catch (ignored) {\n debug('bad json', e.data);\n return;\n }\n\n if (iframeMessage.windowId !== this.windowId) {\n debug('mismatched window id', iframeMessage.windowId, this.windowId);\n return;\n }\n\n switch (iframeMessage.type) {\n case 's':\n this.iframeObj.loaded();\n // window global dependency\n this.postMessage('s', JSON3.stringify([\n version\n , this.transport\n , this.transUrl\n , this.baseUrl\n ]));\n break;\n case 't':\n this.emit('message', iframeMessage.data);\n break;\n case 'c':\n var cdata;\n try {\n cdata = JSON3.parse(iframeMessage.data);\n } catch (ignored) {\n debug('bad json', iframeMessage.data);\n return;\n }\n this.emit('close', cdata[0], cdata[1]);\n this.close();\n break;\n }\n};\n\nIframeTransport.prototype.postMessage = function(type, data) {\n debug('postMessage', type, data);\n this.iframeObj.post(JSON3.stringify({\n windowId: this.windowId\n , type: type\n , data: data || ''\n }), this.origin);\n};\n\nIframeTransport.prototype.send = function(message) {\n debug('send', message);\n this.postMessage('m', message);\n};\n\nIframeTransport.enabled = function() {\n return iframeUtils.iframeEnabled;\n};\n\nIframeTransport.transportName = 'iframe';\nIframeTransport.roundTrips = 2;\n\nmodule.exports = IframeTransport;\n\n}).call(this,{ env: {} })\n\n},{\"../utils/event\":46,\"../utils/iframe\":47,\"../utils/random\":50,\"../utils/url\":52,\"../version\":53,\"debug\":55,\"events\":3,\"inherits\":57,\"json3\":58}],23:[function(require,module,exports){\n(function (global){\n'use strict';\n\n// The simplest and most robust transport, using the well-know cross\n// domain hack - JSONP. This transport is quite inefficient - one\n// message could use up to one http request. But at least it works almost\n// everywhere.\n// Known limitations:\n// o you will get a spinning cursor\n// o for Konqueror a dumb timer is needed to detect errors\n\nvar inherits = require('inherits')\n , SenderReceiver = require('./lib/sender-receiver')\n , JsonpReceiver = require('./receiver/jsonp')\n , jsonpSender = require('./sender/jsonp')\n ;\n\nfunction JsonPTransport(transUrl) {\n if (!JsonPTransport.enabled()) {\n throw new Error('Transport created when disabled');\n }\n SenderReceiver.call(this, transUrl, '/jsonp', jsonpSender, JsonpReceiver);\n}\n\ninherits(JsonPTransport, SenderReceiver);\n\nJsonPTransport.enabled = function() {\n return !!global.document;\n};\n\nJsonPTransport.transportName = 'jsonp-polling';\nJsonPTransport.roundTrips = 1;\nJsonPTransport.needBody = true;\n\nmodule.exports = JsonPTransport;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./lib/sender-receiver\":28,\"./receiver/jsonp\":31,\"./sender/jsonp\":33,\"inherits\":57}],24:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar inherits = require('inherits')\n , urlUtils = require('../../utils/url')\n , SenderReceiver = require('./sender-receiver')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:ajax-based');\n}\n\nfunction createAjaxSender(AjaxObject) {\n return function(url, payload, callback) {\n debug('create ajax sender', url, payload);\n var opt = {};\n if (typeof payload === 'string') {\n opt.headers = {'Content-type': 'text/plain'};\n }\n var ajaxUrl = urlUtils.addPath(url, '/xhr_send');\n var xo = new AjaxObject('POST', ajaxUrl, payload, opt);\n xo.once('finish', function(status) {\n debug('finish', status);\n xo = null;\n\n if (status !== 200 && status !== 204) {\n return callback(new Error('http status ' + status));\n }\n callback();\n });\n return function() {\n debug('abort');\n xo.close();\n xo = null;\n\n var err = new Error('Aborted');\n err.code = 1000;\n callback(err);\n };\n };\n}\n\nfunction AjaxBasedTransport(transUrl, urlSuffix, Receiver, AjaxObject) {\n SenderReceiver.call(this, transUrl, urlSuffix, createAjaxSender(AjaxObject), Receiver, AjaxObject);\n}\n\ninherits(AjaxBasedTransport, SenderReceiver);\n\nmodule.exports = AjaxBasedTransport;\n\n}).call(this,{ env: {} })\n\n},{\"../../utils/url\":52,\"./sender-receiver\":28,\"debug\":55,\"inherits\":57}],25:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar inherits = require('inherits')\n , EventEmitter = require('events').EventEmitter\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:buffered-sender');\n}\n\nfunction BufferedSender(url, sender) {\n debug(url);\n EventEmitter.call(this);\n this.sendBuffer = [];\n this.sender = sender;\n this.url = url;\n}\n\ninherits(BufferedSender, EventEmitter);\n\nBufferedSender.prototype.send = function(message) {\n debug('send', message);\n this.sendBuffer.push(message);\n if (!this.sendStop) {\n this.sendSchedule();\n }\n};\n\n// For polling transports in a situation when in the message callback,\n// new message is being send. If the sending connection was started\n// before receiving one, it is possible to saturate the network and\n// timeout due to the lack of receiving socket. To avoid that we delay\n// sending messages by some small time, in order to let receiving\n// connection be started beforehand. This is only a halfmeasure and\n// does not fix the big problem, but it does make the tests go more\n// stable on slow networks.\nBufferedSender.prototype.sendScheduleWait = function() {\n debug('sendScheduleWait');\n var self = this;\n var tref;\n this.sendStop = function() {\n debug('sendStop');\n self.sendStop = null;\n clearTimeout(tref);\n };\n tref = setTimeout(function() {\n debug('timeout');\n self.sendStop = null;\n self.sendSchedule();\n }, 25);\n};\n\nBufferedSender.prototype.sendSchedule = function() {\n debug('sendSchedule', this.sendBuffer.length);\n var self = this;\n if (this.sendBuffer.length > 0) {\n var payload = '[' + this.sendBuffer.join(',') + ']';\n this.sendStop = this.sender(this.url, payload, function(err) {\n self.sendStop = null;\n if (err) {\n debug('error', err);\n self.emit('close', err.code || 1006, 'Sending error: ' + err);\n self.close();\n } else {\n self.sendScheduleWait();\n }\n });\n this.sendBuffer = [];\n }\n};\n\nBufferedSender.prototype._cleanup = function() {\n debug('_cleanup');\n this.removeAllListeners();\n};\n\nBufferedSender.prototype.close = function() {\n debug('close');\n this._cleanup();\n if (this.sendStop) {\n this.sendStop();\n this.sendStop = null;\n }\n};\n\nmodule.exports = BufferedSender;\n\n}).call(this,{ env: {} })\n\n},{\"debug\":55,\"events\":3,\"inherits\":57}],26:[function(require,module,exports){\n(function (global){\n'use strict';\n\nvar inherits = require('inherits')\n , IframeTransport = require('../iframe')\n , objectUtils = require('../../utils/object')\n ;\n\nmodule.exports = function(transport) {\n\n function IframeWrapTransport(transUrl, baseUrl) {\n IframeTransport.call(this, transport.transportName, transUrl, baseUrl);\n }\n\n inherits(IframeWrapTransport, IframeTransport);\n\n IframeWrapTransport.enabled = function(url, info) {\n if (!global.document) {\n return false;\n }\n\n var iframeInfo = objectUtils.extend({}, info);\n iframeInfo.sameOrigin = true;\n return transport.enabled(iframeInfo) && IframeTransport.enabled();\n };\n\n IframeWrapTransport.transportName = 'iframe-' + transport.transportName;\n IframeWrapTransport.needBody = true;\n IframeWrapTransport.roundTrips = IframeTransport.roundTrips + transport.roundTrips - 1; // html, javascript (2) + transport - no CORS (1)\n\n IframeWrapTransport.facadeTransport = transport;\n\n return IframeWrapTransport;\n};\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../../utils/object\":49,\"../iframe\":22,\"inherits\":57}],27:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar inherits = require('inherits')\n , EventEmitter = require('events').EventEmitter\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:polling');\n}\n\nfunction Polling(Receiver, receiveUrl, AjaxObject) {\n debug(receiveUrl);\n EventEmitter.call(this);\n this.Receiver = Receiver;\n this.receiveUrl = receiveUrl;\n this.AjaxObject = AjaxObject;\n this._scheduleReceiver();\n}\n\ninherits(Polling, EventEmitter);\n\nPolling.prototype._scheduleReceiver = function() {\n debug('_scheduleReceiver');\n var self = this;\n var poll = this.poll = new this.Receiver(this.receiveUrl, this.AjaxObject);\n\n poll.on('message', function(msg) {\n debug('message', msg);\n self.emit('message', msg);\n });\n\n poll.once('close', function(code, reason) {\n debug('close', code, reason, self.pollIsClosing);\n self.poll = poll = null;\n\n if (!self.pollIsClosing) {\n if (reason === 'network') {\n self._scheduleReceiver();\n } else {\n self.emit('close', code || 1006, reason);\n self.removeAllListeners();\n }\n }\n });\n};\n\nPolling.prototype.abort = function() {\n debug('abort');\n this.removeAllListeners();\n this.pollIsClosing = true;\n if (this.poll) {\n this.poll.abort();\n }\n};\n\nmodule.exports = Polling;\n\n}).call(this,{ env: {} })\n\n},{\"debug\":55,\"events\":3,\"inherits\":57}],28:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar inherits = require('inherits')\n , urlUtils = require('../../utils/url')\n , BufferedSender = require('./buffered-sender')\n , Polling = require('./polling')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:sender-receiver');\n}\n\nfunction SenderReceiver(transUrl, urlSuffix, senderFunc, Receiver, AjaxObject) {\n var pollUrl = urlUtils.addPath(transUrl, urlSuffix);\n debug(pollUrl);\n var self = this;\n BufferedSender.call(this, transUrl, senderFunc);\n\n this.poll = new Polling(Receiver, pollUrl, AjaxObject);\n this.poll.on('message', function(msg) {\n debug('poll message', msg);\n self.emit('message', msg);\n });\n this.poll.once('close', function(code, reason) {\n debug('poll close', code, reason);\n self.poll = null;\n self.emit('close', code, reason);\n self.close();\n });\n}\n\ninherits(SenderReceiver, BufferedSender);\n\nSenderReceiver.prototype.close = function() {\n BufferedSender.prototype.close.call(this);\n debug('close');\n this.removeAllListeners();\n if (this.poll) {\n this.poll.abort();\n this.poll = null;\n }\n};\n\nmodule.exports = SenderReceiver;\n\n}).call(this,{ env: {} })\n\n},{\"../../utils/url\":52,\"./buffered-sender\":25,\"./polling\":27,\"debug\":55,\"inherits\":57}],29:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar inherits = require('inherits')\n , EventEmitter = require('events').EventEmitter\n , EventSourceDriver = require('eventsource')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:receiver:eventsource');\n}\n\nfunction EventSourceReceiver(url) {\n debug(url);\n EventEmitter.call(this);\n\n var self = this;\n var es = this.es = new EventSourceDriver(url);\n es.onmessage = function(e) {\n debug('message', e.data);\n self.emit('message', decodeURI(e.data));\n };\n es.onerror = function(e) {\n debug('error', es.readyState, e);\n // ES on reconnection has readyState = 0 or 1.\n // on network error it's CLOSED = 2\n var reason = (es.readyState !== 2 ? 'network' : 'permanent');\n self._cleanup();\n self._close(reason);\n };\n}\n\ninherits(EventSourceReceiver, EventEmitter);\n\nEventSourceReceiver.prototype.abort = function() {\n debug('abort');\n this._cleanup();\n this._close('user');\n};\n\nEventSourceReceiver.prototype._cleanup = function() {\n debug('cleanup');\n var es = this.es;\n if (es) {\n es.onmessage = es.onerror = null;\n es.close();\n this.es = null;\n }\n};\n\nEventSourceReceiver.prototype._close = function(reason) {\n debug('close', reason);\n var self = this;\n // Safari and chrome < 15 crash if we close window before\n // waiting for ES cleanup. See:\n // https://code.google.com/p/chromium/issues/detail?id=89155\n setTimeout(function() {\n self.emit('close', null, reason);\n self.removeAllListeners();\n }, 200);\n};\n\nmodule.exports = EventSourceReceiver;\n\n}).call(this,{ env: {} })\n\n},{\"debug\":55,\"events\":3,\"eventsource\":18,\"inherits\":57}],30:[function(require,module,exports){\n(function (process,global){\n'use strict';\n\nvar inherits = require('inherits')\n , iframeUtils = require('../../utils/iframe')\n , urlUtils = require('../../utils/url')\n , EventEmitter = require('events').EventEmitter\n , random = require('../../utils/random')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:receiver:htmlfile');\n}\n\nfunction HtmlfileReceiver(url) {\n debug(url);\n EventEmitter.call(this);\n var self = this;\n iframeUtils.polluteGlobalNamespace();\n\n this.id = 'a' + random.string(6);\n url = urlUtils.addQuery(url, 'c=' + decodeURIComponent(iframeUtils.WPrefix + '.' + this.id));\n\n debug('using htmlfile', HtmlfileReceiver.htmlfileEnabled);\n var constructFunc = HtmlfileReceiver.htmlfileEnabled ?\n iframeUtils.createHtmlfile : iframeUtils.createIframe;\n\n global[iframeUtils.WPrefix][this.id] = {\n start: function() {\n debug('start');\n self.iframeObj.loaded();\n }\n , message: function(data) {\n debug('message', data);\n self.emit('message', data);\n }\n , stop: function() {\n debug('stop');\n self._cleanup();\n self._close('network');\n }\n };\n this.iframeObj = constructFunc(url, function() {\n debug('callback');\n self._cleanup();\n self._close('permanent');\n });\n}\n\ninherits(HtmlfileReceiver, EventEmitter);\n\nHtmlfileReceiver.prototype.abort = function() {\n debug('abort');\n this._cleanup();\n this._close('user');\n};\n\nHtmlfileReceiver.prototype._cleanup = function() {\n debug('_cleanup');\n if (this.iframeObj) {\n this.iframeObj.cleanup();\n this.iframeObj = null;\n }\n delete global[iframeUtils.WPrefix][this.id];\n};\n\nHtmlfileReceiver.prototype._close = function(reason) {\n debug('_close', reason);\n this.emit('close', null, reason);\n this.removeAllListeners();\n};\n\nHtmlfileReceiver.htmlfileEnabled = false;\n\n// obfuscate to avoid firewalls\nvar axo = ['Active'].concat('Object').join('X');\nif (axo in global) {\n try {\n HtmlfileReceiver.htmlfileEnabled = !!new global[axo]('htmlfile');\n } catch (x) {\n // intentionally empty\n }\n}\n\nHtmlfileReceiver.enabled = HtmlfileReceiver.htmlfileEnabled || iframeUtils.iframeEnabled;\n\nmodule.exports = HtmlfileReceiver;\n\n}).call(this,{ env: {} },typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../../utils/iframe\":47,\"../../utils/random\":50,\"../../utils/url\":52,\"debug\":55,\"events\":3,\"inherits\":57}],31:[function(require,module,exports){\n(function (process,global){\n'use strict';\n\nvar utils = require('../../utils/iframe')\n , random = require('../../utils/random')\n , browser = require('../../utils/browser')\n , urlUtils = require('../../utils/url')\n , inherits = require('inherits')\n , EventEmitter = require('events').EventEmitter\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:receiver:jsonp');\n}\n\nfunction JsonpReceiver(url) {\n debug(url);\n var self = this;\n EventEmitter.call(this);\n\n utils.polluteGlobalNamespace();\n\n this.id = 'a' + random.string(6);\n var urlWithId = urlUtils.addQuery(url, 'c=' + encodeURIComponent(utils.WPrefix + '.' + this.id));\n\n global[utils.WPrefix][this.id] = this._callback.bind(this);\n this._createScript(urlWithId);\n\n // Fallback mostly for Konqueror - stupid timer, 35 seconds shall be plenty.\n this.timeoutId = setTimeout(function() {\n debug('timeout');\n self._abort(new Error('JSONP script loaded abnormally (timeout)'));\n }, JsonpReceiver.timeout);\n}\n\ninherits(JsonpReceiver, EventEmitter);\n\nJsonpReceiver.prototype.abort = function() {\n debug('abort');\n if (global[utils.WPrefix][this.id]) {\n var err = new Error('JSONP user aborted read');\n err.code = 1000;\n this._abort(err);\n }\n};\n\nJsonpReceiver.timeout = 35000;\nJsonpReceiver.scriptErrorTimeout = 1000;\n\nJsonpReceiver.prototype._callback = function(data) {\n debug('_callback', data);\n this._cleanup();\n\n if (this.aborting) {\n return;\n }\n\n if (data) {\n debug('message', data);\n this.emit('message', data);\n }\n this.emit('close', null, 'network');\n this.removeAllListeners();\n};\n\nJsonpReceiver.prototype._abort = function(err) {\n debug('_abort', err);\n this._cleanup();\n this.aborting = true;\n this.emit('close', err.code, err.message);\n this.removeAllListeners();\n};\n\nJsonpReceiver.prototype._cleanup = function() {\n debug('_cleanup');\n clearTimeout(this.timeoutId);\n if (this.script2) {\n this.script2.parentNode.removeChild(this.script2);\n this.script2 = null;\n }\n if (this.script) {\n var script = this.script;\n // Unfortunately, you can't really abort script loading of\n // the script.\n script.parentNode.removeChild(script);\n script.onreadystatechange = script.onerror =\n script.onload = script.onclick = null;\n this.script = null;\n }\n delete global[utils.WPrefix][this.id];\n};\n\nJsonpReceiver.prototype._scriptError = function() {\n debug('_scriptError');\n var self = this;\n if (this.errorTimer) {\n return;\n }\n\n this.errorTimer = setTimeout(function() {\n if (!self.loadedOkay) {\n self._abort(new Error('JSONP script loaded abnormally (onerror)'));\n }\n }, JsonpReceiver.scriptErrorTimeout);\n};\n\nJsonpReceiver.prototype._createScript = function(url) {\n debug('_createScript', url);\n var self = this;\n var script = this.script = global.document.createElement('script');\n var script2; // Opera synchronous load trick.\n\n script.id = 'a' + random.string(8);\n script.src = url;\n script.type = 'text/javascript';\n script.charset = 'UTF-8';\n script.onerror = this._scriptError.bind(this);\n script.onload = function() {\n debug('onload');\n self._abort(new Error('JSONP script loaded abnormally (onload)'));\n };\n\n // IE9 fires 'error' event after onreadystatechange or before, in random order.\n // Use loadedOkay to determine if actually errored\n script.onreadystatechange = function() {\n debug('onreadystatechange', script.readyState);\n if (/loaded|closed/.test(script.readyState)) {\n if (script && script.htmlFor && script.onclick) {\n self.loadedOkay = true;\n try {\n // In IE, actually execute the script.\n script.onclick();\n } catch (x) {\n // intentionally empty\n }\n }\n if (script) {\n self._abort(new Error('JSONP script loaded abnormally (onreadystatechange)'));\n }\n }\n };\n // IE: event/htmlFor/onclick trick.\n // One can't rely on proper order for onreadystatechange. In order to\n // make sure, set a 'htmlFor' and 'event' properties, so that\n // script code will be installed as 'onclick' handler for the\n // script object. Later, onreadystatechange, manually execute this\n // code. FF and Chrome doesn't work with 'event' and 'htmlFor'\n // set. For reference see:\n // http://jaubourg.net/2010/07/loading-script-as-onclick-handler-of.html\n // Also, read on that about script ordering:\n // http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order\n if (typeof script.async === 'undefined' && global.document.attachEvent) {\n // According to mozilla docs, in recent browsers script.async defaults\n // to 'true', so we may use it to detect a good browser:\n // https://developer.mozilla.org/en/HTML/Element/script\n if (!browser.isOpera()) {\n // Naively assume we're in IE\n try {\n script.htmlFor = script.id;\n script.event = 'onclick';\n } catch (x) {\n // intentionally empty\n }\n script.async = true;\n } else {\n // Opera, second sync script hack\n script2 = this.script2 = global.document.createElement('script');\n script2.text = \"try{var a = document.getElementById('\" + script.id + \"'); if(a)a.onerror();}catch(x){};\";\n script.async = script2.async = false;\n }\n }\n if (typeof script.async !== 'undefined') {\n script.async = true;\n }\n\n var head = global.document.getElementsByTagName('head')[0];\n head.insertBefore(script, head.firstChild);\n if (script2) {\n head.insertBefore(script2, head.firstChild);\n }\n};\n\nmodule.exports = JsonpReceiver;\n\n}).call(this,{ env: {} },typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../../utils/browser\":44,\"../../utils/iframe\":47,\"../../utils/random\":50,\"../../utils/url\":52,\"debug\":55,\"events\":3,\"inherits\":57}],32:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar inherits = require('inherits')\n , EventEmitter = require('events').EventEmitter\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:receiver:xhr');\n}\n\nfunction XhrReceiver(url, AjaxObject) {\n debug(url);\n EventEmitter.call(this);\n var self = this;\n\n this.bufferPosition = 0;\n\n this.xo = new AjaxObject('POST', url, null);\n this.xo.on('chunk', this._chunkHandler.bind(this));\n this.xo.once('finish', function(status, text) {\n debug('finish', status, text);\n self._chunkHandler(status, text);\n self.xo = null;\n var reason = status === 200 ? 'network' : 'permanent';\n debug('close', reason);\n self.emit('close', null, reason);\n self._cleanup();\n });\n}\n\ninherits(XhrReceiver, EventEmitter);\n\nXhrReceiver.prototype._chunkHandler = function(status, text) {\n debug('_chunkHandler', status);\n if (status !== 200 || !text) {\n return;\n }\n\n for (var idx = -1; ; this.bufferPosition += idx + 1) {\n var buf = text.slice(this.bufferPosition);\n idx = buf.indexOf('\\n');\n if (idx === -1) {\n break;\n }\n var msg = buf.slice(0, idx);\n if (msg) {\n debug('message', msg);\n this.emit('message', msg);\n }\n }\n};\n\nXhrReceiver.prototype._cleanup = function() {\n debug('_cleanup');\n this.removeAllListeners();\n};\n\nXhrReceiver.prototype.abort = function() {\n debug('abort');\n if (this.xo) {\n this.xo.close();\n debug('close');\n this.emit('close', null, 'user');\n this.xo = null;\n }\n this._cleanup();\n};\n\nmodule.exports = XhrReceiver;\n\n}).call(this,{ env: {} })\n\n},{\"debug\":55,\"events\":3,\"inherits\":57}],33:[function(require,module,exports){\n(function (process,global){\n'use strict';\n\nvar random = require('../../utils/random')\n , urlUtils = require('../../utils/url')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:sender:jsonp');\n}\n\nvar form, area;\n\nfunction createIframe(id) {\n debug('createIframe', id);\n try {\n // ie6 dynamic iframes with target=\"\" support (thanks Chris Lambacher)\n return global.document.createElement('<iframe name=\"' + id + '\">');\n } catch (x) {\n var iframe = global.document.createElement('iframe');\n iframe.name = id;\n return iframe;\n }\n}\n\nfunction createForm() {\n debug('createForm');\n form = global.document.createElement('form');\n form.style.display = 'none';\n form.style.position = 'absolute';\n form.method = 'POST';\n form.enctype = 'application/x-www-form-urlencoded';\n form.acceptCharset = 'UTF-8';\n\n area = global.document.createElement('textarea');\n area.name = 'd';\n form.appendChild(area);\n\n global.document.body.appendChild(form);\n}\n\nmodule.exports = function(url, payload, callback) {\n debug(url, payload);\n if (!form) {\n createForm();\n }\n var id = 'a' + random.string(8);\n form.target = id;\n form.action = urlUtils.addQuery(urlUtils.addPath(url, '/jsonp_send'), 'i=' + id);\n\n var iframe = createIframe(id);\n iframe.id = id;\n iframe.style.display = 'none';\n form.appendChild(iframe);\n\n try {\n area.value = payload;\n } catch (e) {\n // seriously broken browsers get here\n }\n form.submit();\n\n var completed = function(err) {\n debug('completed', id, err);\n if (!iframe.onerror) {\n return;\n }\n iframe.onreadystatechange = iframe.onerror = iframe.onload = null;\n // Opera mini doesn't like if we GC iframe\n // immediately, thus this timeout.\n setTimeout(function() {\n debug('cleaning up', id);\n iframe.parentNode.removeChild(iframe);\n iframe = null;\n }, 500);\n area.value = '';\n // It is not possible to detect if the iframe succeeded or\n // failed to submit our form.\n callback(err);\n };\n iframe.onerror = function() {\n debug('onerror', id);\n completed();\n };\n iframe.onload = function() {\n debug('onload', id);\n completed();\n };\n iframe.onreadystatechange = function(e) {\n debug('onreadystatechange', id, iframe.readyState, e);\n if (iframe.readyState === 'complete') {\n completed();\n }\n };\n return function() {\n debug('aborted', id);\n completed(new Error('Aborted'));\n };\n};\n\n}).call(this,{ env: {} },typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../../utils/random\":50,\"../../utils/url\":52,\"debug\":55}],34:[function(require,module,exports){\n(function (process,global){\n'use strict';\n\nvar EventEmitter = require('events').EventEmitter\n , inherits = require('inherits')\n , eventUtils = require('../../utils/event')\n , browser = require('../../utils/browser')\n , urlUtils = require('../../utils/url')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:sender:xdr');\n}\n\n// References:\n// http://ajaxian.com/archives/100-line-ajax-wrapper\n// http://msdn.microsoft.com/en-us/library/cc288060(v=VS.85).aspx\n\nfunction XDRObject(method, url, payload) {\n debug(method, url);\n var self = this;\n EventEmitter.call(this);\n\n setTimeout(function() {\n self._start(method, url, payload);\n }, 0);\n}\n\ninherits(XDRObject, EventEmitter);\n\nXDRObject.prototype._start = function(method, url, payload) {\n debug('_start');\n var self = this;\n var xdr = new global.XDomainRequest();\n // IE caches even POSTs\n url = urlUtils.addQuery(url, 't=' + (+new Date()));\n\n xdr.onerror = function() {\n debug('onerror');\n self._error();\n };\n xdr.ontimeout = function() {\n debug('ontimeout');\n self._error();\n };\n xdr.onprogress = function() {\n debug('progress', xdr.responseText);\n self.emit('chunk', 200, xdr.responseText);\n };\n xdr.onload = function() {\n debug('load');\n self.emit('finish', 200, xdr.responseText);\n self._cleanup(false);\n };\n this.xdr = xdr;\n this.unloadRef = eventUtils.unloadAdd(function() {\n self._cleanup(true);\n });\n try {\n // Fails with AccessDenied if port number is bogus\n this.xdr.open(method, url);\n if (this.timeout) {\n this.xdr.timeout = this.timeout;\n }\n this.xdr.send(payload);\n } catch (x) {\n this._error();\n }\n};\n\nXDRObject.prototype._error = function() {\n this.emit('finish', 0, '');\n this._cleanup(false);\n};\n\nXDRObject.prototype._cleanup = function(abort) {\n debug('cleanup', abort);\n if (!this.xdr) {\n return;\n }\n this.removeAllListeners();\n eventUtils.unloadDel(this.unloadRef);\n\n this.xdr.ontimeout = this.xdr.onerror = this.xdr.onprogress = this.xdr.onload = null;\n if (abort) {\n try {\n this.xdr.abort();\n } catch (x) {\n // intentionally empty\n }\n }\n this.unloadRef = this.xdr = null;\n};\n\nXDRObject.prototype.close = function() {\n debug('close');\n this._cleanup(true);\n};\n\n// IE 8/9 if the request target uses the same scheme - #79\nXDRObject.enabled = !!(global.XDomainRequest && browser.hasDomain());\n\nmodule.exports = XDRObject;\n\n}).call(this,{ env: {} },typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../../utils/browser\":44,\"../../utils/event\":46,\"../../utils/url\":52,\"debug\":55,\"events\":3,\"inherits\":57}],35:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , XhrDriver = require('../driver/xhr')\n ;\n\nfunction XHRCorsObject(method, url, payload, opts) {\n XhrDriver.call(this, method, url, payload, opts);\n}\n\ninherits(XHRCorsObject, XhrDriver);\n\nXHRCorsObject.enabled = XhrDriver.enabled && XhrDriver.supportsCORS;\n\nmodule.exports = XHRCorsObject;\n\n},{\"../driver/xhr\":17,\"inherits\":57}],36:[function(require,module,exports){\n'use strict';\n\nvar EventEmitter = require('events').EventEmitter\n , inherits = require('inherits')\n ;\n\nfunction XHRFake(/* method, url, payload, opts */) {\n var self = this;\n EventEmitter.call(this);\n\n this.to = setTimeout(function() {\n self.emit('finish', 200, '{}');\n }, XHRFake.timeout);\n}\n\ninherits(XHRFake, EventEmitter);\n\nXHRFake.prototype.close = function() {\n clearTimeout(this.to);\n};\n\nXHRFake.timeout = 2000;\n\nmodule.exports = XHRFake;\n\n},{\"events\":3,\"inherits\":57}],37:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , XhrDriver = require('../driver/xhr')\n ;\n\nfunction XHRLocalObject(method, url, payload /*, opts */) {\n XhrDriver.call(this, method, url, payload, {\n noCredentials: true\n });\n}\n\ninherits(XHRLocalObject, XhrDriver);\n\nXHRLocalObject.enabled = XhrDriver.enabled;\n\nmodule.exports = XHRLocalObject;\n\n},{\"../driver/xhr\":17,\"inherits\":57}],38:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar utils = require('../utils/event')\n , urlUtils = require('../utils/url')\n , inherits = require('inherits')\n , EventEmitter = require('events').EventEmitter\n , WebsocketDriver = require('./driver/websocket')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:websocket');\n}\n\nfunction WebSocketTransport(transUrl, ignore, options) {\n if (!WebSocketTransport.enabled()) {\n throw new Error('Transport created when disabled');\n }\n\n EventEmitter.call(this);\n debug('constructor', transUrl);\n\n var self = this;\n var url = urlUtils.addPath(transUrl, '/websocket');\n if (url.slice(0, 5) === 'https') {\n url = 'wss' + url.slice(5);\n } else {\n url = 'ws' + url.slice(4);\n }\n this.url = url;\n\n this.ws = new WebsocketDriver(this.url, [], options);\n this.ws.onmessage = function(e) {\n debug('message event', e.data);\n self.emit('message', e.data);\n };\n // Firefox has an interesting bug. If a websocket connection is\n // created after onunload, it stays alive even when user\n // navigates away from the page. In such situation let's lie -\n // let's not open the ws connection at all. See:\n // https://github.com/sockjs/sockjs-client/issues/28\n // https://bugzilla.mozilla.org/show_bug.cgi?id=696085\n this.unloadRef = utils.unloadAdd(function() {\n debug('unload');\n self.ws.close();\n });\n this.ws.onclose = function(e) {\n debug('close event', e.code, e.reason);\n self.emit('close', e.code, e.reason);\n self._cleanup();\n };\n this.ws.onerror = function(e) {\n debug('error event', e);\n self.emit('close', 1006, 'WebSocket connection broken');\n self._cleanup();\n };\n}\n\ninherits(WebSocketTransport, EventEmitter);\n\nWebSocketTransport.prototype.send = function(data) {\n var msg = '[' + data + ']';\n debug('send', msg);\n this.ws.send(msg);\n};\n\nWebSocketTransport.prototype.close = function() {\n debug('close');\n var ws = this.ws;\n this._cleanup();\n if (ws) {\n ws.close();\n }\n};\n\nWebSocketTransport.prototype._cleanup = function() {\n debug('_cleanup');\n var ws = this.ws;\n if (ws) {\n ws.onmessage = ws.onclose = ws.onerror = null;\n }\n utils.unloadDel(this.unloadRef);\n this.unloadRef = this.ws = null;\n this.removeAllListeners();\n};\n\nWebSocketTransport.enabled = function() {\n debug('enabled');\n return !!WebsocketDriver;\n};\nWebSocketTransport.transportName = 'websocket';\n\n// In theory, ws should require 1 round trip. But in chrome, this is\n// not very stable over SSL. Most likely a ws connection requires a\n// separate SSL connection, in which case 2 round trips are an\n// absolute minumum.\nWebSocketTransport.roundTrips = 2;\n\nmodule.exports = WebSocketTransport;\n\n}).call(this,{ env: {} })\n\n},{\"../utils/event\":46,\"../utils/url\":52,\"./driver/websocket\":19,\"debug\":55,\"events\":3,\"inherits\":57}],39:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , AjaxBasedTransport = require('./lib/ajax-based')\n , XdrStreamingTransport = require('./xdr-streaming')\n , XhrReceiver = require('./receiver/xhr')\n , XDRObject = require('./sender/xdr')\n ;\n\nfunction XdrPollingTransport(transUrl) {\n if (!XDRObject.enabled) {\n throw new Error('Transport created when disabled');\n }\n AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XDRObject);\n}\n\ninherits(XdrPollingTransport, AjaxBasedTransport);\n\nXdrPollingTransport.enabled = XdrStreamingTransport.enabled;\nXdrPollingTransport.transportName = 'xdr-polling';\nXdrPollingTransport.roundTrips = 2; // preflight, ajax\n\nmodule.exports = XdrPollingTransport;\n\n},{\"./lib/ajax-based\":24,\"./receiver/xhr\":32,\"./sender/xdr\":34,\"./xdr-streaming\":40,\"inherits\":57}],40:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , AjaxBasedTransport = require('./lib/ajax-based')\n , XhrReceiver = require('./receiver/xhr')\n , XDRObject = require('./sender/xdr')\n ;\n\n// According to:\n// http://stackoverflow.com/questions/1641507/detect-browser-support-for-cross-domain-xmlhttprequests\n// http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/\n\nfunction XdrStreamingTransport(transUrl) {\n if (!XDRObject.enabled) {\n throw new Error('Transport created when disabled');\n }\n AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XDRObject);\n}\n\ninherits(XdrStreamingTransport, AjaxBasedTransport);\n\nXdrStreamingTransport.enabled = function(info) {\n if (info.cookie_needed || info.nullOrigin) {\n return false;\n }\n return XDRObject.enabled && info.sameScheme;\n};\n\nXdrStreamingTransport.transportName = 'xdr-streaming';\nXdrStreamingTransport.roundTrips = 2; // preflight, ajax\n\nmodule.exports = XdrStreamingTransport;\n\n},{\"./lib/ajax-based\":24,\"./receiver/xhr\":32,\"./sender/xdr\":34,\"inherits\":57}],41:[function(require,module,exports){\n'use strict';\n\nvar inherits = require('inherits')\n , AjaxBasedTransport = require('./lib/ajax-based')\n , XhrReceiver = require('./receiver/xhr')\n , XHRCorsObject = require('./sender/xhr-cors')\n , XHRLocalObject = require('./sender/xhr-local')\n ;\n\nfunction XhrPollingTransport(transUrl) {\n if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {\n throw new Error('Transport created when disabled');\n }\n AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XHRCorsObject);\n}\n\ninherits(XhrPollingTransport, AjaxBasedTransport);\n\nXhrPollingTransport.enabled = function(info) {\n if (info.nullOrigin) {\n return false;\n }\n\n if (XHRLocalObject.enabled && info.sameOrigin) {\n return true;\n }\n return XHRCorsObject.enabled;\n};\n\nXhrPollingTransport.transportName = 'xhr-polling';\nXhrPollingTransport.roundTrips = 2; // preflight, ajax\n\nmodule.exports = XhrPollingTransport;\n\n},{\"./lib/ajax-based\":24,\"./receiver/xhr\":32,\"./sender/xhr-cors\":35,\"./sender/xhr-local\":37,\"inherits\":57}],42:[function(require,module,exports){\n(function (global){\n'use strict';\n\nvar inherits = require('inherits')\n , AjaxBasedTransport = require('./lib/ajax-based')\n , XhrReceiver = require('./receiver/xhr')\n , XHRCorsObject = require('./sender/xhr-cors')\n , XHRLocalObject = require('./sender/xhr-local')\n , browser = require('../utils/browser')\n ;\n\nfunction XhrStreamingTransport(transUrl) {\n if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {\n throw new Error('Transport created when disabled');\n }\n AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XHRCorsObject);\n}\n\ninherits(XhrStreamingTransport, AjaxBasedTransport);\n\nXhrStreamingTransport.enabled = function(info) {\n if (info.nullOrigin) {\n return false;\n }\n // Opera doesn't support xhr-streaming #60\n // But it might be able to #92\n if (browser.isOpera()) {\n return false;\n }\n\n return XHRCorsObject.enabled;\n};\n\nXhrStreamingTransport.transportName = 'xhr-streaming';\nXhrStreamingTransport.roundTrips = 2; // preflight, ajax\n\n// Safari gets confused when a streaming ajax request is started\n// before onload. This causes the load indicator to spin indefinetely.\n// Only require body when used in a browser\nXhrStreamingTransport.needBody = !!global.document;\n\nmodule.exports = XhrStreamingTransport;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../utils/browser\":44,\"./lib/ajax-based\":24,\"./receiver/xhr\":32,\"./sender/xhr-cors\":35,\"./sender/xhr-local\":37,\"inherits\":57}],43:[function(require,module,exports){\n(function (global){\n'use strict';\n\nif (global.crypto && global.crypto.getRandomValues) {\n module.exports.randomBytes = function(length) {\n var bytes = new Uint8Array(length);\n global.crypto.getRandomValues(bytes);\n return bytes;\n };\n} else {\n module.exports.randomBytes = function(length) {\n var bytes = new Array(length);\n for (var i = 0; i < length; i++) {\n bytes[i] = Math.floor(Math.random() * 256);\n }\n return bytes;\n };\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],44:[function(require,module,exports){\n(function (global){\n'use strict';\n\nmodule.exports = {\n isOpera: function() {\n return global.navigator &&\n /opera/i.test(global.navigator.userAgent);\n }\n\n, isKonqueror: function() {\n return global.navigator &&\n /konqueror/i.test(global.navigator.userAgent);\n }\n\n // #187 wrap document.domain in try/catch because of WP8 from file:///\n, hasDomain: function () {\n // non-browser client always has a domain\n if (!global.document) {\n return true;\n }\n\n try {\n return !!global.document.domain;\n } catch (e) {\n return false;\n }\n }\n};\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],45:[function(require,module,exports){\n'use strict';\n\nvar JSON3 = require('json3');\n\n// Some extra characters that Chrome gets wrong, and substitutes with\n// something else on the wire.\n// eslint-disable-next-line no-control-regex\nvar extraEscapable = /[\\x00-\\x1f\\ud800-\\udfff\\ufffe\\uffff\\u0300-\\u0333\\u033d-\\u0346\\u034a-\\u034c\\u0350-\\u0352\\u0357-\\u0358\\u035c-\\u0362\\u0374\\u037e\\u0387\\u0591-\\u05af\\u05c4\\u0610-\\u0617\\u0653-\\u0654\\u0657-\\u065b\\u065d-\\u065e\\u06df-\\u06e2\\u06eb-\\u06ec\\u0730\\u0732-\\u0733\\u0735-\\u0736\\u073a\\u073d\\u073f-\\u0741\\u0743\\u0745\\u0747\\u07eb-\\u07f1\\u0951\\u0958-\\u095f\\u09dc-\\u09dd\\u09df\\u0a33\\u0a36\\u0a59-\\u0a5b\\u0a5e\\u0b5c-\\u0b5d\\u0e38-\\u0e39\\u0f43\\u0f4d\\u0f52\\u0f57\\u0f5c\\u0f69\\u0f72-\\u0f76\\u0f78\\u0f80-\\u0f83\\u0f93\\u0f9d\\u0fa2\\u0fa7\\u0fac\\u0fb9\\u1939-\\u193a\\u1a17\\u1b6b\\u1cda-\\u1cdb\\u1dc0-\\u1dcf\\u1dfc\\u1dfe\\u1f71\\u1f73\\u1f75\\u1f77\\u1f79\\u1f7b\\u1f7d\\u1fbb\\u1fbe\\u1fc9\\u1fcb\\u1fd3\\u1fdb\\u1fe3\\u1feb\\u1fee-\\u1fef\\u1ff9\\u1ffb\\u1ffd\\u2000-\\u2001\\u20d0-\\u20d1\\u20d4-\\u20d7\\u20e7-\\u20e9\\u2126\\u212a-\\u212b\\u2329-\\u232a\\u2adc\\u302b-\\u302c\\uaab2-\\uaab3\\uf900-\\ufa0d\\ufa10\\ufa12\\ufa15-\\ufa1e\\ufa20\\ufa22\\ufa25-\\ufa26\\ufa2a-\\ufa2d\\ufa30-\\ufa6d\\ufa70-\\ufad9\\ufb1d\\ufb1f\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40-\\ufb41\\ufb43-\\ufb44\\ufb46-\\ufb4e\\ufff0-\\uffff]/g\n , extraLookup;\n\n// This may be quite slow, so let's delay until user actually uses bad\n// characters.\nvar unrollLookup = function(escapable) {\n var i;\n var unrolled = {};\n var c = [];\n for (i = 0; i < 65536; i++) {\n c.push( String.fromCharCode(i) );\n }\n escapable.lastIndex = 0;\n c.join('').replace(escapable, function(a) {\n unrolled[ a ] = '\\\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n return '';\n });\n escapable.lastIndex = 0;\n return unrolled;\n};\n\n// Quote string, also taking care of unicode characters that browsers\n// often break. Especially, take care of unicode surrogates:\n// http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates\nmodule.exports = {\n quote: function(string) {\n var quoted = JSON3.stringify(string);\n\n // In most cases this should be very fast and good enough.\n extraEscapable.lastIndex = 0;\n if (!extraEscapable.test(quoted)) {\n return quoted;\n }\n\n if (!extraLookup) {\n extraLookup = unrollLookup(extraEscapable);\n }\n\n return quoted.replace(extraEscapable, function(a) {\n return extraLookup[a];\n });\n }\n};\n\n},{\"json3\":58}],46:[function(require,module,exports){\n(function (global){\n'use strict';\n\nvar random = require('./random');\n\nvar onUnload = {}\n , afterUnload = false\n // detect google chrome packaged apps because they don't allow the 'unload' event\n , isChromePackagedApp = global.chrome && global.chrome.app && global.chrome.app.runtime\n ;\n\nmodule.exports = {\n attachEvent: function(event, listener) {\n if (typeof global.addEventListener !== 'undefined') {\n global.addEventListener(event, listener, false);\n } else if (global.document && global.attachEvent) {\n // IE quirks.\n // According to: http://stevesouders.com/misc/test-postmessage.php\n // the message gets delivered only to 'document', not 'window'.\n global.document.attachEvent('on' + event, listener);\n // I get 'window' for ie8.\n global.attachEvent('on' + event, listener);\n }\n }\n\n, detachEvent: function(event, listener) {\n if (typeof global.addEventListener !== 'undefined') {\n global.removeEventListener(event, listener, false);\n } else if (global.document && global.detachEvent) {\n global.document.detachEvent('on' + event, listener);\n global.detachEvent('on' + event, listener);\n }\n }\n\n, unloadAdd: function(listener) {\n if (isChromePackagedApp) {\n return null;\n }\n\n var ref = random.string(8);\n onUnload[ref] = listener;\n if (afterUnload) {\n setTimeout(this.triggerUnloadCallbacks, 0);\n }\n return ref;\n }\n\n, unloadDel: function(ref) {\n if (ref in onUnload) {\n delete onUnload[ref];\n }\n }\n\n, triggerUnloadCallbacks: function() {\n for (var ref in onUnload) {\n onUnload[ref]();\n delete onUnload[ref];\n }\n }\n};\n\nvar unloadTriggered = function() {\n if (afterUnload) {\n return;\n }\n afterUnload = true;\n module.exports.triggerUnloadCallbacks();\n};\n\n// 'unload' alone is not reliable in opera within an iframe, but we\n// can't use `beforeunload` as IE fires it on javascript: links.\nif (!isChromePackagedApp) {\n module.exports.attachEvent('unload', unloadTriggered);\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./random\":50}],47:[function(require,module,exports){\n(function (process,global){\n'use strict';\n\nvar eventUtils = require('./event')\n , JSON3 = require('json3')\n , browser = require('./browser')\n ;\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:utils:iframe');\n}\n\nmodule.exports = {\n WPrefix: '_jp'\n, currentWindowId: null\n\n, polluteGlobalNamespace: function() {\n if (!(module.exports.WPrefix in global)) {\n global[module.exports.WPrefix] = {};\n }\n }\n\n, postMessage: function(type, data) {\n if (global.parent !== global) {\n global.parent.postMessage(JSON3.stringify({\n windowId: module.exports.currentWindowId\n , type: type\n , data: data || ''\n }), '*');\n } else {\n debug('Cannot postMessage, no parent window.', type, data);\n }\n }\n\n, createIframe: function(iframeUrl, errorCallback) {\n var iframe = global.document.createElement('iframe');\n var tref, unloadRef;\n var unattach = function() {\n debug('unattach');\n clearTimeout(tref);\n // Explorer had problems with that.\n try {\n iframe.onload = null;\n } catch (x) {\n // intentionally empty\n }\n iframe.onerror = null;\n };\n var cleanup = function() {\n debug('cleanup');\n if (iframe) {\n unattach();\n // This timeout makes chrome fire onbeforeunload event\n // within iframe. Without the timeout it goes straight to\n // onunload.\n setTimeout(function() {\n if (iframe) {\n iframe.parentNode.removeChild(iframe);\n }\n iframe = null;\n }, 0);\n eventUtils.unloadDel(unloadRef);\n }\n };\n var onerror = function(err) {\n debug('onerror', err);\n if (iframe) {\n cleanup();\n errorCallback(err);\n }\n };\n var post = function(msg, origin) {\n debug('post', msg, origin);\n try {\n // When the iframe is not loaded, IE raises an exception\n // on 'contentWindow'.\n setTimeout(function() {\n if (iframe && iframe.contentWindow) {\n iframe.contentWindow.postMessage(msg, origin);\n }\n }, 0);\n } catch (x) {\n // intentionally empty\n }\n };\n\n iframe.src = iframeUrl;\n iframe.style.display = 'none';\n iframe.style.position = 'absolute';\n iframe.onerror = function() {\n onerror('onerror');\n };\n iframe.onload = function() {\n debug('onload');\n // `onload` is triggered before scripts on the iframe are\n // executed. Give it few seconds to actually load stuff.\n clearTimeout(tref);\n tref = setTimeout(function() {\n onerror('onload timeout');\n }, 2000);\n };\n global.document.body.appendChild(iframe);\n tref = setTimeout(function() {\n onerror('timeout');\n }, 15000);\n unloadRef = eventUtils.unloadAdd(cleanup);\n return {\n post: post\n , cleanup: cleanup\n , loaded: unattach\n };\n }\n\n/* eslint no-undef: \"off\", new-cap: \"off\" */\n, createHtmlfile: function(iframeUrl, errorCallback) {\n var axo = ['Active'].concat('Object').join('X');\n var doc = new global[axo]('htmlfile');\n var tref, unloadRef;\n var iframe;\n var unattach = function() {\n clearTimeout(tref);\n iframe.onerror = null;\n };\n var cleanup = function() {\n if (doc) {\n unattach();\n eventUtils.unloadDel(unloadRef);\n iframe.parentNode.removeChild(iframe);\n iframe = doc = null;\n CollectGarbage();\n }\n };\n var onerror = function(r) {\n debug('onerror', r);\n if (doc) {\n cleanup();\n errorCallback(r);\n }\n };\n var post = function(msg, origin) {\n try {\n // When the iframe is not loaded, IE raises an exception\n // on 'contentWindow'.\n setTimeout(function() {\n if (iframe && iframe.contentWindow) {\n iframe.contentWindow.postMessage(msg, origin);\n }\n }, 0);\n } catch (x) {\n // intentionally empty\n }\n };\n\n doc.open();\n doc.write('<html><s' + 'cript>' +\n 'document.domain=\"' + global.document.domain + '\";' +\n '</s' + 'cript></html>');\n doc.close();\n doc.parentWindow[module.exports.WPrefix] = global[module.exports.WPrefix];\n var c = doc.createElement('div');\n doc.body.appendChild(c);\n iframe = doc.createElement('iframe');\n c.appendChild(iframe);\n iframe.src = iframeUrl;\n iframe.onerror = function() {\n onerror('onerror');\n };\n tref = setTimeout(function() {\n onerror('timeout');\n }, 15000);\n unloadRef = eventUtils.unloadAdd(cleanup);\n return {\n post: post\n , cleanup: cleanup\n , loaded: unattach\n };\n }\n};\n\nmodule.exports.iframeEnabled = false;\nif (global.document) {\n // postMessage misbehaves in konqueror 4.6.5 - the messages are delivered with\n // huge delay, or not at all.\n module.exports.iframeEnabled = (typeof global.postMessage === 'function' ||\n typeof global.postMessage === 'object') && (!browser.isKonqueror());\n}\n\n}).call(this,{ env: {} },typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./browser\":44,\"./event\":46,\"debug\":55,\"json3\":58}],48:[function(require,module,exports){\n(function (global){\n'use strict';\n\nvar logObject = {};\n['log', 'debug', 'warn'].forEach(function (level) {\n var levelExists;\n\n try {\n levelExists = global.console && global.console[level] && global.console[level].apply;\n } catch(e) {\n // do nothing\n }\n\n logObject[level] = levelExists ? function () {\n return global.console[level].apply(global.console, arguments);\n } : (level === 'log' ? function () {} : logObject.log);\n});\n\nmodule.exports = logObject;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],49:[function(require,module,exports){\n'use strict';\n\nmodule.exports = {\n isObject: function(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n }\n\n, extend: function(obj) {\n if (!this.isObject(obj)) {\n return obj;\n }\n var source, prop;\n for (var i = 1, length = arguments.length; i < length; i++) {\n source = arguments[i];\n for (prop in source) {\n if (Object.prototype.hasOwnProperty.call(source, prop)) {\n obj[prop] = source[prop];\n }\n }\n }\n return obj;\n }\n};\n\n},{}],50:[function(require,module,exports){\n'use strict';\n\n/* global crypto:true */\nvar crypto = require('crypto');\n\n// This string has length 32, a power of 2, so the modulus doesn't introduce a\n// bias.\nvar _randomStringChars = 'abcdefghijklmnopqrstuvwxyz012345';\nmodule.exports = {\n string: function(length) {\n var max = _randomStringChars.length;\n var bytes = crypto.randomBytes(length);\n var ret = [];\n for (var i = 0; i < length; i++) {\n ret.push(_randomStringChars.substr(bytes[i] % max, 1));\n }\n return ret.join('');\n }\n\n, number: function(max) {\n return Math.floor(Math.random() * max);\n }\n\n, numberString: function(max) {\n var t = ('' + (max - 1)).length;\n var p = new Array(t + 1).join('0');\n return (p + this.number(max)).slice(-t);\n }\n};\n\n},{\"crypto\":43}],51:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:utils:transport');\n}\n\nmodule.exports = function(availableTransports) {\n return {\n filterToEnabled: function(transportsWhitelist, info) {\n var transports = {\n main: []\n , facade: []\n };\n if (!transportsWhitelist) {\n transportsWhitelist = [];\n } else if (typeof transportsWhitelist === 'string') {\n transportsWhitelist = [transportsWhitelist];\n }\n\n availableTransports.forEach(function(trans) {\n if (!trans) {\n return;\n }\n\n if (trans.transportName === 'websocket' && info.websocket === false) {\n debug('disabled from server', 'websocket');\n return;\n }\n\n if (transportsWhitelist.length &&\n transportsWhitelist.indexOf(trans.transportName) === -1) {\n debug('not in whitelist', trans.transportName);\n return;\n }\n\n if (trans.enabled(info)) {\n debug('enabled', trans.transportName);\n transports.main.push(trans);\n if (trans.facadeTransport) {\n transports.facade.push(trans.facadeTransport);\n }\n } else {\n debug('disabled', trans.transportName);\n }\n });\n return transports;\n }\n };\n};\n\n}).call(this,{ env: {} })\n\n},{\"debug\":55}],52:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar URL = require('url-parse');\n\nvar debug = function() {};\nif (process.env.NODE_ENV !== 'production') {\n debug = require('debug')('sockjs-client:utils:url');\n}\n\nmodule.exports = {\n getOrigin: function(url) {\n if (!url) {\n return null;\n }\n\n var p = new URL(url);\n if (p.protocol === 'file:') {\n return null;\n }\n\n var port = p.port;\n if (!port) {\n port = (p.protocol === 'https:') ? '443' : '80';\n }\n\n return p.protocol + '//' + p.hostname + ':' + port;\n }\n\n, isOriginEqual: function(a, b) {\n var res = this.getOrigin(a) === this.getOrigin(b);\n debug('same', a, b, res);\n return res;\n }\n\n, isSchemeEqual: function(a, b) {\n return (a.split(':')[0] === b.split(':')[0]);\n }\n\n, addPath: function (url, path) {\n var qs = url.split('?');\n return qs[0] + path + (qs[1] ? '?' + qs[1] : '');\n }\n\n, addQuery: function (url, q) {\n return url + (url.indexOf('?') === -1 ? ('?' + q) : ('&' + q));\n }\n};\n\n}).call(this,{ env: {} })\n\n},{\"debug\":55,\"url-parse\":61}],53:[function(require,module,exports){\nmodule.exports = '1.1.4';\n\n},{}],54:[function(require,module,exports){\n/**\n * Helpers.\n */\n\nvar s = 1000\nvar m = s * 60\nvar h = m * 60\nvar d = h * 24\nvar y = d * 365.25\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {}\n var type = typeof val\n if (type === 'string' && val.length > 0) {\n return parse(val)\n } else if (type === 'number' && isNaN(val) === false) {\n return options.long ?\n\t\t\tfmtLong(val) :\n\t\t\tfmtShort(val)\n }\n throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val))\n}\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str)\n if (str.length > 10000) {\n return\n }\n var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str)\n if (!match) {\n return\n }\n var n = parseFloat(match[1])\n var type = (match[2] || 'ms').toLowerCase()\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y\n case 'days':\n case 'day':\n case 'd':\n return n * d\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n\n default:\n return undefined\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n if (ms >= d) {\n return Math.round(ms / d) + 'd'\n }\n if (ms >= h) {\n return Math.round(ms / h) + 'h'\n }\n if (ms >= m) {\n return Math.round(ms / m) + 'm'\n }\n if (ms >= s) {\n return Math.round(ms / s) + 's'\n }\n return ms + 'ms'\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n return plural(ms, d, 'day') ||\n plural(ms, h, 'hour') ||\n plural(ms, m, 'minute') ||\n plural(ms, s, 'second') ||\n ms + ' ms'\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, n, name) {\n if (ms < n) {\n return\n }\n if (ms < n * 1.5) {\n return Math.floor(ms / n) + ' ' + name\n }\n return Math.ceil(ms / n) + ' ' + name + 's'\n}\n\n},{}],55:[function(require,module,exports){\n(function (process){\n/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = require('./debug');\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n && 'undefined' != typeof chrome.storage\n ? chrome.storage.local\n : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n 'lightseagreen',\n 'forestgreen',\n 'goldenrod',\n 'dodgerblue',\n 'darkorchid',\n 'crimson'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n try {\n return JSON.stringify(v);\n } catch (err) {\n return '[UnexpectedJSONParseError]: ' + err.message;\n }\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return;\n\n var c = 'color: ' + this.color;\n args.splice(1, 0, c, 'color: inherit')\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-zA-Z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n try {\n if (null == namespaces) {\n exports.storage.removeItem('debug');\n } else {\n exports.storage.debug = namespaces;\n }\n } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n var r;\n try {\n r = exports.storage.debug;\n } catch(e) {}\n\n // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n if (!r && typeof process !== 'undefined' && 'env' in process) {\n r = process.env.DEBUG;\n }\n\n return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n try {\n return window.localStorage;\n } catch (e) {}\n}\n\n}).call(this,{ env: {} })\n\n},{\"./debug\":56}],56:[function(require,module,exports){\n\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = require('ms');\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\nexports.formatters = {};\n\n/**\n * Previous log timestamp.\n */\n\nvar prevTime;\n\n/**\n * Select a color.\n * @param {String} namespace\n * @return {Number}\n * @api private\n */\n\nfunction selectColor(namespace) {\n var hash = 0, i;\n\n for (i in namespace) {\n hash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return exports.colors[Math.abs(hash) % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction createDebug(namespace) {\n\n function debug() {\n // disabled?\n if (!debug.enabled) return;\n\n var self = debug;\n\n // set `diff` timestamp\n var curr = +new Date();\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n\n // turn the `arguments` into a proper Array\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n args[0] = exports.coerce(args[0]);\n\n if ('string' !== typeof args[0]) {\n // anything else let's inspect with %O\n args.unshift('%O');\n }\n\n // apply any `formatters` transformations\n var index = 0;\n args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n // if we encounter an escaped % then don't increase the array index\n if (match === '%%') return match;\n index++;\n var formatter = exports.formatters[format];\n if ('function' === typeof formatter) {\n var val = args[index];\n match = formatter.call(self, val);\n\n // now we need to remove `args[index]` since it's inlined in the `format`\n args.splice(index, 1);\n index--;\n }\n return match;\n });\n\n // apply env-specific formatting (colors, etc.)\n exports.formatArgs.call(self, args);\n\n var logFn = debug.log || exports.log || console.log.bind(console);\n logFn.apply(self, args);\n }\n\n debug.namespace = namespace;\n debug.enabled = exports.enabled(namespace);\n debug.useColors = exports.useColors();\n debug.color = selectColor(namespace);\n\n // env-specific initialization logic for debug instances\n if ('function' === typeof exports.init) {\n exports.init(debug);\n }\n\n return debug;\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n exports.save(namespaces);\n\n exports.names = [];\n exports.skips = [];\n\n var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n var len = split.length;\n\n for (var i = 0; i < len; i++) {\n if (!split[i]) continue; // ignore empty strings\n namespaces = split[i].replace(/\\*/g, '.*?');\n if (namespaces[0] === '-') {\n exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n exports.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n var i, len;\n for (i = 0, len = exports.skips.length; i < len; i++) {\n if (exports.skips[i].test(name)) {\n return false;\n }\n }\n for (i = 0, len = exports.names.length; i < len; i++) {\n if (exports.names[i].test(name)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n if (val instanceof Error) return val.stack || val.message;\n return val;\n}\n\n},{\"ms\":54}],57:[function(require,module,exports){\nif (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n\n},{}],58:[function(require,module,exports){\n(function (global){\n/*! JSON v3.3.2 | http://bestiejs.github.io/json3 | Copyright 2012-2014, Kit Cambridge | http://kit.mit-license.org */\n;(function () {\n // Detect the `define` function exposed by asynchronous module loaders. The\n // strict `define` check is necessary for compatibility with `r.js`.\n var isLoader = typeof define === \"function\" && define.amd;\n\n // A set of types used to distinguish objects from primitives.\n var objectTypes = {\n \"function\": true,\n \"object\": true\n };\n\n // Detect the `exports` object exposed by CommonJS implementations.\n var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;\n\n // Use the `global` object exposed by Node (including Browserify via\n // `insert-module-globals`), Narwhal, and Ringo as the default context,\n // and the `window` object in browsers. Rhino exports a `global` function\n // instead.\n var root = objectTypes[typeof window] && window || this,\n freeGlobal = freeExports && objectTypes[typeof module] && module && !module.nodeType && typeof global == \"object\" && global;\n\n if (freeGlobal && (freeGlobal[\"global\"] === freeGlobal || freeGlobal[\"window\"] === freeGlobal || freeGlobal[\"self\"] === freeGlobal)) {\n root = freeGlobal;\n }\n\n // Public: Initializes JSON 3 using the given `context` object, attaching the\n // `stringify` and `parse` functions to the specified `exports` object.\n function runInContext(context, exports) {\n context || (context = root[\"Object\"]());\n exports || (exports = root[\"Object\"]());\n\n // Native constructor aliases.\n var Number = context[\"Number\"] || root[\"Number\"],\n String = context[\"String\"] || root[\"String\"],\n Object = context[\"Object\"] || root[\"Object\"],\n Date = context[\"Date\"] || root[\"Date\"],\n SyntaxError = context[\"SyntaxError\"] || root[\"SyntaxError\"],\n TypeError = context[\"TypeError\"] || root[\"TypeError\"],\n Math = context[\"Math\"] || root[\"Math\"],\n nativeJSON = context[\"JSON\"] || root[\"JSON\"];\n\n // Delegate to the native `stringify` and `parse` implementations.\n if (typeof nativeJSON == \"object\" && nativeJSON) {\n exports.stringify = nativeJSON.stringify;\n exports.parse = nativeJSON.parse;\n }\n\n // Convenience aliases.\n var objectProto = Object.prototype,\n getClass = objectProto.toString,\n isProperty, forEach, undef;\n\n // Test the `Date#getUTC*` methods. Based on work by @Yaffle.\n var isExtended = new Date(-3509827334573292);\n try {\n // The `getUTCFullYear`, `Month`, and `Date` methods return nonsensical\n // results for certain dates in Opera >= 10.53.\n isExtended = isExtended.getUTCFullYear() == -109252 && isExtended.getUTCMonth() === 0 && isExtended.getUTCDate() === 1 &&\n // Safari < 2.0.2 stores the internal millisecond time value correctly,\n // but clips the values returned by the date methods to the range of\n // signed 32-bit integers ([-2 ** 31, 2 ** 31 - 1]).\n isExtended.getUTCHours() == 10 && isExtended.getUTCMinutes() == 37 && isExtended.getUTCSeconds() == 6 && isExtended.getUTCMilliseconds() == 708;\n } catch (exception) {}\n\n // Internal: Determines whether the native `JSON.stringify` and `parse`\n // implementations are spec-compliant. Based on work by Ken Snyder.\n function has(name) {\n if (has[name] !== undef) {\n // Return cached feature test result.\n return has[name];\n }\n var isSupported;\n if (name == \"bug-string-char-index\") {\n // IE <= 7 doesn't support accessing string characters using square\n // bracket notation. IE 8 only supports this for primitives.\n isSupported = \"a\"[0] != \"a\";\n } else if (name == \"json\") {\n // Indicates whether both `JSON.stringify` and `JSON.parse` are\n // supported.\n isSupported = has(\"json-stringify\") && has(\"json-parse\");\n } else {\n var value, serialized = '{\"a\":[1,true,false,null,\"\\\\u0000\\\\b\\\\n\\\\f\\\\r\\\\t\"]}';\n // Test `JSON.stringify`.\n if (name == \"json-stringify\") {\n var stringify = exports.stringify, stringifySupported = typeof stringify == \"function\" && isExtended;\n if (stringifySupported) {\n // A test function object with a custom `toJSON` method.\n (value = function () {\n return 1;\n }).toJSON = value;\n try {\n stringifySupported =\n // Firefox 3.1b1 and b2 serialize string, number, and boolean\n // primitives as object literals.\n stringify(0) === \"0\" &&\n // FF 3.1b1, b2, and JSON 2 serialize wrapped primitives as object\n // literals.\n stringify(new Number()) === \"0\" &&\n stringify(new String()) == '\"\"' &&\n // FF 3.1b1, 2 throw an error if the value is `null`, `undefined`, or\n // does not define a canonical JSON representation (this applies to\n // objects with `toJSON` properties as well, *unless* they are nested\n // within an object or array).\n stringify(getClass) === undef &&\n // IE 8 serializes `undefined` as `\"undefined\"`. Safari <= 5.1.7 and\n // FF 3.1b3 pass this test.\n stringify(undef) === undef &&\n // Safari <= 5.1.7 and FF 3.1b3 throw `Error`s and `TypeError`s,\n // respectively, if the value is omitted entirely.\n stringify() === undef &&\n // FF 3.1b1, 2 throw an error if the given value is not a number,\n // string, array, object, Boolean, or `null` literal. This applies to\n // objects with custom `toJSON` methods as well, unless they are nested\n // inside object or array literals. YUI 3.0.0b1 ignores custom `toJSON`\n // methods entirely.\n stringify(value) === \"1\" &&\n stringify([value]) == \"[1]\" &&\n // Prototype <= 1.6.1 serializes `[undefined]` as `\"[]\"` instead of\n // `\"[null]\"`.\n stringify([undef]) == \"[null]\" &&\n // YUI 3.0.0b1 fails to serialize `null` literals.\n stringify(null) == \"null\" &&\n // FF 3.1b1, 2 halts serialization if an array contains a function:\n // `[1, true, getClass, 1]` serializes as \"[1,true,],\". FF 3.1b3\n // elides non-JSON values from objects and arrays, unless they\n // define custom `toJSON` methods.\n stringify([undef, getClass, null]) == \"[null,null,null]\" &&\n // Simple serialization test. FF 3.1b1 uses Unicode escape sequences\n // where character escape codes are expected (e.g., `\\b` => `\\u0008`).\n stringify({ \"a\": [value, true, false, null, \"\\x00\\b\\n\\f\\r\\t\"] }) == serialized &&\n // FF 3.1b1 and b2 ignore the `filter` and `width` arguments.\n stringify(null, value) === \"1\" &&\n stringify([1, 2], null, 1) == \"[\\n 1,\\n 2\\n]\" &&\n // JSON 2, Prototype <= 1.7, and older WebKit builds incorrectly\n // serialize extended years.\n stringify(new Date(-8.64e15)) == '\"-271821-04-20T00:00:00.000Z\"' &&\n // The milliseconds are optional in ES 5, but required in 5.1.\n stringify(new Date(8.64e15)) == '\"+275760-09-13T00:00:00.000Z\"' &&\n // Firefox <= 11.0 incorrectly serializes years prior to 0 as negative\n // four-digit years instead of six-digit years. Credits: @Yaffle.\n stringify(new Date(-621987552e5)) == '\"-000001-01-01T00:00:00.000Z\"' &&\n // Safari <= 5.1.5 and Opera >= 10.53 incorrectly serialize millisecond\n // values less than 1000. Credits: @Yaffle.\n stringify(new Date(-1)) == '\"1969-12-31T23:59:59.999Z\"';\n } catch (exception) {\n stringifySupported = false;\n }\n }\n isSupported = stringifySupported;\n }\n // Test `JSON.parse`.\n if (name == \"json-parse\") {\n var parse = exports.parse;\n if (typeof parse == \"function\") {\n try {\n // FF 3.1b1, b2 will throw an exception if a bare literal is provided.\n // Conforming implementations should also coerce the initial argument to\n // a string prior to parsing.\n if (parse(\"0\") === 0 && !parse(false)) {\n // Simple parsing test.\n value = parse(serialized);\n var parseSupported = value[\"a\"].length == 5 && value[\"a\"][0] === 1;\n if (parseSupported) {\n try {\n // Safari <= 5.1.2 and FF 3.1b1 allow unescaped tabs in strings.\n parseSupported = !parse('\"\\t\"');\n } catch (exception) {}\n if (parseSupported) {\n try {\n // FF 4.0 and 4.0.1 allow leading `+` signs and leading\n // decimal points. FF 4.0, 4.0.1, and IE 9-10 also allow\n // certain octal literals.\n parseSupported = parse(\"01\") !== 1;\n } catch (exception) {}\n }\n if (parseSupported) {\n try {\n // FF 4.0, 4.0.1, and Rhino 1.7R3-R4 allow trailing decimal\n // points. These environments, along with FF 3.1b1 and 2,\n // also allow trailing commas in JSON objects and arrays.\n parseSupported = parse(\"1.\") !== 1;\n } catch (exception) {}\n }\n }\n }\n } catch (exception) {\n parseSupported = false;\n }\n }\n isSupported = parseSupported;\n }\n }\n return has[name] = !!isSupported;\n }\n\n if (!has(\"json\")) {\n // Common `[[Class]]` name aliases.\n var functionClass = \"[object Function]\",\n dateClass = \"[object Date]\",\n numberClass = \"[object Number]\",\n stringClass = \"[object String]\",\n arrayClass = \"[object Array]\",\n booleanClass = \"[object Boolean]\";\n\n // Detect incomplete support for accessing string characters by index.\n var charIndexBuggy = has(\"bug-string-char-index\");\n\n // Define additional utility methods if the `Date` methods are buggy.\n if (!isExtended) {\n var floor = Math.floor;\n // A mapping between the months of the year and the number of days between\n // January 1st and the first of the respective month.\n var Months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];\n // Internal: Calculates the number of days between the Unix epoch and the\n // first day of the given month.\n var getDay = function (year, month) {\n return Months[month] + 365 * (year - 1970) + floor((year - 1969 + (month = +(month > 1))) / 4) - floor((year - 1901 + month) / 100) + floor((year - 1601 + month) / 400);\n };\n }\n\n // Internal: Determines if a property is a direct property of the given\n // object. Delegates to the native `Object#hasOwnProperty` method.\n if (!(isProperty = objectProto.hasOwnProperty)) {\n isProperty = function (property) {\n var members = {}, constructor;\n if ((members.__proto__ = null, members.__proto__ = {\n // The *proto* property cannot be set multiple times in recent\n // versions of Firefox and SeaMonkey.\n \"toString\": 1\n }, members).toString != getClass) {\n // Safari <= 2.0.3 doesn't implement `Object#hasOwnProperty`, but\n // supports the mutable *proto* property.\n isProperty = function (property) {\n // Capture and break the object's prototype chain (see section 8.6.2\n // of the ES 5.1 spec). The parenthesized expression prevents an\n // unsafe transformation by the Closure Compiler.\n var original = this.__proto__, result = property in (this.__proto__ = null, this);\n // Restore the original prototype chain.\n this.__proto__ = original;\n return result;\n };\n } else {\n // Capture a reference to the top-level `Object` constructor.\n constructor = members.constructor;\n // Use the `constructor` property to simulate `Object#hasOwnProperty` in\n // other environments.\n isProperty = function (property) {\n var parent = (this.constructor || constructor).prototype;\n return property in this && !(property in parent && this[property] === parent[property]);\n };\n }\n members = null;\n return isProperty.call(this, property);\n };\n }\n\n // Internal: Normalizes the `for...in` iteration algorithm across\n // environments. Each enumerated key is yielded to a `callback` function.\n forEach = function (object, callback) {\n var size = 0, Properties, members, property;\n\n // Tests for bugs in the current environment's `for...in` algorithm. The\n // `valueOf` property inherits the non-enumerable flag from\n // `Object.prototype` in older versions of IE, Netscape, and Mozilla.\n (Properties = function () {\n this.valueOf = 0;\n }).prototype.valueOf = 0;\n\n // Iterate over a new instance of the `Properties` class.\n members = new Properties();\n for (property in members) {\n // Ignore all properties inherited from `Object.prototype`.\n if (isProperty.call(members, property)) {\n size++;\n }\n }\n Properties = members = null;\n\n // Normalize the iteration algorithm.\n if (!size) {\n // A list of non-enumerable properties inherited from `Object.prototype`.\n members = [\"valueOf\", \"toString\", \"toLocaleString\", \"propertyIsEnumerable\", \"isPrototypeOf\", \"hasOwnProperty\", \"constructor\"];\n // IE <= 8, Mozilla 1.0, and Netscape 6.2 ignore shadowed non-enumerable\n // properties.\n forEach = function (object, callback) {\n var isFunction = getClass.call(object) == functionClass, property, length;\n var hasProperty = !isFunction && typeof object.constructor != \"function\" && objectTypes[typeof object.hasOwnProperty] && object.hasOwnProperty || isProperty;\n for (property in object) {\n // Gecko <= 1.0 enumerates the `prototype` property of functions under\n // certain conditions; IE does not.\n if (!(isFunction && property == \"prototype\") && hasProperty.call(object, property)) {\n callback(property);\n }\n }\n // Manually invoke the callback for each non-enumerable property.\n for (length = members.length; property = members[--length]; hasProperty.call(object, property) && callback(property));\n };\n } else if (size == 2) {\n // Safari <= 2.0.4 enumerates shadowed properties twice.\n forEach = function (object, callback) {\n // Create a set of iterated properties.\n var members = {}, isFunction = getClass.call(object) == functionClass, property;\n for (property in object) {\n // Store each property name to prevent double enumeration. The\n // `prototype` property of functions is not enumerated due to cross-\n // environment inconsistencies.\n if (!(isFunction && property == \"prototype\") && !isProperty.call(members, property) && (members[property] = 1) && isProperty.call(object, property)) {\n callback(property);\n }\n }\n };\n } else {\n // No bugs detected; use the standard `for...in` algorithm.\n forEach = function (object, callback) {\n var isFunction = getClass.call(object) == functionClass, property, isConstructor;\n for (property in object) {\n if (!(isFunction && property == \"prototype\") && isProperty.call(object, property) && !(isConstructor = property === \"constructor\")) {\n callback(property);\n }\n }\n // Manually invoke the callback for the `constructor` property due to\n // cross-environment inconsistencies.\n if (isConstructor || isProperty.call(object, (property = \"constructor\"))) {\n callback(property);\n }\n };\n }\n return forEach(object, callback);\n };\n\n // Public: Serializes a JavaScript `value` as a JSON string. The optional\n // `filter` argument may specify either a function that alters how object and\n // array members are serialized, or an array of strings and numbers that\n // indicates which properties should be serialized. The optional `width`\n // argument may be either a string or number that specifies the indentation\n // level of the output.\n if (!has(\"json-stringify\")) {\n // Internal: A map of control characters and their escaped equivalents.\n var Escapes = {\n 92: \"\\\\\\\\\",\n 34: '\\\\\"',\n 8: \"\\\\b\",\n 12: \"\\\\f\",\n 10: \"\\\\n\",\n 13: \"\\\\r\",\n 9: \"\\\\t\"\n };\n\n // Internal: Converts `value` into a zero-padded string such that its\n // length is at least equal to `width`. The `width` must be <= 6.\n var leadingZeroes = \"000000\";\n var toPaddedString = function (width, value) {\n // The `|| 0` expression is necessary to work around a bug in\n // Opera <= 7.54u2 where `0 == -0`, but `String(-0) !== \"0\"`.\n return (leadingZeroes + (value || 0)).slice(-width);\n };\n\n // Internal: Double-quotes a string `value`, replacing all ASCII control\n // characters (characters with code unit values between 0 and 31) with\n // their escaped equivalents. This is an implementation of the\n // `Quote(value)` operation defined in ES 5.1 section 15.12.3.\n var unicodePrefix = \"\\\\u00\";\n var quote = function (value) {\n var result = '\"', index = 0, length = value.length, useCharIndex = !charIndexBuggy || length > 10;\n var symbols = useCharIndex && (charIndexBuggy ? value.split(\"\") : value);\n for (; index < length; index++) {\n var charCode = value.charCodeAt(index);\n // If the character is a control character, append its Unicode or\n // shorthand escape sequence; otherwise, append the character as-is.\n switch (charCode) {\n case 8: case 9: case 10: case 12: case 13: case 34: case 92:\n result += Escapes[charCode];\n break;\n default:\n if (charCode < 32) {\n result += unicodePrefix + toPaddedString(2, charCode.toString(16));\n break;\n }\n result += useCharIndex ? symbols[index] : value.charAt(index);\n }\n }\n return result + '\"';\n };\n\n // Internal: Recursively serializes an object. Implements the\n // `Str(key, holder)`, `JO(value)`, and `JA(value)` operations.\n var serialize = function (property, object, callback, properties, whitespace, indentation, stack) {\n var value, className, year, month, date, time, hours, minutes, seconds, milliseconds, results, element, index, length, prefix, result;\n try {\n // Necessary for host object support.\n value = object[property];\n } catch (exception) {}\n if (typeof value == \"object\" && value) {\n className = getClass.call(value);\n if (className == dateClass && !isProperty.call(value, \"toJSON\")) {\n if (value > -1 / 0 && value < 1 / 0) {\n // Dates are serialized according to the `Date#toJSON` method\n // specified in ES 5.1 section 15.9.5.44. See section 15.9.1.15\n // for the ISO 8601 date time string format.\n if (getDay) {\n // Manually compute the year, month, date, hours, minutes,\n // seconds, and milliseconds if the `getUTC*` methods are\n // buggy. Adapted from @Yaffle's `date-shim` project.\n date = floor(value / 864e5);\n for (year = floor(date / 365.2425) + 1970 - 1; getDay(year + 1, 0) <= date; year++);\n for (month = floor((date - getDay(year, 0)) / 30.42); getDay(year, month + 1) <= date; month++);\n date = 1 + date - getDay(year, month);\n // The `time` value specifies the time within the day (see ES\n // 5.1 section 15.9.1.2). The formula `(A % B + B) % B` is used\n // to compute `A modulo B`, as the `%` operator does not\n // correspond to the `modulo` operation for negative numbers.\n time = (value % 864e5 + 864e5) % 864e5;\n // The hours, minutes, seconds, and milliseconds are obtained by\n // decomposing the time within the day. See section 15.9.1.10.\n hours = floor(time / 36e5) % 24;\n minutes = floor(time / 6e4) % 60;\n seconds = floor(time / 1e3) % 60;\n milliseconds = time % 1e3;\n } else {\n year = value.getUTCFullYear();\n month = value.getUTCMonth();\n date = value.getUTCDate();\n hours = value.getUTCHours();\n minutes = value.getUTCMinutes();\n seconds = value.getUTCSeconds();\n milliseconds = value.getUTCMilliseconds();\n }\n // Serialize extended years correctly.\n value = (year <= 0 || year >= 1e4 ? (year < 0 ? \"-\" : \"+\") + toPaddedString(6, year < 0 ? -year : year) : toPaddedString(4, year)) +\n \"-\" + toPaddedString(2, month + 1) + \"-\" + toPaddedString(2, date) +\n // Months, dates, hours, minutes, and seconds should have two\n // digits; milliseconds should have three.\n \"T\" + toPaddedString(2, hours) + \":\" + toPaddedString(2, minutes) + \":\" + toPaddedString(2, seconds) +\n // Milliseconds are optional in ES 5.0, but required in 5.1.\n \".\" + toPaddedString(3, milliseconds) + \"Z\";\n } else {\n value = null;\n }\n } else if (typeof value.toJSON == \"function\" && ((className != numberClass && className != stringClass && className != arrayClass) || isProperty.call(value, \"toJSON\"))) {\n // Prototype <= 1.6.1 adds non-standard `toJSON` methods to the\n // `Number`, `String`, `Date`, and `Array` prototypes. JSON 3\n // ignores all `toJSON` methods on these objects unless they are\n // defined directly on an instance.\n value = value.toJSON(property);\n }\n }\n if (callback) {\n // If a replacement function was provided, call it to obtain the value\n // for serialization.\n value = callback.call(object, property, value);\n }\n if (value === null) {\n return \"null\";\n }\n className = getClass.call(value);\n if (className == booleanClass) {\n // Booleans are represented literally.\n return \"\" + value;\n } else if (className == numberClass) {\n // JSON numbers must be finite. `Infinity` and `NaN` are serialized as\n // `\"null\"`.\n return value > -1 / 0 && value < 1 / 0 ? \"\" + value : \"null\";\n } else if (className == stringClass) {\n // Strings are double-quoted and escaped.\n return quote(\"\" + value);\n }\n // Recursively serialize objects and arrays.\n if (typeof value == \"object\") {\n // Check for cyclic structures. This is a linear search; performance\n // is inversely proportional to the number of unique nested objects.\n for (length = stack.length; length--;) {\n if (stack[length] === value) {\n // Cyclic structures cannot be serialized by `JSON.stringify`.\n throw TypeError();\n }\n }\n // Add the object to the stack of traversed objects.\n stack.push(value);\n results = [];\n // Save the current indentation level and indent one additional level.\n prefix = indentation;\n indentation += whitespace;\n if (className == arrayClass) {\n // Recursively serialize array elements.\n for (index = 0, length = value.length; index < length; index++) {\n element = serialize(index, value, callback, properties, whitespace, indentation, stack);\n results.push(element === undef ? \"null\" : element);\n }\n result = results.length ? (whitespace ? \"[\\n\" + indentation + results.join(\",\\n\" + indentation) + \"\\n\" + prefix + \"]\" : (\"[\" + results.join(\",\") + \"]\")) : \"[]\";\n } else {\n // Recursively serialize object members. Members are selected from\n // either a user-specified list of property names, or the object\n // itself.\n forEach(properties || value, function (property) {\n var element = serialize(property, value, callback, properties, whitespace, indentation, stack);\n if (element !== undef) {\n // According to ES 5.1 section 15.12.3: \"If `gap` {whitespace}\n // is not the empty string, let `member` {quote(property) + \":\"}\n // be the concatenation of `member` and the `space` character.\"\n // The \"`space` character\" refers to the literal space\n // character, not the `space` {width} argument provided to\n // `JSON.stringify`.\n results.push(quote(property) + \":\" + (whitespace ? \" \" : \"\") + element);\n }\n });\n result = results.length ? (whitespace ? \"{\\n\" + indentation + results.join(\",\\n\" + indentation) + \"\\n\" + prefix + \"}\" : (\"{\" + results.join(\",\") + \"}\")) : \"{}\";\n }\n // Remove the object from the traversed object stack.\n stack.pop();\n return result;\n }\n };\n\n // Public: `JSON.stringify`. See ES 5.1 section 15.12.3.\n exports.stringify = function (source, filter, width) {\n var whitespace, callback, properties, className;\n if (objectTypes[typeof filter] && filter) {\n if ((className = getClass.call(filter)) == functionClass) {\n callback = filter;\n } else if (className == arrayClass) {\n // Convert the property names array into a makeshift set.\n properties = {};\n for (var index = 0, length = filter.length, value; index < length; value = filter[index++], ((className = getClass.call(value)), className == stringClass || className == numberClass) && (properties[value] = 1));\n }\n }\n if (width) {\n if ((className = getClass.call(width)) == numberClass) {\n // Convert the `width` to an integer and create a string containing\n // `width` number of space characters.\n if ((width -= width % 1) > 0) {\n for (whitespace = \"\", width > 10 && (width = 10); whitespace.length < width; whitespace += \" \");\n }\n } else if (className == stringClass) {\n whitespace = width.length <= 10 ? width : width.slice(0, 10);\n }\n }\n // Opera <= 7.54u2 discards the values associated with empty string keys\n // (`\"\"`) only if they are used directly within an object member list\n // (e.g., `!(\"\" in { \"\": 1})`).\n return serialize(\"\", (value = {}, value[\"\"] = source, value), callback, properties, whitespace, \"\", []);\n };\n }\n\n // Public: Parses a JSON source string.\n if (!has(\"json-parse\")) {\n var fromCharCode = String.fromCharCode;\n\n // Internal: A map of escaped control characters and their unescaped\n // equivalents.\n var Unescapes = {\n 92: \"\\\\\",\n 34: '\"',\n 47: \"/\",\n 98: \"\\b\",\n 116: \"\\t\",\n 110: \"\\n\",\n 102: \"\\f\",\n 114: \"\\r\"\n };\n\n // Internal: Stores the parser state.\n var Index, Source;\n\n // Internal: Resets the parser state and throws a `SyntaxError`.\n var abort = function () {\n Index = Source = null;\n throw SyntaxError();\n };\n\n // Internal: Returns the next token, or `\"$\"` if the parser has reached\n // the end of the source string. A token may be a string, number, `null`\n // literal, or Boolean literal.\n var lex = function () {\n var source = Source, length = source.length, value, begin, position, isSigned, charCode;\n while (Index < length) {\n charCode = source.charCodeAt(Index);\n switch (charCode) {\n case 9: case 10: case 13: case 32:\n // Skip whitespace tokens, including tabs, carriage returns, line\n // feeds, and space characters.\n Index++;\n break;\n case 123: case 125: case 91: case 93: case 58: case 44:\n // Parse a punctuator token (`{`, `}`, `[`, `]`, `:`, or `,`) at\n // the current position.\n value = charIndexBuggy ? source.charAt(Index) : source[Index];\n Index++;\n return value;\n case 34:\n // `\"` delimits a JSON string; advance to the next character and\n // begin parsing the string. String tokens are prefixed with the\n // sentinel `@` character to distinguish them from punctuators and\n // end-of-string tokens.\n for (value = \"@\", Index++; Index < length;) {\n charCode = source.charCodeAt(Index);\n if (charCode < 32) {\n // Unescaped ASCII control characters (those with a code unit\n // less than the space character) are not permitted.\n abort();\n } else if (charCode == 92) {\n // A reverse solidus (`\\`) marks the beginning of an escaped\n // control character (including `\"`, `\\`, and `/`) or Unicode\n // escape sequence.\n charCode = source.charCodeAt(++Index);\n switch (charCode) {\n case 92: case 34: case 47: case 98: case 116: case 110: case 102: case 114:\n // Revive escaped control characters.\n value += Unescapes[charCode];\n Index++;\n break;\n case 117:\n // `\\u` marks the beginning of a Unicode escape sequence.\n // Advance to the first character and validate the\n // four-digit code point.\n begin = ++Index;\n for (position = Index + 4; Index < position; Index++) {\n charCode = source.charCodeAt(Index);\n // A valid sequence comprises four hexdigits (case-\n // insensitive) that form a single hexadecimal value.\n if (!(charCode >= 48 && charCode <= 57 || charCode >= 97 && charCode <= 102 || charCode >= 65 && charCode <= 70)) {\n // Invalid Unicode escape sequence.\n abort();\n }\n }\n // Revive the escaped character.\n value += fromCharCode(\"0x\" + source.slice(begin, Index));\n break;\n default:\n // Invalid escape sequence.\n abort();\n }\n } else {\n if (charCode == 34) {\n // An unescaped double-quote character marks the end of the\n // string.\n break;\n }\n charCode = source.charCodeAt(Index);\n begin = Index;\n // Optimize for the common case where a string is valid.\n while (charCode >= 32 && charCode != 92 && charCode != 34) {\n charCode = source.charCodeAt(++Index);\n }\n // Append the string as-is.\n value += source.slice(begin, Index);\n }\n }\n if (source.charCodeAt(Index) == 34) {\n // Advance to the next character and return the revived string.\n Index++;\n return value;\n }\n // Unterminated string.\n abort();\n default:\n // Parse numbers and literals.\n begin = Index;\n // Advance past the negative sign, if one is specified.\n if (charCode == 45) {\n isSigned = true;\n charCode = source.charCodeAt(++Index);\n }\n // Parse an integer or floating-point value.\n if (charCode >= 48 && charCode <= 57) {\n // Leading zeroes are interpreted as octal literals.\n if (charCode == 48 && ((charCode = source.charCodeAt(Index + 1)), charCode >= 48 && charCode <= 57)) {\n // Illegal octal literal.\n abort();\n }\n isSigned = false;\n // Parse the integer component.\n for (; Index < length && ((charCode = source.charCodeAt(Index)), charCode >= 48 && charCode <= 57); Index++);\n // Floats cannot contain a leading decimal point; however, this\n // case is already accounted for by the parser.\n if (source.charCodeAt(Index) == 46) {\n position = ++Index;\n // Parse the decimal component.\n for (; position < length && ((charCode = source.charCodeAt(position)), charCode >= 48 && charCode <= 57); position++);\n if (position == Index) {\n // Illegal trailing decimal.\n abort();\n }\n Index = position;\n }\n // Parse exponents. The `e` denoting the exponent is\n // case-insensitive.\n charCode = source.charCodeAt(Index);\n if (charCode == 101 || charCode == 69) {\n charCode = source.charCodeAt(++Index);\n // Skip past the sign following the exponent, if one is\n // specified.\n if (charCode == 43 || charCode == 45) {\n Index++;\n }\n // Parse the exponential component.\n for (position = Index; position < length && ((charCode = source.charCodeAt(position)), charCode >= 48 && charCode <= 57); position++);\n if (position == Index) {\n // Illegal empty exponent.\n abort();\n }\n Index = position;\n }\n // Coerce the parsed value to a JavaScript number.\n return +source.slice(begin, Index);\n }\n // A negative sign may only precede numbers.\n if (isSigned) {\n abort();\n }\n // `true`, `false`, and `null` literals.\n if (source.slice(Index, Index + 4) == \"true\") {\n Index += 4;\n return true;\n } else if (source.slice(Index, Index + 5) == \"false\") {\n Index += 5;\n return false;\n } else if (source.slice(Index, Index + 4) == \"null\") {\n Index += 4;\n return null;\n }\n // Unrecognized token.\n abort();\n }\n }\n // Return the sentinel `$` character if the parser has reached the end\n // of the source string.\n return \"$\";\n };\n\n // Internal: Parses a JSON `value` token.\n var get = function (value) {\n var results, hasMembers;\n if (value == \"$\") {\n // Unexpected end of input.\n abort();\n }\n if (typeof value == \"string\") {\n if ((charIndexBuggy ? value.charAt(0) : value[0]) == \"@\") {\n // Remove the sentinel `@` character.\n return value.slice(1);\n }\n // Parse object and array literals.\n if (value == \"[\") {\n // Parses a JSON array, returning a new JavaScript array.\n results = [];\n for (;; hasMembers || (hasMembers = true)) {\n value = lex();\n // A closing square bracket marks the end of the array literal.\n if (value == \"]\") {\n break;\n }\n // If the array literal contains elements, the current token\n // should be a comma separating the previous element from the\n // next.\n if (hasMembers) {\n if (value == \",\") {\n value = lex();\n if (value == \"]\") {\n // Unexpected trailing `,` in array literal.\n abort();\n }\n } else {\n // A `,` must separate each array element.\n abort();\n }\n }\n // Elisions and leading commas are not permitted.\n if (value == \",\") {\n abort();\n }\n results.push(get(value));\n }\n return results;\n } else if (value == \"{\") {\n // Parses a JSON object, returning a new JavaScript object.\n results = {};\n for (;; hasMembers || (hasMembers = true)) {\n value = lex();\n // A closing curly brace marks the end of the object literal.\n if (value == \"}\") {\n break;\n }\n // If the object literal contains members, the current token\n // should be a comma separator.\n if (hasMembers) {\n if (value == \",\") {\n value = lex();\n if (value == \"}\") {\n // Unexpected trailing `,` in object literal.\n abort();\n }\n } else {\n // A `,` must separate each object member.\n abort();\n }\n }\n // Leading commas are not permitted, object property names must be\n // double-quoted strings, and a `:` must separate each property\n // name and value.\n if (value == \",\" || typeof value != \"string\" || (charIndexBuggy ? value.charAt(0) : value[0]) != \"@\" || lex() != \":\") {\n abort();\n }\n results[value.slice(1)] = get(lex());\n }\n return results;\n }\n // Unexpected token encountered.\n abort();\n }\n return value;\n };\n\n // Internal: Updates a traversed object member.\n var update = function (source, property, callback) {\n var element = walk(source, property, callback);\n if (element === undef) {\n delete source[property];\n } else {\n source[property] = element;\n }\n };\n\n // Internal: Recursively traverses a parsed JSON object, invoking the\n // `callback` function for each value. This is an implementation of the\n // `Walk(holder, name)` operation defined in ES 5.1 section 15.12.2.\n var walk = function (source, property, callback) {\n var value = source[property], length;\n if (typeof value == \"object\" && value) {\n // `forEach` can't be used to traverse an array in Opera <= 8.54\n // because its `Object#hasOwnProperty` implementation returns `false`\n // for array indices (e.g., `![1, 2, 3].hasOwnProperty(\"0\")`).\n if (getClass.call(value) == arrayClass) {\n for (length = value.length; length--;) {\n update(value, length, callback);\n }\n } else {\n forEach(value, function (property) {\n update(value, property, callback);\n });\n }\n }\n return callback.call(source, property, value);\n };\n\n // Public: `JSON.parse`. See ES 5.1 section 15.12.2.\n exports.parse = function (source, callback) {\n var result, value;\n Index = 0;\n Source = \"\" + source;\n result = get(lex());\n // If a JSON string contains multiple tokens, it is invalid.\n if (lex() != \"$\") {\n abort();\n }\n // Reset the parser state.\n Index = Source = null;\n return callback && getClass.call(callback) == functionClass ? walk((value = {}, value[\"\"] = result, value), \"\", callback) : result;\n };\n }\n }\n\n exports[\"runInContext\"] = runInContext;\n return exports;\n }\n\n if (freeExports && !isLoader) {\n // Export for CommonJS environments.\n runInContext(root, freeExports);\n } else {\n // Export for web browsers and JavaScript engines.\n var nativeJSON = root.JSON,\n previousJSON = root[\"JSON3\"],\n isRestored = false;\n\n var JSON3 = runInContext(root, (root[\"JSON3\"] = {\n // Public: Restores the original value of the global `JSON` object and\n // returns a reference to the `JSON3` object.\n \"noConflict\": function () {\n if (!isRestored) {\n isRestored = true;\n root.JSON = nativeJSON;\n root[\"JSON3\"] = previousJSON;\n nativeJSON = previousJSON = null;\n }\n return JSON3;\n }\n }));\n\n root.JSON = {\n \"parse\": JSON3.parse,\n \"stringify\": JSON3.stringify\n };\n }\n\n // Export for asynchronous module loaders.\n if (isLoader) {\n define(function () {\n return JSON3;\n });\n }\n}).call(this);\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],59:[function(require,module,exports){\n'use strict';\n\nvar has = Object.prototype.hasOwnProperty;\n\n/**\n * Simple query string parser.\n *\n * @param {String} query The query string that needs to be parsed.\n * @returns {Object}\n * @api public\n */\nfunction querystring(query) {\n var parser = /([^=?&]+)=?([^&]*)/g\n , result = {}\n , part;\n\n //\n // Little nifty parsing hack, leverage the fact that RegExp.exec increments\n // the lastIndex property so we can continue executing this loop until we've\n // parsed all results.\n //\n for (;\n part = parser.exec(query);\n result[decodeURIComponent(part[1])] = decodeURIComponent(part[2])\n );\n\n return result;\n}\n\n/**\n * Transform a query string to an object.\n *\n * @param {Object} obj Object that should be transformed.\n * @param {String} prefix Optional prefix.\n * @returns {String}\n * @api public\n */\nfunction querystringify(obj, prefix) {\n prefix = prefix || '';\n\n var pairs = [];\n\n //\n // Optionally prefix with a '?' if needed\n //\n if ('string' !== typeof prefix) prefix = '?';\n\n for (var key in obj) {\n if (has.call(obj, key)) {\n pairs.push(encodeURIComponent(key) +'='+ encodeURIComponent(obj[key]));\n }\n }\n\n return pairs.length ? prefix + pairs.join('&') : '';\n}\n\n//\n// Expose the module.\n//\nexports.stringify = querystringify;\nexports.parse = querystring;\n\n},{}],60:[function(require,module,exports){\n'use strict';\n\n/**\n * Check if we're required to add a port number.\n *\n * @see https://url.spec.whatwg.org/#default-port\n * @param {Number|String} port Port number we need to check\n * @param {String} protocol Protocol we need to check against.\n * @returns {Boolean} Is it a default port for the given protocol\n * @api private\n */\nmodule.exports = function required(port, protocol) {\n protocol = protocol.split(':')[0];\n port = +port;\n\n if (!port) return false;\n\n switch (protocol) {\n case 'http':\n case 'ws':\n return port !== 80;\n\n case 'https':\n case 'wss':\n return port !== 443;\n\n case 'ftp':\n return port !== 21;\n\n case 'gopher':\n return port !== 70;\n\n case 'file':\n return false;\n }\n\n return port !== 0;\n};\n\n},{}],61:[function(require,module,exports){\n'use strict';\n\nvar required = require('requires-port')\n , lolcation = require('./lolcation')\n , qs = require('querystringify')\n , protocolre = /^([a-z][a-z0-9.+-]*:)?(\\/\\/)?([\\S\\s]*)/i;\n\n/**\n * These are the parse rules for the URL parser, it informs the parser\n * about:\n *\n * 0. The char it Needs to parse, if it's a string it should be done using\n * indexOf, RegExp using exec and NaN means set as current value.\n * 1. The property we should set when parsing this value.\n * 2. Indication if it's backwards or forward parsing, when set as number it's\n * the value of extra chars that should be split off.\n * 3. Inherit from location if non existing in the parser.\n * 4. `toLowerCase` the resulting value.\n */\nvar rules = [\n ['#', 'hash'], // Extract from the back.\n ['?', 'query'], // Extract from the back.\n ['/', 'pathname'], // Extract from the back.\n ['@', 'auth', 1], // Extract from the front.\n [NaN, 'host', undefined, 1, 1], // Set left over value.\n [/:(\\d+)$/, 'port', undefined, 1], // RegExp the back.\n [NaN, 'hostname', undefined, 1, 1] // Set left over.\n];\n\n/**\n * @typedef ProtocolExtract\n * @type Object\n * @property {String} protocol Protocol matched in the URL, in lowercase.\n * @property {Boolean} slashes `true` if protocol is followed by \"//\", else `false`.\n * @property {String} rest Rest of the URL that is not part of the protocol.\n */\n\n/**\n * Extract protocol information from a URL with/without double slash (\"//\").\n *\n * @param {String} address URL we want to extract from.\n * @return {ProtocolExtract} Extracted information.\n * @api private\n */\nfunction extractProtocol(address) {\n var match = protocolre.exec(address);\n\n return {\n protocol: match[1] ? match[1].toLowerCase() : '',\n slashes: !!match[2],\n rest: match[3]\n };\n}\n\n/**\n * Resolve a relative URL pathname against a base URL pathname.\n *\n * @param {String} relative Pathname of the relative URL.\n * @param {String} base Pathname of the base URL.\n * @return {String} Resolved pathname.\n * @api private\n */\nfunction resolve(relative, base) {\n var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/'))\n , i = path.length\n , last = path[i - 1]\n , unshift = false\n , up = 0;\n\n while (i--) {\n if (path[i] === '.') {\n path.splice(i, 1);\n } else if (path[i] === '..') {\n path.splice(i, 1);\n up++;\n } else if (up) {\n if (i === 0) unshift = true;\n path.splice(i, 1);\n up--;\n }\n }\n\n if (unshift) path.unshift('');\n if (last === '.' || last === '..') path.push('');\n\n return path.join('/');\n}\n\n/**\n * The actual URL instance. Instead of returning an object we've opted-in to\n * create an actual constructor as it's much more memory efficient and\n * faster and it pleases my OCD.\n *\n * @constructor\n * @param {String} address URL we want to parse.\n * @param {Object|String} location Location defaults for relative paths.\n * @param {Boolean|Function} parser Parser for the query string.\n * @api public\n */\nfunction URL(address, location, parser) {\n if (!(this instanceof URL)) {\n return new URL(address, location, parser);\n }\n\n var relative, extracted, parse, instruction, index, key\n , instructions = rules.slice()\n , type = typeof location\n , url = this\n , i = 0;\n\n //\n // The following if statements allows this module two have compatibility with\n // 2 different API:\n //\n // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments\n // where the boolean indicates that the query string should also be parsed.\n //\n // 2. The `URL` interface of the browser which accepts a URL, object as\n // arguments. The supplied object will be used as default values / fall-back\n // for relative paths.\n //\n if ('object' !== type && 'string' !== type) {\n parser = location;\n location = null;\n }\n\n if (parser && 'function' !== typeof parser) parser = qs.parse;\n\n location = lolcation(location);\n\n //\n // Extract protocol information before running the instructions.\n //\n extracted = extractProtocol(address || '');\n relative = !extracted.protocol && !extracted.slashes;\n url.slashes = extracted.slashes || relative && location.slashes;\n url.protocol = extracted.protocol || location.protocol || '';\n address = extracted.rest;\n\n //\n // When the authority component is absent the URL starts with a path\n // component.\n //\n if (!extracted.slashes) instructions[2] = [/(.*)/, 'pathname'];\n\n for (; i < instructions.length; i++) {\n instruction = instructions[i];\n parse = instruction[0];\n key = instruction[1];\n\n if (parse !== parse) {\n url[key] = address;\n } else if ('string' === typeof parse) {\n if (~(index = address.indexOf(parse))) {\n if ('number' === typeof instruction[2]) {\n url[key] = address.slice(0, index);\n address = address.slice(index + instruction[2]);\n } else {\n url[key] = address.slice(index);\n address = address.slice(0, index);\n }\n }\n } else if ((index = parse.exec(address))) {\n url[key] = index[1];\n address = address.slice(0, index.index);\n }\n\n url[key] = url[key] || (\n relative && instruction[3] ? location[key] || '' : ''\n );\n\n //\n // Hostname, host and protocol should be lowercased so they can be used to\n // create a proper `origin`.\n //\n if (instruction[4]) url[key] = url[key].toLowerCase();\n }\n\n //\n // Also parse the supplied query string in to an object. If we're supplied\n // with a custom parser as function use that instead of the default build-in\n // parser.\n //\n if (parser) url.query = parser(url.query);\n\n //\n // If the URL is relative, resolve the pathname against the base URL.\n //\n if (\n relative\n && location.slashes\n && url.pathname.charAt(0) !== '/'\n && (url.pathname !== '' || location.pathname !== '')\n ) {\n url.pathname = resolve(url.pathname, location.pathname);\n }\n\n //\n // We should not add port numbers if they are already the default port number\n // for a given protocol. As the host also contains the port number we're going\n // override it with the hostname which contains no port number.\n //\n if (!required(url.port, url.protocol)) {\n url.host = url.hostname;\n url.port = '';\n }\n\n //\n // Parse down the `auth` for the username and password.\n //\n url.username = url.password = '';\n if (url.auth) {\n instruction = url.auth.split(':');\n url.username = instruction[0] || '';\n url.password = instruction[1] || '';\n }\n\n url.origin = url.protocol && url.host && url.protocol !== 'file:'\n ? url.protocol +'//'+ url.host\n : 'null';\n\n //\n // The href is just the compiled result.\n //\n url.href = url.toString();\n}\n\n/**\n * This is convenience method for changing properties in the URL instance to\n * insure that they all propagate correctly.\n *\n * @param {String} part Property we need to adjust.\n * @param {Mixed} value The newly assigned value.\n * @param {Boolean|Function} fn When setting the query, it will be the function\n * used to parse the query.\n * When setting the protocol, double slash will be\n * removed from the final url if it is true.\n * @returns {URL}\n * @api public\n */\nfunction set(part, value, fn) {\n var url = this;\n\n switch (part) {\n case 'query':\n if ('string' === typeof value && value.length) {\n value = (fn || qs.parse)(value);\n }\n\n url[part] = value;\n break;\n\n case 'port':\n url[part] = value;\n\n if (!required(value, url.protocol)) {\n url.host = url.hostname;\n url[part] = '';\n } else if (value) {\n url.host = url.hostname +':'+ value;\n }\n\n break;\n\n case 'hostname':\n url[part] = value;\n\n if (url.port) value += ':'+ url.port;\n url.host = value;\n break;\n\n case 'host':\n url[part] = value;\n\n if (/:\\d+$/.test(value)) {\n value = value.split(':');\n url.port = value.pop();\n url.hostname = value.join(':');\n } else {\n url.hostname = value;\n url.port = '';\n }\n\n break;\n\n case 'protocol':\n url.protocol = value.toLowerCase();\n url.slashes = !fn;\n break;\n\n case 'pathname':\n url.pathname = value.length && value.charAt(0) !== '/' ? '/' + value : value;\n\n break;\n\n default:\n url[part] = value;\n }\n\n for (var i = 0; i < rules.length; i++) {\n var ins = rules[i];\n\n if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase();\n }\n\n url.origin = url.protocol && url.host && url.protocol !== 'file:'\n ? url.protocol +'//'+ url.host\n : 'null';\n\n url.href = url.toString();\n\n return url;\n};\n\n/**\n * Transform the properties back in to a valid and full URL string.\n *\n * @param {Function} stringify Optional query stringify function.\n * @returns {String}\n * @api public\n */\nfunction toString(stringify) {\n if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify;\n\n var query\n , url = this\n , protocol = url.protocol;\n\n if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':';\n\n var result = protocol + (url.slashes ? '//' : '');\n\n if (url.username) {\n result += url.username;\n if (url.password) result += ':'+ url.password;\n result += '@';\n }\n\n result += url.host + url.pathname;\n\n query = 'object' === typeof url.query ? stringify(url.query) : url.query;\n if (query) result += '?' !== query.charAt(0) ? '?'+ query : query;\n\n if (url.hash) result += url.hash;\n\n return result;\n}\n\nURL.prototype = { set: set, toString: toString };\n\n//\n// Expose the URL parser and some additional properties that might be useful for\n// others or testing.\n//\nURL.extractProtocol = extractProtocol;\nURL.location = lolcation;\nURL.qs = qs;\n\nmodule.exports = URL;\n\n},{\"./lolcation\":62,\"querystringify\":59,\"requires-port\":60}],62:[function(require,module,exports){\n(function (global){\n'use strict';\n\nvar slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\\/\\//;\n\n/**\n * These properties should not be copied or inherited from. This is only needed\n * for all non blob URL's as a blob URL does not include a hash, only the\n * origin.\n *\n * @type {Object}\n * @private\n */\nvar ignore = { hash: 1, query: 1 }\n , URL;\n\n/**\n * The location object differs when your code is loaded through a normal page,\n * Worker or through a worker using a blob. And with the blobble begins the\n * trouble as the location object will contain the URL of the blob, not the\n * location of the page where our code is loaded in. The actual origin is\n * encoded in the `pathname` so we can thankfully generate a good \"default\"\n * location from it so we can generate proper relative URL's again.\n *\n * @param {Object|String} loc Optional default location object.\n * @returns {Object} lolcation object.\n * @api public\n */\nmodule.exports = function lolcation(loc) {\n loc = loc || global.location || {};\n URL = URL || require('./');\n\n var finaldestination = {}\n , type = typeof loc\n , key;\n\n if ('blob:' === loc.protocol) {\n finaldestination = new URL(unescape(loc.pathname), {});\n } else if ('string' === type) {\n finaldestination = new URL(loc, {});\n for (key in ignore) delete finaldestination[key];\n } else if ('object' === type) {\n for (key in loc) {\n if (key in ignore) continue;\n finaldestination[key] = loc[key];\n }\n\n if (finaldestination.slashes === undefined) {\n finaldestination.slashes = slashes.test(loc.href);\n }\n }\n\n return finaldestination;\n};\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"./\":61}]},{},[1])(1)\n});\n\n\n//# sourceMappingURL=sockjs.js.map\n","/**\n * StartAudioContext.js\n * @author Yotam Mann\n * @license http://opensource.org/licenses/MIT MIT License\n * @copyright 2016 Yotam Mann\n */\n(function (root, factory) {\n\tif (typeof define === \"function\" && define.amd) {\n\t\tdefine([], factory)\n\t } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory()\n\t} else {\n\t\troot.StartAudioContext = factory()\n }\n}(this, function () {\n\n\t//TAP LISTENER/////////////////////////////////////////////////////////////\n\n\t/**\n\t * @class Listens for non-dragging tap ends on the given element\n\t * @param {Element} element\n\t * @internal\n\t */\n\tvar TapListener = function(element, context){\n\n\t\tthis._dragged = false\n\n\t\tthis._element = element\n\n\t\tthis._bindedMove = this._moved.bind(this)\n\t\tthis._bindedEnd = this._ended.bind(this, context)\n\n\t\telement.addEventListener(\"touchstart\", this._bindedEnd)\n\t\telement.addEventListener(\"touchmove\", this._bindedMove)\n\t\telement.addEventListener(\"touchend\", this._bindedEnd)\n\t\telement.addEventListener(\"mouseup\", this._bindedEnd)\n\t}\n\n\t/**\n\t * drag move event\n\t */\n\tTapListener.prototype._moved = function(e){\n\t\tthis._dragged = true\n\t};\n\n\t/**\n\t * tap ended listener\n\t */\n\tTapListener.prototype._ended = function(context){\n\t\tif (!this._dragged){\n\t\t\tstartContext(context)\n\t\t}\n\t\tthis._dragged = false\n\t};\n\n\t/**\n\t * remove all the bound events\n\t */\n\tTapListener.prototype.dispose = function(){\n\t\tthis._element.removeEventListener(\"touchstart\", this._bindedEnd)\n\t\tthis._element.removeEventListener(\"touchmove\", this._bindedMove)\n\t\tthis._element.removeEventListener(\"touchend\", this._bindedEnd)\n\t\tthis._element.removeEventListener(\"mouseup\", this._bindedEnd)\n\t\tthis._bindedMove = null\n\t\tthis._bindedEnd = null\n\t\tthis._element = null\n\t};\n\n\t//END TAP LISTENER/////////////////////////////////////////////////////////\n\n\t/**\n\t * Plays a silent sound and also invoke the \"resume\" method\n\t * @param {AudioContext} context\n\t * @private\n\t */\n\tfunction startContext(context){\n\t\t// this accomplishes the iOS specific requirement\n\t\tvar buffer = context.createBuffer(1, 1, context.sampleRate)\n\t\tvar source = context.createBufferSource()\n\t\tsource.buffer = buffer\n\t\tsource.connect(context.destination)\n\t\tsource.start(0)\n\n\t\t// resume the audio context\n\t\tif (context.resume){\n\t\t\tcontext.resume()\n\t\t}\n\t}\n\n\t/**\n\t * Returns true if the audio context is started\n\t * @param {AudioContext} context\n\t * @return {Boolean}\n\t * @private\n\t */\n\tfunction isStarted(context){\n\t\t return context.state === \"running\"\n\t}\n\n\t/**\n\t * Invokes the callback as soon as the AudioContext\n\t * is started\n\t * @param {AudioContext} context\n\t * @param {Function} callback\n\t */\n\tfunction onStarted(context, callback){\n\n\t\tfunction checkLoop(){\n\t\t\tif (isStarted(context)){\n\t\t\t\tcallback()\n\t\t\t} else {\n\t\t\t\trequestAnimationFrame(checkLoop)\n\t\t\t\tif (context.resume){\n\t\t\t\t\tcontext.resume()\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isStarted(context)){\n\t\t\tcallback()\n\t\t} else {\n\t\t\tcheckLoop()\n\t\t}\n\t}\n\n\t/**\n\t * Add a tap listener to the audio context\n\t * @param {Array|Element|String|jQuery} element\n\t * @param {Array} tapListeners\n\t */\n\tfunction bindTapListener(element, tapListeners, context){\n\t\tif (Array.isArray(element) || (NodeList && element instanceof NodeList)){\n\t\t\tfor (var i = 0; i < element.length; i++){\n\t\t\t\tbindTapListener(element[i], tapListeners, context)\n\t\t\t}\n\t\t} else if (typeof element === \"string\"){\n\t\t\tbindTapListener(document.querySelectorAll(element), tapListeners, context)\n\t\t} else if (element.jquery && typeof element.toArray === \"function\"){\n\t\t\tbindTapListener(element.toArray(), tapListeners, context)\n\t\t} else if (Element && element instanceof Element){\n\t\t\t//if it's an element, create a TapListener\n\t\t\tvar tap = new TapListener(element, context)\n\t\t\ttapListeners.push(tap)\n\t\t} \n\t}\n\n\t/**\n\t * @param {AudioContext} context The AudioContext to start.\n\t * @param {Array|String|Element|jQuery=} elements For iOS, the list of elements\n\t * to bind tap event listeners\n\t * which will start the AudioContext. If\n\t * no elements are given, it will bind\n\t * to the document.body.\n\t * @param {Function=} callback The callback to invoke when the AudioContext is started.\n\t * @return {Promise} The promise is invoked when the AudioContext\n\t * is started.\n\t */\n\tfunction StartAudioContext(context, elements, callback){\n\n\t\t//the promise is invoked when the AudioContext is started\n\t\tvar promise = new Promise(function(success) {\n\t\t\tonStarted(context, success)\n\t\t})\n\n\t\t// The TapListeners bound to the elements\n\t\tvar tapListeners = []\n\n\t\t// add all the tap listeners\n\t\tif (!elements){\n\t\t\telements = document.body\n\t\t}\n\t\tbindTapListener(elements, tapListeners, context)\n\n\t\t//dispose all these tap listeners when the context is started\n\t\tpromise.then(function(){\n\t\t\tfor (var i = 0; i < tapListeners.length; i++){\n\t\t\t\ttapListeners[i].dispose()\n\t\t\t}\n\t\t\ttapListeners = null\n\n\t\t\tif (callback){\n\t\t\t\tcallback()\n\t\t\t}\n\t\t})\n\n\t\treturn promise\n\t}\n\n\treturn StartAudioContext\n}))","'use strict';\nvar ansiRegex = require('ansi-regex')();\n\nmodule.exports = function (str) {\n\treturn typeof str === 'string' ? str.replace(ansiRegex, '') : str;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar punycode = require('punycode');\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter =\n (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1)\n continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n util.isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol')\n result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host || srcPath.length > 1) &&\n (last === '.' || last === '..') || last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n","'use strict';\n\nmodule.exports = {\n isString: function(arg) {\n return typeof(arg) === 'string';\n },\n isObject: function(arg) {\n return typeof(arg) === 'object' && arg !== null;\n },\n isNull: function(arg) {\n return arg === null;\n },\n isNullOrUndefined: function(arg) {\n return arg == null;\n }\n};\n","'use strict';\n\n/* global __resourceQuery WorkerGlobalScope self */\n/* eslint prefer-destructuring: off */\n\nvar url = require('url');\nvar stripAnsi = require('strip-ansi');\nvar log = require('loglevel').getLogger('webpack-dev-server');\nvar socket = require('./socket');\nvar overlay = require('./overlay');\n\nfunction getCurrentScriptSource() {\n // `document.currentScript` is the most accurate way to find the current script,\n // but is not supported in all browsers.\n if (document.currentScript) {\n return document.currentScript.getAttribute('src');\n }\n // Fall back to getting all scripts in the document.\n var scriptElements = document.scripts || [];\n var currentScript = scriptElements[scriptElements.length - 1];\n if (currentScript) {\n return currentScript.getAttribute('src');\n }\n // Fail as there was no script to use.\n throw new Error('[WDS] Failed to get current script source.');\n}\n\nvar urlParts = void 0;\nvar hotReload = true;\nif (typeof window !== 'undefined') {\n var qs = window.location.search.toLowerCase();\n hotReload = qs.indexOf('hotreload=false') === -1;\n}\nif (typeof __resourceQuery === 'string' && __resourceQuery) {\n // If this bundle is inlined, use the resource query to get the correct url.\n urlParts = url.parse(__resourceQuery.substr(1));\n} else {\n // Else, get the url from the <script> this file was called with.\n var scriptHost = getCurrentScriptSource();\n // eslint-disable-next-line no-useless-escape\n scriptHost = scriptHost.replace(/\\/[^\\/]+$/, '');\n urlParts = url.parse(scriptHost || '/', false, true);\n}\n\nif (!urlParts.port || urlParts.port === '0') {\n urlParts.port = self.location.port;\n}\n\nvar _hot = false;\nvar initial = true;\nvar currentHash = '';\nvar useWarningOverlay = false;\nvar useErrorOverlay = false;\nvar useProgress = false;\n\nvar INFO = 'info';\nvar WARNING = 'warning';\nvar ERROR = 'error';\nvar NONE = 'none';\n\n// Set the default log level\nlog.setDefaultLevel(INFO);\n\n// Send messages to the outside, so plugins can consume it.\nfunction sendMsg(type, data) {\n if (typeof self !== 'undefined' && (typeof WorkerGlobalScope === 'undefined' || !(self instanceof WorkerGlobalScope))) {\n self.postMessage({\n type: 'webpack' + type,\n data: data\n }, '*');\n }\n}\n\nvar onSocketMsg = {\n hot: function hot() {\n _hot = true;\n log.info('[WDS] Hot Module Replacement enabled.');\n },\n invalid: function invalid() {\n log.info('[WDS] App updated. Recompiling...');\n // fixes #1042. overlay doesn't clear if errors are fixed but warnings remain.\n if (useWarningOverlay || useErrorOverlay) overlay.clear();\n sendMsg('Invalid');\n },\n hash: function hash(_hash) {\n currentHash = _hash;\n },\n\n 'still-ok': function stillOk() {\n log.info('[WDS] Nothing changed.');\n if (useWarningOverlay || useErrorOverlay) overlay.clear();\n sendMsg('StillOk');\n },\n 'log-level': function logLevel(level) {\n var hotCtx = require.context('webpack/hot', false, /^\\.\\/log$/);\n if (hotCtx.keys().indexOf('./log') !== -1) {\n hotCtx('./log').setLogLevel(level);\n }\n switch (level) {\n case INFO:\n case ERROR:\n log.setLevel(level);\n break;\n case WARNING:\n // loglevel's warning name is different from webpack's\n log.setLevel('warn');\n break;\n case NONE:\n log.disableAll();\n break;\n default:\n log.error('[WDS] Unknown clientLogLevel \\'' + level + '\\'');\n }\n },\n overlay: function overlay(value) {\n if (typeof document !== 'undefined') {\n if (typeof value === 'boolean') {\n useWarningOverlay = false;\n useErrorOverlay = value;\n } else if (value) {\n useWarningOverlay = value.warnings;\n useErrorOverlay = value.errors;\n }\n }\n },\n progress: function progress(_progress) {\n if (typeof document !== 'undefined') {\n useProgress = _progress;\n }\n },\n\n 'progress-update': function progressUpdate(data) {\n if (useProgress) log.info('[WDS] ' + data.percent + '% - ' + data.msg + '.');\n },\n ok: function ok() {\n sendMsg('Ok');\n if (useWarningOverlay || useErrorOverlay) overlay.clear();\n if (initial) return initial = false; // eslint-disable-line no-return-assign\n reloadApp();\n },\n\n 'content-changed': function contentChanged() {\n log.info('[WDS] Content base changed. Reloading...');\n self.location.reload();\n },\n warnings: function warnings(_warnings) {\n log.warn('[WDS] Warnings while compiling.');\n var strippedWarnings = _warnings.map(function (warning) {\n return stripAnsi(warning);\n });\n sendMsg('Warnings', strippedWarnings);\n for (var i = 0; i < strippedWarnings.length; i++) {\n log.warn(strippedWarnings[i]);\n }\n if (useWarningOverlay) overlay.showMessage(_warnings);\n\n if (initial) return initial = false; // eslint-disable-line no-return-assign\n reloadApp();\n },\n errors: function errors(_errors) {\n log.error('[WDS] Errors while compiling. Reload prevented.');\n var strippedErrors = _errors.map(function (error) {\n return stripAnsi(error);\n });\n sendMsg('Errors', strippedErrors);\n for (var i = 0; i < strippedErrors.length; i++) {\n log.error(strippedErrors[i]);\n }\n if (useErrorOverlay) overlay.showMessage(_errors);\n initial = false;\n },\n error: function error(_error) {\n log.error(_error);\n },\n close: function close() {\n log.error('[WDS] Disconnected!');\n sendMsg('Close');\n }\n};\n\nvar hostname = urlParts.hostname;\nvar protocol = urlParts.protocol;\n\n// check ipv4 and ipv6 `all hostname`\nif (hostname === '0.0.0.0' || hostname === '::') {\n // why do we need this check?\n // hostname n/a for file protocol (example, when using electron, ionic)\n // see: https://github.com/webpack/webpack-dev-server/pull/384\n // eslint-disable-next-line no-bitwise\n if (self.location.hostname && !!~self.location.protocol.indexOf('http')) {\n hostname = self.location.hostname;\n }\n}\n\n// `hostname` can be empty when the script path is relative. In that case, specifying\n// a protocol would result in an invalid URL.\n// When https is used in the app, secure websockets are always necessary\n// because the browser doesn't accept non-secure websockets.\nif (hostname && (self.location.protocol === 'https:' || urlParts.hostname === '0.0.0.0')) {\n protocol = self.location.protocol;\n}\n\nvar socketUrl = url.format({\n protocol: protocol,\n auth: urlParts.auth,\n hostname: hostname,\n port: urlParts.port,\n pathname: urlParts.path == null || urlParts.path === '/' ? '/sockjs-node' : urlParts.path\n});\n\nsocket(socketUrl, onSocketMsg);\n\nvar isUnloading = false;\nself.addEventListener('beforeunload', function () {\n isUnloading = true;\n});\n\nfunction reloadApp() {\n if (isUnloading || !hotReload) {\n return;\n }\n if (_hot) {\n log.info('[WDS] App hot update...');\n // eslint-disable-next-line global-require\n var hotEmitter = require('webpack/hot/emitter');\n hotEmitter.emit('webpackHotUpdate', currentHash);\n if (typeof self !== 'undefined' && self.window) {\n // broadcast update to window\n self.postMessage('webpackHotUpdate' + currentHash, '*');\n }\n } else {\n var rootWindow = self;\n // use parent window for reload (in case we're in an iframe with no valid src)\n var intervalId = self.setInterval(function () {\n if (rootWindow.location.protocol !== 'about:') {\n // reload immediately if protocol is valid\n applyReload(rootWindow, intervalId);\n } else {\n rootWindow = rootWindow.parent;\n if (rootWindow.parent === rootWindow) {\n // if parent equals current window we've reached the root which would continue forever, so trigger a reload anyways\n applyReload(rootWindow, intervalId);\n }\n }\n });\n }\n\n function applyReload(rootWindow, intervalId) {\n clearInterval(intervalId);\n log.info('[WDS] App updated. Reloading...');\n rootWindow.location.reload();\n }\n}",null,"'use strict';\n\n// The error overlay is inspired (and mostly copied) from Create React App (https://github.com/facebookincubator/create-react-app)\n// They, in turn, got inspired by webpack-hot-middleware (https://github.com/glenjamin/webpack-hot-middleware).\n\nvar ansiHTML = require('ansi-html');\nvar Entities = require('html-entities').AllHtmlEntities;\n\nvar entities = new Entities();\n\nvar colors = {\n reset: ['transparent', 'transparent'],\n black: '181818',\n red: 'E36049',\n green: 'B3CB74',\n yellow: 'FFD080',\n blue: '7CAFC2',\n magenta: '7FACCA',\n cyan: 'C3C2EF',\n lightgrey: 'EBE7E3',\n darkgrey: '6D7891'\n};\nansiHTML.setColors(colors);\n\nfunction createOverlayIframe(onIframeLoad) {\n var iframe = document.createElement('iframe');\n iframe.id = 'webpack-dev-server-client-overlay';\n iframe.src = 'about:blank';\n iframe.style.position = 'fixed';\n iframe.style.left = 0;\n iframe.style.top = 0;\n iframe.style.right = 0;\n iframe.style.bottom = 0;\n iframe.style.width = '100vw';\n iframe.style.height = '100vh';\n iframe.style.border = 'none';\n iframe.style.zIndex = 9999999999;\n iframe.onload = onIframeLoad;\n return iframe;\n}\n\nfunction addOverlayDivTo(iframe) {\n var div = iframe.contentDocument.createElement('div');\n div.id = 'webpack-dev-server-client-overlay-div';\n div.style.position = 'fixed';\n div.style.boxSizing = 'border-box';\n div.style.left = 0;\n div.style.top = 0;\n div.style.right = 0;\n div.style.bottom = 0;\n div.style.width = '100vw';\n div.style.height = '100vh';\n div.style.backgroundColor = 'rgba(0, 0, 0, 0.85)';\n div.style.color = '#E8E8E8';\n div.style.fontFamily = 'Menlo, Consolas, monospace';\n div.style.fontSize = 'large';\n div.style.padding = '2rem';\n div.style.lineHeight = '1.2';\n div.style.whiteSpace = 'pre-wrap';\n div.style.overflow = 'auto';\n iframe.contentDocument.body.appendChild(div);\n return div;\n}\n\nvar overlayIframe = null;\nvar overlayDiv = null;\nvar lastOnOverlayDivReady = null;\n\nfunction ensureOverlayDivExists(onOverlayDivReady) {\n if (overlayDiv) {\n // Everything is ready, call the callback right away.\n onOverlayDivReady(overlayDiv);\n return;\n }\n\n // Creating an iframe may be asynchronous so we'll schedule the callback.\n // In case of multiple calls, last callback wins.\n lastOnOverlayDivReady = onOverlayDivReady;\n\n if (overlayIframe) {\n // We're already creating it.\n return;\n }\n\n // Create iframe and, when it is ready, a div inside it.\n overlayIframe = createOverlayIframe(function () {\n overlayDiv = addOverlayDivTo(overlayIframe);\n // Now we can talk!\n lastOnOverlayDivReady(overlayDiv);\n });\n\n // Zalgo alert: onIframeLoad() will be called either synchronously\n // or asynchronously depending on the browser.\n // We delay adding it so `overlayIframe` is set when `onIframeLoad` fires.\n document.body.appendChild(overlayIframe);\n}\n\nfunction showMessageOverlay(message) {\n ensureOverlayDivExists(function (div) {\n // Make it look similar to our terminal.\n div.innerHTML = '<span style=\"color: #' + colors.red + '\">Failed to compile.</span><br><br>' + ansiHTML(entities.encode(message));\n });\n}\n\nfunction destroyErrorOverlay() {\n if (!overlayDiv) {\n // It is not there in the first place.\n return;\n }\n\n // Clean up and reset internal state.\n document.body.removeChild(overlayIframe);\n overlayDiv = null;\n overlayIframe = null;\n lastOnOverlayDivReady = null;\n}\n\n// Successful compilation.\nexports.clear = function handleSuccess() {\n destroyErrorOverlay();\n};\n\n// Compilation with errors (e.g. syntax error or missing modules).\nexports.showMessage = function handleMessage(messages) {\n showMessageOverlay(messages[0]);\n};","'use strict';\n\nvar SockJS = require('sockjs-client/dist/sockjs');\n\nvar retries = 0;\nvar sock = null;\n\nvar socket = function initSocket(url, handlers) {\n sock = new SockJS(url);\n\n sock.onopen = function onopen() {\n retries = 0;\n };\n\n sock.onclose = function onclose() {\n if (retries === 0) {\n handlers.close();\n }\n\n // Try to reconnect.\n sock = null;\n\n // After 10 retries stop trying, to prevent logspam.\n if (retries <= 10) {\n // Exponentially increase timeout to reconnect.\n // Respectfully copied from the package `got`.\n // eslint-disable-next-line no-mixed-operators, no-restricted-properties\n var retryInMs = 1000 * Math.pow(2, retries) + Math.random() * 100;\n retries += 1;\n\n setTimeout(function () {\n socket(url, handlers);\n }, retryInMs);\n }\n };\n\n sock.onmessage = function onmessage(e) {\n // This assumes that all data sent via the websocket is JSON.\n var msg = JSON.parse(e.data);\n if (handlers[msg.type]) {\n handlers[msg.type](msg.data);\n }\n };\n};\n\nmodule.exports = socket;","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\r\n} catch (e) {\r\n\t// This works if the window reference is available\r\n\tif (typeof window === \"object\") g = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n","module.exports = function(module) {\r\n\tif (!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif (!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n","var map = {\n\t\"./log\": \"./node_modules/webpack/hot/log.js\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\tvar module = __webpack_require__(id);\n\treturn module;\n}\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) { // check for number or string\n\t\tvar e = new Error('Cannot find module \"' + req + '\".');\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn id;\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./node_modules/webpack/hot sync ^\\\\.\\\\/log$\";","var EventEmitter = require(\"events\");\r\nmodule.exports = new EventEmitter();\r\n","var logLevel = \"info\";\r\n\r\nfunction dummy() {}\r\n\r\nfunction shouldLog(level) {\r\n\tvar shouldLog =\r\n\t\t(logLevel === \"info\" && level === \"info\") ||\r\n\t\t([\"info\", \"warning\"].indexOf(logLevel) >= 0 && level === \"warning\") ||\r\n\t\t([\"info\", \"warning\", \"error\"].indexOf(logLevel) >= 0 && level === \"error\");\r\n\treturn shouldLog;\r\n}\r\n\r\nfunction logGroup(logFn) {\r\n\treturn function(level, msg) {\r\n\t\tif (shouldLog(level)) {\r\n\t\t\tlogFn(msg);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nmodule.exports = function(level, msg) {\r\n\tif (shouldLog(level)) {\r\n\t\tif (level === \"info\") {\r\n\t\t\tconsole.log(msg);\r\n\t\t} else if (level === \"warning\") {\r\n\t\t\tconsole.warn(msg);\r\n\t\t} else if (level === \"error\") {\r\n\t\t\tconsole.error(msg);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar group = console.group || dummy;\r\nvar groupCollapsed = console.groupCollapsed || dummy;\r\nvar groupEnd = console.groupEnd || dummy;\r\n\r\nmodule.exports.group = logGroup(group);\r\n\r\nmodule.exports.groupCollapsed = logGroup(groupCollapsed);\r\n\r\nmodule.exports.groupEnd = logGroup(groupEnd);\r\n\r\nmodule.exports.setLogLevel = function(level) {\r\n\tlogLevel = level;\r\n};\r\n","class GUI {\n\n Init(jon, container){\n\n if(!guify) {\n console.log(\"Guify was not found! Add it to your page to enable a GUI for this program.\");\n return;\n }\n\n this.panel = new guify({\n title: \"Jon-Trombone\", \n theme: \"dark\", \n root: container,\n width: 350,\n barMode: \"above\",\n align: \"right\",\n opacity: \"0.95\"\n });\n\n this.panel.Register({ \n type: \"checkbox\", label: \"Mute\", \n object: jon.trombone, property: \"muted\", \n onChange: (data) => {\n jon.trombone.SetMute(data);\n } \n });\n\n // Jon folder\n this.panel.Register({ type: \"folder\", label: \"Jon\" });\n this.panel.Register([\n { type: \"checkbox\", label: \"Move Jaw\", object: jon, property: \"moveJaw\" },\n { type: \"range\", label: \"Jaw Speed\", object: jon, property: \"jawFlapSpeed\", min: 0, max: 100 },\n { type: \"range\", label: \"Jaw Range\", object: jon, property: \"jawOpenOffset\", min: 0, max: 1 },\n ], { folder: \"Jon\" });\n\n // Voice folder\n this.panel.Register({ type: \"folder\", label: \"Voice\" });\n this.panel.Register([\n { type: \"checkbox\", label: \"Wobble\", object: jon.trombone, property: \"autoWobble\" },\n { type: \"checkbox\", label: \"Pitch Variance\", object: jon.trombone.voices[0].glottis, property: \"addPitchVariance\" },\n { type: \"checkbox\", label: \"Tenseness Variance\", object: jon.trombone.voices[0].glottis, property: \"addTensenessVariance\" },\n { type: \"range\", label: \"Tenseness\", object: jon.trombone.voices[0].glottis, property: \"UITenseness\", min: 0, max: 1 },\n { type: \"range\", label: \"Vibrato\", object: jon.trombone.voices[0].glottis, property: \"vibratoAmount\", min: 0, max: 0.5 },\n { type: \"range\", label: \"Frequency\", object: jon.trombone.voices[0].glottis, property: \"UIFrequency\", min: 1, max: 1000, step: 1 },\n { type: \"range\", label: \"Loudness\", object: jon.trombone.voices[0].glottis, property: \"loudness\", min: 0, max: 1 },\n ], { folder: \"Voice\" });\n\n // Tract folder\n this.panel.Register({ type: \"folder\", label: \"Tract\" });\n this.panel.Register([\n { type: \"range\", label: \"Move Speed\", object: jon.trombone.voices[0].tract, property: \"movementSpeed\", min: 1, max: 30, step: 1 },\n { type: \"range\", label: \"Velum Target\", object: jon.trombone.voices[0].tract, property: \"velumTarget\", min: 0.001, max: 2 },\n { type: \"range\", label: \"Target\", object: jon.trombone.voices[0].tractUI, property: \"target\", min: 0.001, max: 1 },\n { type: \"range\", label: \"Index\", object: jon.trombone.voices[0].tractUI, property: \"index\", min: 0, max: 43, step: 1 },\n { type: \"range\", label: \"Radius\", object: jon.trombone.voices[0].tractUI, property: \"radius\", min: 0, max: 5, step: 1 },\n ], { folder: \"Tract\" });\n\n // MIDI folder\n this.panel.Register({ type: \"folder\", label: \"MIDI\" });\n this.panel.Register([\n { type: \"file\", label: \"MIDI File\", fileReadFunc: \"readAsBinaryString\",\n onChange: (data) => {\n jon.midiController.LoadSongDirect(data);\n }\n },\n { type: \"title\", label: \"Controls\" },\n { type: \"button\", label: \"Play\", action: () => jon.midiController.PlaySong() },\n { type: \"button\", label: \"Stop\", action: () => jon.midiController.Stop() },\n { type: \"button\", label: \"Restart\", action: () => jon.midiController.Restart() },\n { type: \"title\", label: \"Options\" },\n { type: \"range\", label: \"Track\", object: jon.midiController, property: \"currentTrack\", min: 1, max: 20, step: 1 },\n { type: \"range\", label: \"Base Frequency\", object: jon.midiController, property: \"baseFreq\", min: 1, max: 2000, step: 1 },\n { type: \"checkbox\", label: \"Extreme Vibrato\", object: jon, property: \"flapWhileSinging\" },\n { type: \"checkbox\", label: \"Legato\", object: jon, property: \"legato\" },\n ], { folder: \"MIDI\" });\n\n }\n\n}\n\nexport let gui = new GUI();","import { Detector } from \"./utils/webgl-detect.js\";\nimport { JonTrombone } from \"./jon-trombone.js\";\n\n// Optionally bundle three.js as part of the project\n//import THREELib from \"three-js\";\n//var THREE = THREELib(); // return THREE JS\n\nlet Init = () => {\n let container = document.getElementById(\"jon-trombone-container\");\n\n if ( !Detector.HasWebGL() ) {\n //exit(\"WebGL is not supported on this browser.\");\n console.log(\"WebGL is not supported on this browser.\");\n container.innerHTML = Detector.GetErrorHTML();\n container.classList.add(\"no-webgl\");\n }\n else{\n let jonTrombone = new JonTrombone(container);\n }\n}\n\nif (document.readyState === 'complete') {\n Init();\n} else {\n window.onload = () => {\n Init();\n }\n}","import { ModelLoader } from \"./utils/model-loader.js\";\nimport { StartOverlay } from \"./utils/start-overlay.js\";\nimport { PinkTrombone } from \"./pink-trombone/pink-trombone.js\";\nimport { MidiController } from \"./midi/midi-controller.js\";\nimport { TTSController } from \"./tts/tts-controller.js\";\nimport { gui } from \"./gui.js\";\n\nclass JonTrombone {\n\n constructor(container, finishedCallback) {\n this.container = container;\n this.container.style.position = \"relative\";\n this.container.style.cursor = \"default\";\n\n // Set up renderer and embed in container\n this.renderer = new THREE.WebGLRenderer( { alpha: true } );\n this.renderer.setPixelRatio(window.devicePixelRatio);\n this.renderer.setSize(this.container.offsetWidth, this.container.offsetHeight);\n this.renderer.setClearColor(0x000000, 0);\n this.container.appendChild(this.renderer.domElement);\n\n // Set up scene and view\n let aspect = this.container.offsetWidth / this.container.offsetHeight;\n this.camera = new THREE.PerspectiveCamera( 45, aspect, 0.1, 100 );\n this.scene = new THREE.Scene();\n\n // Export scene for three js inspector\n //window.scene = this.scene;\n\n // Set up clock for timing\n this.clock = new THREE.Clock();\n\n let startDelayMS = 1000;\n this.trombone = new PinkTrombone(this);\n setTimeout(()=> {\n this.trombone.StartAudio();\n //this.trombone.SetMute(true);\n this.moveJaw = true;\n }, startDelayMS);\n\n // Mute button for trombone\n // let button = document.createElement(\"button\");\n // button.innerHTML = \"Mute\";\n // button.style.cssText = \"position: absolute; display: block; top: 0; left: 0;\";\n // this.container.appendChild(button);\n // button.addEventListener (\"click\", () => {\n // this.trombone.ToggleMute();\n // button.innerHTML = this.trombone.muted ? \"Unmute\" : \"Mute\";\n // });\n\n this.jawFlapSpeed = 20.0;\n this.jawOpenOffset = 0.19;\n this.moveJaw = false;\n this.legato = false;\n this.flapWhileSinging = false;\n\n this.midiController = new MidiController(this);\n\n // let tts = new TTSController();\n // console.log(tts.GetGraphemes(\"Testing one two three 1 2 3\"));\n\n this.SetUpThree();\n this.SetUpScene();\n\n let startOverlay = new StartOverlay(this.container, this.trombone.audioSystem.audioContext);\n\n // Start the update loop\n this.OnUpdate();\n\n gui.Init(this, this.container);\n }\n\n /**\n * Set up non-scene config for Three.js\n */\n SetUpThree() {\n if(THREE.OrbitControls !== undefined){\n // Add orbit controls\n this.controls = new THREE.OrbitControls( this.camera, this.renderer.domElement );\n this.controls.target.set( 0, 0, 0 );\n this.controls.update();\n } else {\n console.warn(\"No THREE.OrbitControls detected. Include to allow interaction with the model.\");\n }\n }\n\n /**\n * Populates and configures objects within the scene.\n */\n SetUpScene() {\n\n // Set camera position\n this.camera.position.set( 0, 0, 0.5 );\n\n // Lights\n let light1 = new THREE.HemisphereLight(0xffffff, 0x444444, 1.0);\n light1.name = \"Hemisphere Light\";\n light1.position.set(0, 1, 0);\n this.scene.add(light1);\n\n let light2 = new THREE.DirectionalLight(0xffffff, 1.0);\n light2.name = \"Directional Light\";\n light2.position.set(0, 1, 1);\n light2.target.position.set(0, 0, 0);\n this.scene.add(light2);\n\n // Load the Jon model and place it in the scene\n ModelLoader.LoadJSON(\"../resources/jon/three/jon.json\", (object) => {\n this.jon = object;\n this.scene.add( this.jon );\n this.jon.rotation.y = (THREE.Math.degToRad(15));\n\n this.jaw = this.jon.skeleton.bones.find((obj) => {\n return obj.name == \"Bone.006\";\n });\n if(this.jaw){\n this.jawShutZ = this.jaw.position.z;\n }\n });\n\n\n }\n\n /**\n * Called every frame. Continues indefinitely after being called once.\n */\n OnUpdate() {\n let deltaTime = this.clock.getDelta();\n requestAnimationFrame( this.OnUpdate.bind(this) );\n\n if(this.midiController.playing){\n\n let notes = this.midiController.GetPitches();\n if(notes != this.lastNotes){\n // Do the note\n if(notes !== undefined){ //&& notes.length != 0){ \n // Note on\n // Play frequency\n for (let i = 0; i < this.trombone.voices.length; i++){\n if (i >= notes.length) {\n if (!this.legato) this.trombone.voices[i].glottis.loudness = 0;\n if (this.moveJaw) this.trombone.voices[i].tractUI.SetLipsClosed(1);\n continue\n }\n\n this.trombone.voices[i].glottis.UIFrequency = this.midiController.MIDIToFrequency(notes[i].midi);\n this.trombone.voices[i].glottis.loudness = notes[i].velocity;\n\n if (this.moveJaw) this.trombone.voices[i].tractUI.SetLipsClosed(0);\n }\n // let note = notes[0];\n // if(notes.length > 1){\n // //console.log (\"chord\");\n // }\n // let freq = this.midiController.MIDIToFrequency(note.midi);\n // //console.log(freq);\n // this.trombone.glottis.UIFrequency = freq;\n // this.trombone.glottis.loudness = note.velocity;\n // Open jaw\n if (this.moveJaw) this.jaw.position.z = this.jawShutZ + this.jawOpenOffset;\n for(let voice of this.trombone.voices) {\n if (this.moveJaw) voice.tractUI.SetLipsClosed(0);\n }\n\n } \n\n if(notes.length == 0) {\n if (this.moveJaw) this.jaw.position.z = this.jawShutZ;\n \n }\n // else { \n // // Note off\n // if (!this.legato) this.trombone.glottis.loudness = 0;\n // // Close jaw\n // this.jaw.position.z = this.jawShutZ;\n // // this.trombone.tractUI.SetLipsClosed(1);\n\n // }\n\n this.lastNotes = notes;\n }\n\n }\n\n if(this.jaw && this.moveJaw && (!this.midiController.playing || this.flapWhileSinging)){\n let time = this.clock.getElapsedTime();// % 60;\n\n // Move the jaw\n let percent = (Math.sin(time * this.jawFlapSpeed) + 1.0) / 2.0;\n this.jaw.position.z = this.jawShutZ + (percent * this.jawOpenOffset);\n\n // Make the audio match the jaw position\n for(let voice of this.trombone.voices) {\n voice.tractUI.SetLipsClosed(1.0 - percent);\n }\n\n }\n\n // Render\n this.renderer.render(this.scene, this.camera);\n\n }\n\n}\n\nexport { JonTrombone };","let MidiConvert = require('midiconvert');\n\n/**\n * Simple class for MIDI playback.\n * The paradigm here's a bit weird; it's up to an external\n * source to actually produce audio. This class just manages\n * a timer, which GetPitch() reads to produce the \"current\"\n * note information. \n * \n * As an example of usage, jon-trombone calls PlaySong() to\n * begin, and then every frame uses GetPitch() to figure out\n * what the current frequency to produce is.\n */\nclass MidiController {\n\n constructor(controller) {\n this.controller = controller;\n\n this.midi = null;\n\n this.playing = false;\n this.currentTrack = 5;\n\n this.baseFreq = 440; //110 is A4\n\n this.clock = new THREE.Clock(false);\n }\n\n /**\n * Loads and parses a MIDI file.\n */\n LoadSong(path, callback){\n this.Stop();\n this.midi = null;\n MidiConvert.load(path, (midi) => {\n console.log(\"MIDI loaded.\");\n this.midi = midi;\n console.log(this.midi);\n if(callback) callback(midi);\n });\n }\n\n LoadSongDirect(file){\n this.Stop();\n this.midi = MidiConvert.parse(file);\n console.log(\"MIDI loaded.\");\n console.log(this.midi);\n }\n\n /**\n * Gets the pitch for the specified track at the current time in the song.\n */\n GetPitch(trackIndex = this.currentTrack){\n let time = this.GetSongProgress();\n\n // Constrain track specified to valid range\n trackIndex = Math.min(trackIndex, this.midi.tracks.length - 1);\n trackIndex = Math.max(trackIndex, 0);\n\n return this.midi.tracks[trackIndex].notes.find((item) => {\n return item.noteOn <= time && time <= item.noteOff;\n });\n }\n\n GetPitches(trackIndex = this.currentTrack){\n let time = this.GetSongProgress();\n\n // Constrain track specified to valid range\n trackIndex = Math.min(trackIndex, this.midi.tracks.length - 1);\n trackIndex = Math.max(trackIndex, 0);\n\n return this.midi.tracks[trackIndex].notes.filter(item => \n item.noteOn <= time && time <= item.noteOff);\n }\n\n PlaySong(track = 3){\n if(this.playing){\n return;\n }\n\n // If no song is specified, load a song\n if(!this.midi){\n console.log(\"No MIDI is loaded. Loading an example...\");\n this.LoadSong('../resources/midi/bohemian-rhapsody.mid', () => {\n this.PlaySong();\n });\n return;\n }\n\n // Turn off some stuff so the singing kind of sounds okay\n this.EnterSingMode();\n\n this.currentTrack = track;\n this.clock.start();\n this.playing = true;\n\n console.log(\"Playback started.\");\n\n }\n\n GetSongProgress(){\n return this.clock.getElapsedTime();\n }\n\n /**\n * Converts from a MIDI note code to its corresponding frequency.\n * @param {*} midiCode \n */\n MIDIToFrequency(midiCode){\n return this.baseFreq * Math.pow(2, (midiCode - 69) / 12);\n }\n\n /**\n * Restarts the playback.\n */\n Restart(){\n console.log(\"Playback moved to beginning.\");\n this.clock = new THREE.Clock();\n }\n\n /**\n * Stops playback.\n */\n Stop() {\n if(!this.playing){\n return;\n }\n console.log(\"Playback stopped.\");\n this.clock.stop();\n this.playing = false;\n this.ExitSingMode();\n }\n\n /**\n * Sets up the trombone for singing.\n */\n EnterSingMode(){\n if(this.backup_settings){\n return;\n }\n\n this.backup_settings = {};\n\n this.backup_settings[\"autoWobble\"] = this.controller.trombone.autoWobble;\n this.controller.trombone.autoWobble = false;\n\n for(let voice of this.controller.trombone.voices) {\n let voiceBackup = {}\n\n voiceBackup[\"addPitchVariance\"] = voice.glottis.addPitchVariance;\n voice.glottis.addPitchVariance = false;\n\n voiceBackup[\"addTensenessVariance\"] = voice.glottis.addTensenessVariance;\n voice.glottis.addTensenessVariance = false;\n\n voiceBackup[\"vibratoFrequency\"] = voice.glottis.vibratoFrequency;\n voice.glottis.vibratoFrequency = 0;\n\n voiceBackup[\"frequency\"] = voice.glottis.UIFrequency;\n\n voiceBackup[\"loudness\"] = voice.glottis.loudness;\n voice.glottis.loudness = 0;\n\n this.backup_settings[`${voice.id}`] = voiceBackup\n }\n }\n\n /**\n * Restores the trombone to the state it was in before singing.\n */\n ExitSingMode(){\n if(!this.backup_settings) {\n return;\n }\n\n this.controller.trombone.autoWobble = this.backup_settings[\"autoWobble\"];\n\n for(let voice of this.controller.trombone.voices) {\n let backup = this.backup_settings[`${voice.id}`]\n voice.glottis.addPitchVariance = backup[\"addPitchVariance\"];\n voice.glottis.addTensenessVariance = backup[\"addTensenessVariance\"];\n voice.glottis.vibratoFrequency = backup[\"vibratoFrequency\"];\n voice.glottis.UIFrequency = backup[\"frequency\"];\n voice.glottis.loudness = backup[\"loudness\"];\n }\n\n this.backup_settings = null;\n }\n\n}\n\nexport { MidiController };","\n\nclass AudioSystem { \n\n constructor(trombone) {\n this.trombone = trombone;\n\n this.blockLength = 512;\n this.blockTime = 1;\n this.soundOn = false;\n\n }\n\n init() {\n window.AudioContext = window.AudioContext||window.webkitAudioContext;\n this.audioContext = new window.AudioContext();\n this.sampleRate = this.audioContext.sampleRate;\n \n this.blockTime = this.blockLength/this.sampleRate;\n\n this.processors = [];\n }\n \n startSound() {\n for (let i = 0; i < this.trombone.voices.length; i++) {\n //scriptProcessor may need a dummy input channel on iOS\n let scriptProcessor = this.audioContext.createScriptProcessor(this.blockLength, 2, 1);\n scriptProcessor.connect(this.audioContext.destination);\n scriptProcessor.onaudioprocess = (e) => {this.doScriptProcessor(e, i)};\n \n var whiteNoise = this.createWhiteNoiseNode(2 * this.sampleRate); // 2 seconds of noise\n \n var aspirateFilter = this.audioContext.createBiquadFilter();\n aspirateFilter.type = \"bandpass\";\n aspirateFilter.frequency.value = 500;\n aspirateFilter.Q.value = 0.5;\n whiteNoise.connect(aspirateFilter); // Use white noise as input for filter\n aspirateFilter.connect(scriptProcessor); // Use this as input 0 for script processor\n \n var fricativeFilter = this.audioContext.createBiquadFilter();\n fricativeFilter.type = \"bandpass\";\n fricativeFilter.frequency.value = 1000;\n fricativeFilter.Q.value = 0.5;\n whiteNoise.connect(fricativeFilter); // Use white noise as input\n fricativeFilter.connect(scriptProcessor); // Use this as input 1 for script processor\n \n whiteNoise.start(0);\n this.processors.push(scriptProcessor);\n }\n }\n \n createWhiteNoiseNode(frameCount) {\n var myArrayBuffer = this.audioContext.createBuffer(1, frameCount, this.sampleRate);\n\n var nowBuffering = myArrayBuffer.getChannelData(0);\n for (var i = 0; i < frameCount; i++) \n {\n nowBuffering[i] = Math.random();// gaussian();\n }\n\n var source = this.audioContext.createBufferSource();\n source.buffer = myArrayBuffer;\n source.loop = true;\n\n return source;\n }\n \n doScriptProcessor(event, index) {\n var inputArray1 = event.inputBuffer.getChannelData(0); // Glottis input\n var inputArray2 = event.inputBuffer.getChannelData(1); // Tract input\n var outArray = event.outputBuffer.getChannelData(0); // Output (mono)\n\n let voice = this.trombone.voices[index];\n\n let N = outArray.length;\n for (var j = 0; j < N; j++)\n {\n var lambda1 = j/N; // Goes from 0 to 1\n var lambda2 = (j+0.5)/N;\n var glottalOutput = voice.glottis.runStep(lambda1, inputArray1[j]); \n \n var vocalOutput = 0;\n //Tract runs at twice the sample rate \n voice.tract.runStep(glottalOutput, inputArray2[j], lambda1);\n vocalOutput += voice.tract.lipOutput + voice.tract.noseOutput;\n voice.tract.runStep(glottalOutput, inputArray2[j], lambda2);\n vocalOutput += voice.tract.lipOutput + voice.tract.noseOutput;\n outArray[j] = vocalOutput * 0.125;\n\n // Solves background hissing problem but introduces popping.\n //if(voice.glottis.loudness == 0) outArray[j] = 0;\n }\n\n voice.glottis.finishBlock();\n voice.tract.finishBlock();\n }\n \n mute() {\n for(let processor of this.processors) {\n processor.disconnect();\n }\n }\n \n unmute() {\n for(let processor of this.processors) {\n processor.connect(this.audioContext.destination);\n }\n }\n \n}\n\nexports.AudioSystem = AudioSystem;","//import noise from \"../noise.js\";\n\nimport { Noise } from \"../noise.js\";\n\nclass Glottis {\n\n constructor(trombone, id) {\n this.trombone = trombone;\n this.noise = new Noise();\n this.noise.seed(Date.now() + id);\n\n this.timeInWaveform = 0;\n this.oldFrequency = 140;\n this.newFrequency = 140;\n this.UIFrequency = 140;\n this.smoothFrequency = 140;\n this.oldTenseness = 0.6;\n this.newTenseness = 0.6;\n this.UITenseness = 0.6;\n this.totalTime = 0;\n this.vibratoAmount = 0.005;\n this.vibratoFrequency = 6;\n this.intensity = 0;\n this.loudness = 1;\n this.isTouched = false;\n this.touch = 0;\n this.x = 240;\n this.y = 530;\n\n this.baseNote = 87.3071; //F\n\n this.output;\n\n /// Allow pitch to wobble over time\n this.addPitchVariance = true;\n /// Allow tenseness to wobble over time\n this.addTensenessVariance = true;\n\n }\n \n init() {\n this.setupWaveform(0);\n }\n \n runStep(lambda, noiseSource) {\n var timeStep = 1.0 / this.trombone.audioSystem.sampleRate;\n this.timeInWaveform += timeStep;\n this.totalTime += timeStep;\n if (this.timeInWaveform > this.waveformLength) \n {\n this.timeInWaveform -= this.waveformLength;\n this.setupWaveform(lambda);\n }\n var out = this.normalizedLFWaveform(this.timeInWaveform/this.waveformLength);\n var aspiration = this.intensity*(1.0-Math.sqrt(this.UITenseness))*this.getNoiseModulator()*noiseSource;\n aspiration *= 0.2 + 0.02 * this.noise.simplex1(this.totalTime * 1.99);\n out += aspiration;\n return out;\n }\n \n getNoiseModulator() {\n var voiced = 0.1+0.2*Math.max(0,Math.sin(Math.PI*2*this.timeInWaveform/this.waveformLength));\n //return 0.3;\n return this.UITenseness* this.intensity * voiced + (1-this.UITenseness* this.intensity ) * 0.3;\n }\n \n finishBlock() {\n var vibrato = 0;\n if (this.addPitchVariance) {\n // Add small imperfections to the vocal output\n vibrato += this.vibratoAmount * Math.sin(2*Math.PI * this.totalTime *this.vibratoFrequency); \n vibrato += 0.02 * this.noise.simplex1(this.totalTime * 4.07);\n vibrato += 0.04 * this.noise.simplex1(this.totalTime * 2.15);\n }\n \n if (this.trombone.autoWobble)\n {\n vibrato += 0.2 * this.noise.simplex1(this.totalTime * 0.98);\n vibrato += 0.4 * this.noise.simplex1(this.totalTime * 0.5);\n }\n\n if (this.UIFrequency>this.smoothFrequency) \n this.smoothFrequency = Math.min(this.smoothFrequency * 1.1, this.UIFrequency);\n if (this.UIFrequency<this.smoothFrequency) \n this.smoothFrequency = Math.max(this.smoothFrequency / 1.1, this.UIFrequency);\n this.oldFrequency = this.newFrequency;\n this.newFrequency = this.smoothFrequency * (1+vibrato);\n this.oldTenseness = this.newTenseness;\n\n if (this.addTensenessVariance)\n this.newTenseness = this.UITenseness + 0.1*this.noise.simplex1(this.totalTime*0.46)+0.05*this.noise.simplex1(this.totalTime*0.36);\n else\n this.newTenseness = this.UITenseness;\n\n if (!this.isTouched && this.trombone.alwaysVoice) this.newTenseness += (3-this.UITenseness)*(1-this.intensity);\n \n if (this.isTouched || this.trombone.alwaysVoice)\n this.intensity += 0.13;\n this.intensity = Math.clamp(this.intensity, 0, 1);\n }\n \n /// Queues up a single wave?\n setupWaveform(lambda) {\n this.frequency = this.oldFrequency*(1-lambda) + this.newFrequency*lambda;\n var tenseness = this.oldTenseness*(1-lambda) + this.newTenseness*lambda;\n this.Rd = 3*(1-tenseness);\n this.waveformLength = 1.0/this.frequency;\n \n var Rd = this.Rd;\n if (Rd<0.5) Rd = 0.5;\n if (Rd>2.7) Rd = 2.7;\n // normalized to time = 1, Ee = 1\n var Ra = -0.01 + 0.048*Rd;\n var Rk = 0.224 + 0.118*Rd;\n var Rg = (Rk/4)*(0.5+1.2*Rk)/(0.11*Rd-Ra*(0.5+1.2*Rk));\n \n var Ta = Ra;\n var Tp = 1 / (2*Rg);\n var Te = Tp + Tp*Rk; //\n \n var epsilon = 1/Ta;\n var shift = Math.exp(-epsilon * (1-Te));\n var Delta = 1 - shift; //divide by this to scale RHS\n \n var RHSIntegral = (1/epsilon)*(shift - 1) + (1-Te)*shift;\n RHSIntegral = RHSIntegral/Delta;\n \n var totalLowerIntegral = - (Te-Tp)/2 + RHSIntegral;\n var totalUpperIntegral = -totalLowerIntegral;\n \n var omega = Math.PI/Tp;\n var s = Math.sin(omega*Te);\n var y = -Math.PI*s*totalUpperIntegral / (Tp*2);\n var z = Math.log(y);\n var alpha = z/(Tp/2 - Te);\n var E0 = -1 / (s*Math.exp(alpha*Te));\n this.alpha = alpha;\n this.E0 = E0;\n this.epsilon = epsilon;\n this.shift = shift;\n this.Delta = Delta;\n this.Te=Te;\n this.omega = omega;\n }\n \n \n normalizedLFWaveform(t) { \n if (t>this.Te) this.output = (-Math.exp(-this.epsilon * (t-this.Te)) + this.shift)/this.Delta;\n else this.output = this.E0 * Math.exp(this.alpha*t) * Math.sin(this.omega * t);\n \n return this.output * this.intensity * this.loudness;\n }\n}\n\nexport { Glottis };","class TractUI\n{\n\n constructor(trombone, tract) {\n this.trombone = trombone;\n this.tract = tract;\n \n this.originX = 340; \n this.originY = 449; \n this.radius = 298; \n this.scale = 60;\n this.tongueIndex = 12.9;\n this.tongueDiameter = 2.43;\n this.innerTongueControlRadius = 2.05;\n this.outerTongueControlRadius = 3.5;\n this.tongueTouch = 0;\n this.angleScale = 0.64;\n this.angleOffset = -0.24;\n this.noseOffset = 0.8;\n this.gridOffset = 1.7;\n\n /// Final openness of the mouth (closer to 0 is more closed)\n this.target = 0.1;\n /// Index in the throat array to move to target\n this.index = 42;\n /// Number of throat segments to close around the index\n this.radius = 0;\n }\n \n init() {\n let Tract = this.tract;\n\n this.setRestDiameter();\n for (var i=0; i<Tract.n; i++) \n {\n Tract.diameter[i] = Tract.targetDiameter[i] = Tract.restDiameter[i];\n }\n\n this.tongueLowerIndexBound = Tract.bladeStart+2;\n this.tongueUpperIndexBound = Tract.tipStart-3;\n this.tongueIndexCentre = 0.5*(this.tongueLowerIndexBound+this.tongueUpperIndexBound);\n }\n \n getIndex(x,y) {\n let Tract = this.tract;\n\n var xx = x-this.originX; var yy = y-this.originY;\n var angle = Math.atan2(yy, xx);\n while (angle> 0) angle -= 2*Math.PI;\n return (Math.PI + angle - this.angleOffset)*(Tract.lipStart-1) / (this.angleScale*Math.PI);\n }\n\n getDiameter(x,y) {\n var xx = x-this.originX; var yy = y-this.originY;\n return (this.radius-Math.sqrt(xx*xx + yy*yy))/this.scale;\n }\n \n setRestDiameter() {\n let Tract = this.tract;\n\n for (var i=Tract.bladeStart; i<Tract.lipStart; i++)\n {\n var t = 1.1 * Math.PI*(this.tongueIndex - i)/(Tract.tipStart - Tract.bladeStart);\n var fixedTongueDiameter = 2+(this.tongueDiameter-2)/1.5;\n var curve = (1.5-fixedTongueDiameter+this.gridOffset)*Math.cos(t);\n if (i == Tract.bladeStart-2 || i == Tract.lipStart-1) curve *= 0.8;\n if (i == Tract.bladeStart || i == Tract.lipStart-2) curve *= 0.94; \n Tract.restDiameter[i] = 1.5 - curve;\n }\n }\n\n /**\n * Sets the lips of the modeled tract to be closed by the specified amount.\n * @param {number} progress Percentage closed (number between 0 and 1)\n */\n SetLipsClosed(progress) {\n\n let Tract = this.tract;\n \n this.setRestDiameter();\n for (var i=0; i<Tract.n; i++) Tract.targetDiameter[i] = Tract.restDiameter[i]; \n\n // Disable this behavior if the mouth is closed a certain amount\n //if (progress > 0.8 || progress < 0.1) return;\n \n for(let i= this.index - this.radius; i <= this.index + this.radius; i++){\n if (i > Tract.targetDiameter.length || i < 0) continue;\n let interp = Math.lerp(Tract.restDiameter[i], this.target, progress);\n Tract.targetDiameter[i] = interp;\n }\n }\n\n\n}\n\nexport { TractUI };","class Tract {\n\n constructor(trombone, glottis) {\n this.trombone = trombone;\n this.glottis = glottis;\n \n this.n = 44;\n this.bladeStart = 10;\n this.tipStart = 32;\n this.lipStart = 39;\n this.R = []; //component going right\n this.L = []; //component going left\n this.reflection = [];\n this.junctionOutputR = [];\n this.junctionOutputL = [];\n this.diameter = [];\n this.restDiameter = [];\n this.targetDiameter = [];\n this.newDiameter = [];\n this.A = [];\n this.glottalReflection = 0.75;\n this.lipReflection = -0.85;\n this.lastObstruction = -1;\n this.fade = 1.0; //0.9999,\n this.movementSpeed = 15; //cm per second\n this.transients = [];\n this.lipOutput = 0;\n this.noseOutput = 0;\n this.velumTarget = 0.01;\n }\n\n init() {\n this.bladeStart = Math.floor(this.bladeStart*this.n/44);\n this.tipStart = Math.floor(this.tipStart*this.n/44);\n this.lipStart = Math.floor(this.lipStart*this.n/44); \n this.diameter = new Float64Array(this.n);\n this.restDiameter = new Float64Array(this.n);\n this.targetDiameter = new Float64Array(this.n);\n this.newDiameter = new Float64Array(this.n);\n for (var i=0; i<this.n; i++)\n {\n var diameter = 0;\n if (i<7*this.n/44-0.5) diameter = 0.6;\n else if (i<12*this.n/44) diameter = 1.1;\n else diameter = 1.5;\n this.diameter[i] = this.restDiameter[i] = this.targetDiameter[i] = this.newDiameter[i] = diameter;\n }\n this.R = new Float64Array(this.n);\n this.L = new Float64Array(this.n);\n this.reflection = new Float64Array(this.n+1);\n this.newReflection = new Float64Array(this.n+1);\n this.junctionOutputR = new Float64Array(this.n+1);\n this.junctionOutputL = new Float64Array(this.n+1);\n this.A =new Float64Array(this.n);\n \n this.noseLength = Math.floor(28*this.n/44)\n this.noseStart = this.n-this.noseLength + 1;\n this.noseR = new Float64Array(this.noseLength);\n this.noseL = new Float64Array(this.noseLength);\n this.noseJunctionOutputR = new Float64Array(this.noseLength+1);\n this.noseJunctionOutputL = new Float64Array(this.noseLength+1); \n this.noseReflection = new Float64Array(this.noseLength+1);\n this.noseDiameter = new Float64Array(this.noseLength);\n this.noseA = new Float64Array(this.noseLength);\n for (var i=0; i<this.noseLength; i++)\n {\n var diameter;\n var d = 2*(i/this.noseLength);\n if (d<1) diameter = 0.4+1.6*d;\n else diameter = 0.5+1.5*(2-d);\n diameter = Math.min(diameter, 1.9);\n this.noseDiameter[i] = diameter;\n } \n this.newReflectionLeft = this.newReflectionRight = this.newReflectionNose = 0;\n this.calculateReflections(); \n this.calculateNoseReflections();\n this.noseDiameter[0] = this.velumTarget;\n }\n \n reshapeTract(deltaTime) {\n var amount = deltaTime * this.movementSpeed; ; \n var newLastObstruction = -1;\n for (var i=0; i<this.n; i++)\n {\n var diameter = this.diameter[i];\n var targetDiameter = this.targetDiameter[i];\n if (diameter <= 0) newLastObstruction = i;\n var slowReturn; \n if (i<this.noseStart) slowReturn = 0.6;\n else if (i >= this.tipStart) slowReturn = 1.0; \n else slowReturn = 0.6+0.4*(i-this.noseStart)/(this.tipStart-this.noseStart);\n this.diameter[i] = Math.moveTowards(diameter, targetDiameter, slowReturn*amount, 2*amount);\n }\n if (this.lastObstruction>-1 && newLastObstruction == -1 && this.noseA[0]<0.05)\n {\n this.addTransient(this.lastObstruction);\n }\n this.lastObstruction = newLastObstruction;\n \n amount = deltaTime * this.movementSpeed; \n this.noseDiameter[0] = Math.moveTowards(this.noseDiameter[0], this.velumTarget, \n amount*0.25, amount*0.1);\n this.noseA[0] = this.noseDiameter[0]*this.noseDiameter[0]; \n }\n \n calculateReflections() {\n for (var i=0; i<this.n; i++) \n {\n this.A[i] = this.diameter[i]*this.diameter[i]; //ignoring PI etc.\n }\n for (var i=1; i<this.n; i++)\n {\n this.reflection[i] = this.newReflection[i];\n if (this.A[i] == 0) this.newReflection[i] = 0.999; //to prevent some bad behaviour if 0\n else this.newReflection[i] = (this.A[i-1]-this.A[i]) / (this.A[i-1]+this.A[i]); \n }\n \n //now at junction with nose\n\n this.reflectionLeft = this.newReflectionLeft;\n this.reflectionRight = this.newReflectionRight;\n this.reflectionNose = this.newReflectionNose;\n var sum = this.A[this.noseStart]+this.A[this.noseStart+1]+this.noseA[0];\n this.newReflectionLeft = (2*this.A[this.noseStart]-sum)/sum;\n this.newReflectionRight = (2*this.A[this.noseStart+1]-sum)/sum; \n this.newReflectionNose = (2*this.noseA[0]-sum)/sum; \n }\n\n calculateNoseReflections() {\n for (var i=0; i<this.noseLength; i++) \n {\n this.noseA[i] = this.noseDiameter[i]*this.noseDiameter[i]; \n }\n for (var i=1; i<this.noseLength; i++)\n {\n this.noseReflection[i] = (this.noseA[i-1]-this.noseA[i]) / (this.noseA[i-1]+this.noseA[i]); \n }\n }\n \n runStep(glottalOutput, turbulenceNoise, lambda) {\n \n //mouth\n this.processTransients();\n this.addTurbulenceNoise(turbulenceNoise);\n \n //this.glottalReflection = -0.8 + 1.6 * Glottis.newTenseness;\n this.junctionOutputR[0] = this.L[0] * this.glottalReflection + glottalOutput;\n this.junctionOutputL[this.n] = this.R[this.n-1] * this.lipReflection; \n \n for (var i=1; i<this.n; i++)\n {\n var r = this.reflection[i] * (1-lambda) + this.newReflection[i]*lambda;\n var w = r * (this.R[i-1] + this.L[i]);\n this.junctionOutputR[i] = this.R[i-1] - w;\n this.junctionOutputL[i] = this.L[i] + w;\n } \n \n //now at junction with nose\n var i = this.noseStart;\n var r = this.newReflectionLeft * (1-lambda) + this.reflectionLeft*lambda;\n this.junctionOutputL[i] = r*this.R[i-1]+(1+r)*(this.noseL[0]+this.L[i]);\n r = this.newReflectionRight * (1-lambda) + this.reflectionRight*lambda;\n this.junctionOutputR[i] = r*this.L[i]+(1+r)*(this.R[i-1]+this.noseL[0]); \n r = this.newReflectionNose * (1-lambda) + this.reflectionNose*lambda;\n this.noseJunctionOutputR[0] = r*this.noseL[0]+(1+r)*(this.L[i]+this.R[i-1]);\n \n for (var i=0; i<this.n; i++)\n { \n this.R[i] = this.junctionOutputR[i]*0.999;\n this.L[i] = this.junctionOutputL[i+1]*0.999; \n \n //this.R[i] = Math.clamp(this.junctionOutputR[i] * this.fade, -1, 1);\n //this.L[i] = Math.clamp(this.junctionOutputL[i+1] * this.fade, -1, 1); \n \n }\n\n this.lipOutput = this.R[this.n-1];\n \n //nose \n this.noseJunctionOutputL[this.noseLength] = this.noseR[this.noseLength-1] * this.lipReflection; \n \n for (var i=1; i<this.noseLength; i++)\n {\n var w = this.noseReflection[i] * (this.noseR[i-1] + this.noseL[i]);\n this.noseJunctionOutputR[i] = this.noseR[i-1] - w;\n this.noseJunctionOutputL[i] = this.noseL[i] + w;\n }\n \n for (var i=0; i<this.noseLength; i++)\n {\n this.noseR[i] = this.noseJunctionOutputR[i] * this.fade;\n this.noseL[i] = this.noseJunctionOutputL[i+1] * this.fade; \n \n //this.noseR[i] = Math.clamp(this.noseJunctionOutputR[i] * this.fade, -1, 1);\n //this.noseL[i] = Math.clamp(this.noseJunctionOutputL[i+1] * this.fade, -1, 1); \n\n }\n\n this.noseOutput = this.noseR[this.noseLength-1];\n \n }\n \n finishBlock() { \n this.reshapeTract(this.trombone.audioSystem.blockTime);\n this.calculateReflections();\n }\n \n addTransient(position) {\n var trans = {}\n trans.position = position;\n trans.timeAlive = 0;\n trans.lifeTime = 0.2;\n trans.strength = 0.3;\n trans.exponent = 200;\n this.transients.push(trans);\n }\n \n processTransients() {\n for (var i = 0; i < this.transients.length; i++) \n {\n var trans = this.transients[i];\n var amplitude = trans.strength * Math.pow(2, -trans.exponent * trans.timeAlive);\n this.R[trans.position] += amplitude/2;\n this.L[trans.position] += amplitude/2;\n trans.timeAlive += 1.0/(this.trombone.audioSystem.sampleRate*2);\n }\n for (var i=this.transients.length-1; i>=0; i--)\n {\n var trans = this.transients[i];\n if (trans.timeAlive > trans.lifeTime)\n {\n this.transients.splice(i,1);\n }\n }\n }\n \n addTurbulenceNoise(turbulenceNoise) {\n // for (var j=0; j<UI.touchesWithMouse.length; j++)\n // {\n // var touch = UI.touchesWithMouse[j];\n // if (touch.index<2 || touch.index>Tract.n) continue;\n // if (touch.diameter<=0) continue; \n // var intensity = touch.fricative_intensity;\n // if (intensity == 0) continue;\n // this.addTurbulenceNoiseAtIndex(0.66*turbulenceNoise*intensity, touch.index, touch.diameter);\n // }\n }\n \n addTurbulenceNoiseAtIndex(turbulenceNoise, index, diameter) { \n var i = Math.floor(index);\n var delta = index - i;\n turbulenceNoise *= this.glottis.getNoiseModulator();\n var thinness0 = Math.clamp(8*(0.7-diameter),0,1);\n var openness = Math.clamp(30*(diameter-0.3), 0, 1);\n var noise0 = turbulenceNoise*(1-delta)*thinness0*openness;\n var noise1 = turbulenceNoise*delta*thinness0*openness;\n this.R[i+1] += noise0/2;\n this.L[i+1] += noise0/2;\n this.R[i+2] += noise1/2;\n this.L[i+2] += noise1/2;\n }\n};\n\nexport { Tract };","Math.clamp = function(number, min, max) {\n if (number<min) return min;\n else if (number>max) return max;\n else return number;\n}\n\nMath.moveTowards = function(current, target, amount) {\n if (current<target) return Math.min(current+amount, target);\n else return Math.max(current-amount, target);\n}\n\nMath.moveTowards = function(current, target, amountUp, amountDown) {\n if (current<target) return Math.min(current+amountUp, target);\n else return Math.max(current-amountDown, target);\n}\n\nMath.gaussian = function() {\n var s = 0;\n for (var c=0; c<16; c++) s+=Math.random();\n return (s-8)/4;\n}\n\nMath.lerp = function(a, b, t) {\n return a + (b - a) * t;\n}","/*\n * A speed-improved perlin and simplex noise algorithms for 2D.\n *\n * Based on example code by Stefan Gustavson ([email protected]).\n * Optimisations by Peter Eastman ([email protected]).\n * Better rank ordering method by Stefan Gustavson in 2012.\n * Converted to Javascript by Joseph Gentle.\n *\n * Version 2012-03-09\n *\n * This code was placed in the public domain by its original author,\n * Stefan Gustavson. You may use it as you see fit, but\n * attribution is appreciated.\n *\n */\n\nclass Grad {\n constructor(x, y, z){\n this.x = x;\n this.y = y;\n this.z = z;\n }\n\n dot2(x, y){\n return this.x*x + this.y*y;\n }\n\n dot3(x, y, z) {\n return this.x*x + this.y*y + this.z*z;\n };\n}\n\nclass Noise {\n constructor() {\n this.grad3 = [new Grad(1,1,0),new Grad(-1,1,0),new Grad(1,-1,0),new Grad(-1,-1,0),\n new Grad(1,0,1),new Grad(-1,0,1),new Grad(1,0,-1),new Grad(-1,0,-1),\n new Grad(0,1,1),new Grad(0,-1,1),new Grad(0,1,-1),new Grad(0,-1,-1)];\n this.p = [151,160,137,91,90,15,\n 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,\n 190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,\n 88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166,\n 77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,\n 102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196,\n 135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123,\n 5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,\n 223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9,\n 129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228,\n 251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107,\n 49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254,\n 138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180];\n\n // To remove the need for index wrapping, double the permutation table length\n this.perm = new Array(512);\n this.gradP = new Array(512);\n\n this.seed(Date.now());\n }\n\n seed(seed) {\n if(seed > 0 && seed < 1) {\n // Scale the seed out\n seed *= 65536;\n }\n\n seed = Math.floor(seed);\n if(seed < 256) {\n seed |= seed << 8;\n }\n\n for(var i = 0; i < 256; i++) {\n var v;\n if (i & 1) {\n v = this.p[i] ^ (seed & 255);\n } else {\n v = this.p[i] ^ ((seed>>8) & 255);\n }\n\n this.perm[i] = this.perm[i + 256] = v;\n this.gradP[i] = this.gradP[i + 256] = this.grad3[v % 12];\n }\n };\n\n // 2D simplex noise\n simplex2(xin, yin) {\n // Skewing and unskewing factors for 2, 3, and 4 dimensions\n var F2 = 0.5*(Math.sqrt(3)-1);\n var G2 = (3-Math.sqrt(3))/6;\n\n var F3 = 1/3;\n var G3 = 1/6;\n\n var n0, n1, n2; // Noise contributions from the three corners\n // Skew the input space to determine which simplex cell we're in\n var s = (xin+yin)*F2; // Hairy factor for 2D\n var i = Math.floor(xin+s);\n var j = Math.floor(yin+s);\n var t = (i+j)*G2;\n var x0 = xin-i+t; // The x,y distances from the cell origin, unskewed.\n var y0 = yin-j+t;\n // For the 2D case, the simplex shape is an equilateral triangle.\n // Determine which simplex we are in.\n var i1, j1; // Offsets for second (middle) corner of simplex in (i,j) coords\n if(x0>y0) { // lower triangle, XY order: (0,0)->(1,0)->(1,1)\n i1=1; j1=0;\n } else { // upper triangle, YX order: (0,0)->(0,1)->(1,1)\n i1=0; j1=1;\n }\n // A step of (1,0) in (i,j) means a step of (1-c,-c) in (x,y), and\n // a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where\n // c = (3-sqrt(3))/6\n var x1 = x0 - i1 + G2; // Offsets for middle corner in (x,y) unskewed coords\n var y1 = y0 - j1 + G2;\n var x2 = x0 - 1 + 2 * G2; // Offsets for last corner in (x,y) unskewed coords\n var y2 = y0 - 1 + 2 * G2;\n // Work out the hashed gradient indices of the three simplex corners\n i &= 255;\n j &= 255;\n var gi0 = this.gradP[i+this.perm[j]];\n var gi1 = this.gradP[i+i1+this.perm[j+j1]];\n var gi2 = this.gradP[i+1+this.perm[j+1]];\n // Calculate the contribution from the three corners\n var t0 = 0.5 - x0*x0-y0*y0;\n if(t0<0) {\n n0 = 0;\n } else {\n t0 *= t0;\n n0 = t0 * t0 * gi0.dot2(x0, y0); // (x,y) of grad3 used for 2D gradient\n }\n var t1 = 0.5 - x1*x1-y1*y1;\n if(t1<0) {\n n1 = 0;\n } else {\n t1 *= t1;\n n1 = t1 * t1 * gi1.dot2(x1, y1);\n }\n var t2 = 0.5 - x2*x2-y2*y2;\n if(t2<0) {\n n2 = 0;\n } else {\n t2 *= t2;\n n2 = t2 * t2 * gi2.dot2(x2, y2);\n }\n // Add contributions from each corner to get the final noise value.\n // The result is scaled to return values in the interval [-1,1].\n return 70 * (n0 + n1 + n2);\n }\n \n simplex1(x){\n return this.simplex2(x*1.2, -x*0.7);\n }\n\n}\n\nexport { Noise };\n\n// const singleton = new Noise();\n// Object.freeze(singleton);\n\n// export default singleton;","import \"./math-extensions.js\";\n\nimport { AudioSystem } from \"./components/audio-system.js\";\nimport { Glottis } from \"./components/glottis.js\";\nimport { Tract } from \"./components/tract.js\";\nimport { TractUI } from \"./components/tract-ui.js\";\n\nclass Voice {\n constructor(trombone, id) {\n this.id = id;\n\n this.glottis = new Glottis(trombone, id);\n this.glottis.init();\n\n this.tract = new Tract(trombone, this.glottis);\n this.tract.init();\n\n this.tractUI = new TractUI(trombone, this.tract);\n this.tractUI.init();\n }\n}\n\nclass PinkTrombone {\n constructor(controller){\n this.controller = controller;\n \n this.time = 0;\n this.alwaysVoice = true;\n this.autoWobble = true;\n this.noiseFreq = 500;\n this.noiseQ = 0.7;\n\n this.voices = [];\n for(let i = 0; i < 8; i++){\n let voice = new Voice(this, i);\n voice.glottis.loudness = i == 0 ? 1 : 0;\n this.voices.push(voice);\n }\n\n this.audioSystem = new AudioSystem(this);\n this.audioSystem.init();\n\n //this.StartAudio();\n //this.SetMute(true);\n\n this.muted = false;\n }\n\n StartAudio() {\n this.muted = false;\n this.audioSystem.startSound();\n }\n\n SetMute(doMute) {\n doMute ? this.audioSystem.mute() : this.audioSystem.unmute();\n this.muted = doMute;\n }\n\n ToggleMute() {\n this.SetMute(!this.muted);\n }\n\n}\n\nexport { PinkTrombone, Voice };","// const words = require('cmu-pronouncing-dictionary');\n\nexport class TTSController {\n constructor(){\n \n }\n\n // GetGraphemes(str){\n // let zeroPunctuation = str.replace(/[.,\\/#!$%\\^&\\*;:{}=\\-_`~()]/g,\"\");\n // let wordBank = []\n // for(let word of zeroPunctuation.split(' ')){\n // wordBank.push(this.GetPronunciationForWord(word));\n // }\n // return wordBank;\n // }\n\n // GetPronunciationForWord(rawWord){\n // let word = rawWord.toLowerCase();\n // if (words[word]){\n // return words[word];\n // } else {\n // // If the word isn't in the dict, ignore it for now\n // return \"None\";\n // }\n // }\n\n\n\n}","class ModelLoader {\n\n /**\n * Loads a model asynchronously. Expects an object containing\n * the path to the object, the relative path of the OBJ file,\n * and the relative path of the MTL file.\n * \n * An example:\n * let modelInfo = {\n * path: \"../resources/obj/\",\n * objFile: \"test.obj\",\n * mtlFile: \"test.mtl\"\n * }\n */\n static LoadOBJ(modelInfo, loadedCallback) {\n\n var onProgress = function( xhr ) {\n if ( xhr.lengthComputable ) {\n var percentComplete = xhr.loaded / xhr.total * 100;\n console.log( Math.round( percentComplete, 2 ) + '% downloaded' );\n }\n };\n var onError = function( xhr ) {\n };\n\n var mtlLoader = new THREE.MTLLoader();\n mtlLoader.setPath( modelInfo.path );\n\n mtlLoader.load( modelInfo.mtlFile, ( materials ) => {\n materials.preload();\n var objLoader = new THREE.OBJLoader();\n objLoader.setMaterials( materials );\n objLoader.setPath( modelInfo.path );\n objLoader.load( modelInfo.objFile, ( object ) => {\n loadedCallback(object);\n }, onProgress, onError );\n \n });\n\n }\n\n static LoadJSON(path, loadedCallback) {\n\n var onProgress = function( xhr ) {\n if ( xhr.lengthComputable ) {\n var percentComplete = xhr.loaded / xhr.total * 100;\n console.log( Math.round( percentComplete, 2 ) + '% downloaded' );\n }\n };\n var onError = function( xhr ) {\n };\n\n var loader = new THREE.JSONLoader();\n loader.load( path, ( geometry, materials ) => {\n // Apply skinning to each material so the verts are affected by bone movement\n for(let mat of materials){\n mat.skinning = true;\n }\n let mesh = new THREE.SkinnedMesh( geometry, new THREE.MultiMaterial( materials ) );\n mesh.name = \"Jon\";\n loadedCallback(mesh);\n }, onProgress, onError);\n }\n\n static LoadFBX(path, loadedCallback) {\n let manager = new THREE.LoadingManager();\n manager.onProgress = function( item, loaded, total ) {\n console.log( item, loaded, total );\n };\n\n var onProgress = function( xhr ) {\n if ( xhr.lengthComputable ) {\n var percentComplete = xhr.loaded / xhr.total * 100;\n console.log( Math.round( percentComplete, 2 ) + '% downloaded' );\n }\n };\n var onError = function( xhr ) {\n };\n\n var loader = new THREE.FBXLoader( manager );\n loader.load( path, ( object ) => {\n loadedCallback(object);\n }, onProgress, onError );\n }\n\n}\n\nexport { ModelLoader };","import StartAudioContext from 'startaudiocontext'\n\nclass StartOverlay {\n\n constructor(container, audioContext) {\n\n var iOS = /(iPad|iPhone|iPod)/g.test(navigator.userAgent);\n if (!iOS) {\n return\n }\n\n this.container = container\n\n let overlay = document.createElement(\"div\")\n this.container.appendChild(overlay)\n overlay.style.cssText = `\n width: 100%;\n height: 100%;\n text-align: center;\n position: absolute;\n left: 0;\n top: 0;\n display: block;\n background-color: rgba(0, 0, 0, 0.75);\n `\n\n let overlayText = document.createElement(\"div\")\n overlay.appendChild(overlayText);\n overlayText.style.cssText = `\n position: relative;\n top: 50%;\n transform: translateY(-50%); \n\n font-weight: bold;\n font-size: 50px;\n color: white;\n\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none; /* Non-prefixed version, currently\n supported by Chrome and Opera */\n `\n overlayText.innerHTML = `\n Tap here to begin.\n `\n\n StartAudioContext(audioContext, overlay, () => {\n console.log(\"Unlocked iOS audio\")\n overlay.remove()\n })\n\n }\n\n}\n\nexport { StartOverlay }","class Detector {\n\n //http://stackoverflow.com/questions/11871077/proper-way-to-detect-webgl-support\n static HasWebGL() {\n if (!!window.WebGLRenderingContext) {\n var canvas = document.createElement(\"canvas\"),\n names = [\"webgl\", \"experimental-webgl\", \"moz-webgl\", \"webkit-3d\"],\n context = false;\n\n for(var i=0;i<4;i++) {\n try {\n context = canvas.getContext(names[i]);\n if (context && typeof context.getParameter == \"function\") {\n // WebGL is enabled\n return true;\n }\n } catch(e) {}\n }\n\n // WebGL is supported, but disabled\n return false;\n }\n // WebGL not supported\n return false;\n }\n\n static GetErrorHTML(message = null){\n if(message == null){\n message = `Your graphics card does not seem to support \n <a href=\"http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation\">WebGL</a>. <br>\n Find out how to get it <a href=\"http://get.webgl.org/\">here</a>.`;\n }\n return `\n <div class=\"no-webgl-support\">\n <p style=\"text-align: center;\">${message}</p>\n </div>\n `\n }\n\n}\n\nexport { Detector };"],"sourceRoot":""}