diff --git a/.babelrc b/.babelrc new file mode 100644 index 00000000..0d553b29 --- /dev/null +++ b/.babelrc @@ -0,0 +1,13 @@ +{ + "presets": [ + ["@babel/preset-env", { + "targets": { + "node": "current" + } + }] + ], + "overrides": [{ + "test": "./dist/PublicLab.Editor.js", + "sourceType": "script" + }] +} diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 9fc9a042..a6326e89 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -2,4 +2,4 @@ FROM gitpod/workspace-full USER gitpod -RUN bash -c ". ~/.nvm/nvm-lazy.sh && npm install -g gulp-cli live-server" \ No newline at end of file +RUN bash -c ". ~/.nvm/nvm-lazy.sh && npm install -g gulp-cli live-server" diff --git a/.travis.yml b/.travis.yml index 3cfa5b06..61bb7084 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,14 @@ language: node_js node_js: - '10' - '12' +services: xvfb before_install: - npm install -g grunt-cli before_script: - - grunt build -script: - - grunt jasmine --force - - npm run test-ui + - npm run build +jobs: + include: + - name: "Jasmine tests" + script: grunt jasmine --force + - name: "Jest tests" + script: npm run test-ui diff --git a/Gruntfile.js b/Gruntfile.js index df05ebee..910f9855 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -43,7 +43,7 @@ module.exports = function(grunt) { jasmine: { publiclabeditor: { - src: 'dist/*.js', + src: 'dist/PublicLab.Editor.js', options: { specs: 'spec/javascripts/*spec.js', vendor: [ diff --git a/dist/PublicLab.Editor.js b/dist/PublicLab.Editor.js index 96f208b0..d35d8485 100644 --- a/dist/PublicLab.Editor.js +++ b/dist/PublicLab.Editor.js @@ -1,23844 +1,2576 @@ -(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 0) { - return { - x: rects[0].left, - y: rects[0].top, - absolute: true - }; - } - } - } - return { x: 0, y: 0 }; - } - - function readTextCoords (context, p) { - var rest = doc.createElement('span'); - var mirror = context.mirror; - var computed = context.computed; - - write(mirror, read(el).substring(0, p)); - - if (el.tagName === 'INPUT') { - mirror.textContent = mirror.textContent.replace(/\s/g, '\u00a0'); - } - - write(rest, read(el).substring(p) || '.'); - - mirror.appendChild(rest); - - return { - x: rest.offsetLeft + parseInt(computed['borderLeftWidth']), - y: rest.offsetTop + parseInt(computed['borderTopWidth']) - }; - } - - function read (el) { - return textInput ? el.value : el.innerHTML; - } - - function prepare () { - var computed = win.getComputedStyle ? getComputedStyle(el) : el.currentStyle; - var mirror = doc.createElement('div'); - var style = mirror.style; - - doc.body.appendChild(mirror); - - if (el.tagName !== 'INPUT') { - style.wordWrap = 'break-word'; - } - style.whiteSpace = 'pre-wrap'; - style.position = 'absolute'; - style.visibility = 'hidden'; - props.forEach(copy); - - if (ff) { - style.width = parseInt(computed.width) - 2 + 'px'; - if (el.scrollHeight > parseInt(computed.height)) { - style.overflowY = 'scroll'; - } - } else { - style.overflow = 'hidden'; - } - return { mirror: mirror, computed: computed }; - - function copy (prop) { - style[prop] = computed[prop]; - } - } - - function write (el, value) { - if (textInput) { - el.textContent = value; - } else { - el.innerHTML = value; - } - } - - function bind (remove) { - var op = remove ? 'remove' : 'add'; - crossvent[op](el, 'keydown', throttledRefresh); - crossvent[op](el, 'keyup', throttledRefresh); - crossvent[op](el, 'input', throttledRefresh); - crossvent[op](el, 'paste', throttledRefresh); - crossvent[op](el, 'change', throttledRefresh); - } - - function destroy () { - bind(true); - } -} - -module.exports = tailormade; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./throttle":5,"crossvent":12,"seleccion":125,"sell":127}],5:[function(require,module,exports){ -'use strict'; - -function throttle (fn, boundary) { - var last = -Infinity; - var timer; - return function bounced () { - if (timer) { - return; - } - unbound(); - - function unbound () { - clearTimeout(timer); - timer = null; - var next = last + boundary; - var now = Date.now(); - if (now > next) { - last = now; - fn(); - } else { - timer = setTimeout(unbound, next - now); - } - } - }; -} - -module.exports = throttle; - -},{}],6:[function(require,module,exports){ -'use strict'; - -var xhr = require('xhr'); -var crossvent = require('crossvent'); -var emitter = require('contra/emitter'); -var validators = { - image: isItAnImageFile -}; -var rimagemime = /^image\/(gif|png|p?jpe?g)$/i; - -function setup (fileinput, options) { - var bureaucrat = create(options); - crossvent.add(fileinput, 'change', handler, false); - - return bureaucrat; - - function handler (e) { - stop(e); - if (fileinput.files.length) { - bureaucrat.submit(fileinput.files); - } - fileinput.value = ''; - fileinput.value = null; - } -} - -function create (options) { - var o = options || {}; - o.formData = o.formData || {}; - o.fieldKey = o.fieldKey || 'uploads'; - var bureaucrat = emitter({ - submit: submit - }); - return bureaucrat; - - function submit (rawFiles) { - bureaucrat.emit('started', rawFiles); - var allFiles = Array.prototype.slice.call(rawFiles); - var validFiles = filter(allFiles); - if (!validFiles) { - bureaucrat.emit('invalid', allFiles); - return; - } - bureaucrat.emit('valid', validFiles); - var form = new FormData(); - Object.keys(o.formData).forEach(function copyFormData(key) { - form.append(key, o.formData[key]); - }); - var req = { - 'Content-Type': 'multipart/form-data', - headers: { - Accept: 'application/json' - }, - method: o.method || 'PUT', - url: o.endpoint || '/api/files', - body: form - }; - - validFiles.forEach(appendFile); - xhr(req, handleResponse); - - function appendFile (file) { - form.append(o.fieldKey, file, file.name); - } - - function handleResponse (err, res, body) { - res.body = body = getData(body); - var results = body && body.results && Array.isArray(body.results) ? body.results : []; - var failed = err || res.statusCode < 200 || res.statusCode > 299 || body instanceof Error; - if (failed) { - bureaucrat.emit('error', err); - } else { - bureaucrat.emit('success', results, body); - } - bureaucrat.emit('ended', err, results, body); - } - } - - function filter (files) { - return o.validate ? files.filter(whereValid) : files; - function whereValid (file) { - var validator = validators[o.validate] || o.validate; - return validator(file); - } - } -} - -function stop (e) { - e.stopPropagation(); - e.preventDefault(); -} - -function isItAnImageFile (file) { - return rimagemime.test(file.type); -} - -function getData (body) { - try { - return JSON.parse(body); - } catch (err) { - return err; - } -} - -module.exports = { - create: create, - setup: setup -}; - -},{"contra/emitter":11,"crossvent":7,"xhr":9}],7:[function(require,module,exports){ -(function (global){ -'use strict'; - -var customEvent = require('custom-event'); -var eventmap = require('./eventmap'); -var doc = global.document; -var addEvent = addEventEasy; -var removeEvent = removeEventEasy; -var hardCache = []; - -if (!global.addEventListener) { - addEvent = addEventHard; - removeEvent = removeEventHard; -} - -module.exports = { - add: addEvent, - remove: removeEvent, - fabricate: fabricateEvent -}; - -function addEventEasy (el, type, fn, capturing) { - return el.addEventListener(type, fn, capturing); -} - -function addEventHard (el, type, fn) { - return el.attachEvent('on' + type, wrap(el, type, fn)); -} - -function removeEventEasy (el, type, fn, capturing) { - return el.removeEventListener(type, fn, capturing); -} - -function removeEventHard (el, type, fn) { - var listener = unwrap(el, type, fn); - if (listener) { - return el.detachEvent('on' + type, listener); - } -} - -function fabricateEvent (el, type, model) { - var e = eventmap.indexOf(type) === -1 ? makeCustomEvent() : makeClassicEvent(); - if (el.dispatchEvent) { - el.dispatchEvent(e); - } else { - el.fireEvent('on' + type, e); - } - function makeClassicEvent () { - var e; - if (doc.createEvent) { - e = doc.createEvent('Event'); - e.initEvent(type, true, true); - } else if (doc.createEventObject) { - e = doc.createEventObject(); - } - return e; - } - function makeCustomEvent () { - return new customEvent(type, { detail: model }); - } -} - -function wrapperFactory (el, type, fn) { - return function wrapper (originalEvent) { - var e = originalEvent || global.event; - e.target = e.target || e.srcElement; - e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; }; - e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; }; - e.which = e.which || e.keyCode; - fn.call(el, e); - }; -} - -function wrap (el, type, fn) { - var wrapper = unwrap(el, type, fn) || wrapperFactory(el, type, fn); - hardCache.push({ - wrapper: wrapper, - element: el, - type: type, - fn: fn - }); - return wrapper; -} - -function unwrap (el, type, fn) { - var i = find(el, type, fn); - if (i) { - var wrapper = hardCache[i].wrapper; - hardCache.splice(i, 1); // free up a tad of memory - return wrapper; - } -} - -function find (el, type, fn) { - var i, item; - for (i = 0; i < hardCache.length; i++) { - item = hardCache[i]; - if (item.element === el && item.type === type && item.fn === fn) { - return i; - } - } -} - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./eventmap":8,"custom-event":14}],8:[function(require,module,exports){ -(function (global){ -'use strict'; - -var eventmap = []; -var eventname = ''; -var ron = /^on/; - -for (eventname in global) { - if (ron.test(eventname)) { - eventmap.push(eventname.slice(2)); - } -} - -module.exports = eventmap; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],9:[function(require,module,exports){ -"use strict"; -var window = require("global/window") -var isFunction = require("is-function") -var parseHeaders = require("parse-headers") -var xtend = require("xtend") - -module.exports = createXHR -createXHR.XMLHttpRequest = window.XMLHttpRequest || noop -createXHR.XDomainRequest = "withCredentials" in (new createXHR.XMLHttpRequest()) ? createXHR.XMLHttpRequest : window.XDomainRequest - -forEachArray(["get", "put", "post", "patch", "head", "delete"], function(method) { - createXHR[method === "delete" ? "del" : method] = function(uri, options, callback) { - options = initParams(uri, options, callback) - options.method = method.toUpperCase() - return _createXHR(options) - } -}) - -function forEachArray(array, iterator) { - for (var i = 0; i < array.length; i++) { - iterator(array[i]) - } -} - -function isEmpty(obj){ - for(var i in obj){ - if(obj.hasOwnProperty(i)) return false - } - return true -} - -function initParams(uri, options, callback) { - var params = uri - - if (isFunction(options)) { - callback = options - if (typeof uri === "string") { - params = {uri:uri} - } - } else { - params = xtend(options, {uri: uri}) - } - - params.callback = callback - return params -} - -function createXHR(uri, options, callback) { - options = initParams(uri, options, callback) - return _createXHR(options) -} - -function _createXHR(options) { - var callback = options.callback - if(typeof callback === "undefined"){ - throw new Error("callback argument missing") - } - - function readystatechange() { - if (xhr.readyState === 4) { - loadFunc() - } - } - - function getBody() { - // Chrome with requestType=blob throws errors arround when even testing access to responseText - var body = undefined - - if (xhr.response) { - body = xhr.response - } else { - body = xhr.responseText || getXml(xhr) - } - - if (isJson) { - try { - body = JSON.parse(body) - } catch (e) {} - } - - return body - } - - var failureResponse = { - body: undefined, - headers: {}, - statusCode: 0, - method: method, - url: uri, - rawRequest: xhr - } - - function errorFunc(evt) { - clearTimeout(timeoutTimer) - if(!(evt instanceof Error)){ - evt = new Error("" + (evt || "Unknown XMLHttpRequest Error") ) - } - evt.statusCode = 0 - callback(evt, failureResponse) - callback = noop - } - - // will load the data & process the response in a special response object - function loadFunc() { - if (aborted) return - var status - clearTimeout(timeoutTimer) - if(options.useXDR && xhr.status===undefined) { - //IE8 CORS GET successful response doesn't have a status field, but body is fine - status = 200 - } else { - status = (xhr.status === 1223 ? 204 : xhr.status) - } - var response = failureResponse - var err = null - - if (status !== 0){ - response = { - body: getBody(), - statusCode: status, - method: method, - headers: {}, - url: uri, - rawRequest: xhr - } - if(xhr.getAllResponseHeaders){ //remember xhr can in fact be XDR for CORS in IE - response.headers = parseHeaders(xhr.getAllResponseHeaders()) - } - } else { - err = new Error("Internal XMLHttpRequest Error") - } - callback(err, response, response.body) - callback = noop - - } - - var xhr = options.xhr || null - - if (!xhr) { - if (options.cors || options.useXDR) { - xhr = new createXHR.XDomainRequest() - }else{ - xhr = new createXHR.XMLHttpRequest() - } - } - - var key - var aborted - var uri = xhr.url = options.uri || options.url - var method = xhr.method = options.method || "GET" - var body = options.body || options.data || null - var headers = xhr.headers = options.headers || {} - var sync = !!options.sync - var isJson = false - var timeoutTimer - - if ("json" in options) { - isJson = true - headers["accept"] || headers["Accept"] || (headers["Accept"] = "application/json") //Don't override existing accept header declared by user - if (method !== "GET" && method !== "HEAD") { - headers["content-type"] || headers["Content-Type"] || (headers["Content-Type"] = "application/json") //Don't override existing accept header declared by user - body = JSON.stringify(options.json) - } - } - - xhr.onreadystatechange = readystatechange - xhr.onload = loadFunc - xhr.onerror = errorFunc - // IE9 must have onprogress be set to a unique function. - xhr.onprogress = function () { - // IE must die - } - xhr.ontimeout = errorFunc - xhr.open(method, uri, !sync, options.username, options.password) - //has to be after open - if(!sync) { - xhr.withCredentials = !!options.withCredentials - } - // Cannot set timeout with sync request - // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly - // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent - if (!sync && options.timeout > 0 ) { - timeoutTimer = setTimeout(function(){ - aborted=true//IE9 may still call readystatechange - xhr.abort("timeout") - var e = new Error("XMLHttpRequest timeout") - e.code = "ETIMEDOUT" - errorFunc(e) - }, options.timeout ) - } - - if (xhr.setRequestHeader) { - for(key in headers){ - if(headers.hasOwnProperty(key)){ - xhr.setRequestHeader(key, headers[key]) - } - } - } else if (options.headers && !isEmpty(options.headers)) { - throw new Error("Headers cannot be set on an XDomainRequest object") - } - - if ("responseType" in options) { - xhr.responseType = options.responseType - } - - if ("beforeSend" in options && - typeof options.beforeSend === "function" - ) { - options.beforeSend(xhr) - } - - xhr.send(body) - - return xhr - - -} - -function getXml(xhr) { - if (xhr.responseType === "document") { - return xhr.responseXML - } - var firefoxBugTakenEffect = xhr.status === 204 && xhr.responseXML && xhr.responseXML.documentElement.nodeName === "parsererror" - if (xhr.responseType === "" && !firefoxBugTakenEffect) { - return xhr.responseXML - } - - return null -} - -function noop() {} - -},{"global/window":19,"is-function":40,"parse-headers":115,"xtend":177}],10:[function(require,module,exports){ -'use strict'; - -var ticky = require('ticky'); - -module.exports = function debounce (fn, args, ctx) { - if (!fn) { return; } - ticky(function run () { - fn.apply(ctx || null, args || []); - }); -}; - -},{"ticky":130}],11:[function(require,module,exports){ -'use strict'; - -var atoa = require('atoa'); -var debounce = require('./debounce'); - -module.exports = function emitter (thing, options) { - var opts = options || {}; - var evt = {}; - if (thing === undefined) { thing = {}; } - thing.on = function (type, fn) { - if (!evt[type]) { - evt[type] = [fn]; - } else { - evt[type].push(fn); - } - return thing; - }; - thing.once = function (type, fn) { - fn._once = true; // thing.off(fn) still works! - thing.on(type, fn); - return thing; - }; - thing.off = function (type, fn) { - var c = arguments.length; - if (c === 1) { - delete evt[type]; - } else if (c === 0) { - evt = {}; - } else { - var et = evt[type]; - if (!et) { return thing; } - et.splice(et.indexOf(fn), 1); - } - return thing; - }; - thing.emit = function () { - var args = atoa(arguments); - return thing.emitterSnapshot(args.shift()).apply(this, args); - }; - thing.emitterSnapshot = function (type) { - var et = (evt[type] || []).slice(0); - return function () { - var args = atoa(arguments); - var ctx = this || thing; - if (type === 'error' && opts.throws !== false && !et.length) { throw args.length === 1 ? args[0] : args; } - et.forEach(function emitter (listen) { - if (opts.async) { debounce(listen, args, ctx); } else { listen.apply(ctx, args); } - if (listen._once) { thing.off(type, listen); } - }); - return thing; - }; - }; - return thing; -}; - -},{"./debounce":10,"atoa":2}],12:[function(require,module,exports){ -arguments[4][7][0].apply(exports,arguments) -},{"./eventmap":13,"custom-event":14,"dup":7}],13:[function(require,module,exports){ -arguments[4][8][0].apply(exports,arguments) -},{"dup":8}],14:[function(require,module,exports){ -(function (global){ - -var NativeCustomEvent = global.CustomEvent; - -function useNative () { - try { - var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } }); - return 'cat' === p.type && 'bar' === p.detail.foo; - } catch (e) { - } - return false; -} - -/** +(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;o0){return{x:rects[0].left,y:rects[0].top,absolute:true};}}}return{x:0,y:0};}function readTextCoords(context,p){var rest=doc.createElement('span');var mirror=context.mirror;var computed=context.computed;write(mirror,read(el).substring(0,p));if(el.tagName==='INPUT'){mirror.textContent=mirror.textContent.replace(/\s/g,'\u00a0');}write(rest,read(el).substring(p)||'.');mirror.appendChild(rest);return{x:rest.offsetLeft+parseInt(computed['borderLeftWidth']),y:rest.offsetTop+parseInt(computed['borderTopWidth'])};}function read(el){return textInput?el.value:el.innerHTML;}function prepare(){var computed=win.getComputedStyle?getComputedStyle(el):el.currentStyle;var mirror=doc.createElement('div');var style=mirror.style;doc.body.appendChild(mirror);if(el.tagName!=='INPUT'){style.wordWrap='break-word';}style.whiteSpace='pre-wrap';style.position='absolute';style.visibility='hidden';props.forEach(copy);if(ff){style.width=parseInt(computed.width)-2+'px';if(el.scrollHeight>parseInt(computed.height)){style.overflowY='scroll';}}else{style.overflow='hidden';}return{mirror:mirror,computed:computed};function copy(prop){style[prop]=computed[prop];}}function write(el,value){if(textInput){el.textContent=value;}else{el.innerHTML=value;}}function bind(remove){var op=remove?'remove':'add';crossvent[op](el,'keydown',throttledRefresh);crossvent[op](el,'keyup',throttledRefresh);crossvent[op](el,'input',throttledRefresh);crossvent[op](el,'paste',throttledRefresh);crossvent[op](el,'change',throttledRefresh);}function destroy(){bind(true);}}module.exports=tailormade;}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{"./throttle":5,"crossvent":12,"seleccion":125,"sell":127}],5:[function(require,module,exports){'use strict';function throttle(fn,boundary){var last=-Infinity;var timer;return function bounced(){if(timer){return;}unbound();function unbound(){clearTimeout(timer);timer=null;var next=last+boundary;var now=Date.now();if(now>next){last=now;fn();}else{timer=setTimeout(unbound,next-now);}}};}module.exports=throttle;},{}],6:[function(require,module,exports){'use strict';var xhr=require('xhr');var crossvent=require('crossvent');var emitter=require('contra/emitter');var validators={image:isItAnImageFile};var rimagemime=/^image\/(gif|png|p?jpe?g)$/i;function setup(fileinput,options){var bureaucrat=create(options);crossvent.add(fileinput,'change',handler,false);return bureaucrat;function handler(e){stop(e);if(fileinput.files.length){bureaucrat.submit(fileinput.files);}fileinput.value='';fileinput.value=null;}}function create(options){var o=options||{};o.formData=o.formData||{};o.fieldKey=o.fieldKey||'uploads';var bureaucrat=emitter({submit:submit});return bureaucrat;function submit(rawFiles){bureaucrat.emit('started',rawFiles);var allFiles=Array.prototype.slice.call(rawFiles);var validFiles=filter(allFiles);if(!validFiles){bureaucrat.emit('invalid',allFiles);return;}bureaucrat.emit('valid',validFiles);var form=new FormData();Object.keys(o.formData).forEach(function copyFormData(key){form.append(key,o.formData[key]);});var req={'Content-Type':'multipart/form-data',headers:{Accept:'application/json'},method:o.method||'PUT',url:o.endpoint||'/api/files',body:form};validFiles.forEach(appendFile);xhr(req,handleResponse);function appendFile(file){form.append(o.fieldKey,file,file.name);}function handleResponse(err,res,body){res.body=body=getData(body);var results=body&&body.results&&Array.isArray(body.results)?body.results:[];var failed=err||res.statusCode<200||res.statusCode>299||body instanceof Error;if(failed){bureaucrat.emit('error',err);}else{bureaucrat.emit('success',results,body);}bureaucrat.emit('ended',err,results,body);}}function filter(files){return o.validate?files.filter(whereValid):files;function whereValid(file){var validator=validators[o.validate]||o.validate;return validator(file);}}}function stop(e){e.stopPropagation();e.preventDefault();}function isItAnImageFile(file){return rimagemime.test(file.type);}function getData(body){try{return JSON.parse(body);}catch(err){return err;}}module.exports={create:create,setup:setup};},{"contra/emitter":11,"crossvent":7,"xhr":9}],7:[function(require,module,exports){(function(global){'use strict';var customEvent=require('custom-event');var eventmap=require('./eventmap');var doc=global.document;var addEvent=addEventEasy;var removeEvent=removeEventEasy;var hardCache=[];if(!global.addEventListener){addEvent=addEventHard;removeEvent=removeEventHard;}module.exports={add:addEvent,remove:removeEvent,fabricate:fabricateEvent};function addEventEasy(el,type,fn,capturing){return el.addEventListener(type,fn,capturing);}function addEventHard(el,type,fn){return el.attachEvent('on'+type,wrap(el,type,fn));}function removeEventEasy(el,type,fn,capturing){return el.removeEventListener(type,fn,capturing);}function removeEventHard(el,type,fn){var listener=unwrap(el,type,fn);if(listener){return el.detachEvent('on'+type,listener);}}function fabricateEvent(el,type,model){var e=eventmap.indexOf(type)===-1?makeCustomEvent():makeClassicEvent();if(el.dispatchEvent){el.dispatchEvent(e);}else{el.fireEvent('on'+type,e);}function makeClassicEvent(){var e;if(doc.createEvent){e=doc.createEvent('Event');e.initEvent(type,true,true);}else if(doc.createEventObject){e=doc.createEventObject();}return e;}function makeCustomEvent(){return new customEvent(type,{detail:model});}}function wrapperFactory(el,type,fn){return function wrapper(originalEvent){var e=originalEvent||global.event;e.target=e.target||e.srcElement;e.preventDefault=e.preventDefault||function preventDefault(){e.returnValue=false;};e.stopPropagation=e.stopPropagation||function stopPropagation(){e.cancelBubble=true;};e.which=e.which||e.keyCode;fn.call(el,e);};}function wrap(el,type,fn){var wrapper=unwrap(el,type,fn)||wrapperFactory(el,type,fn);hardCache.push({wrapper:wrapper,element:el,type:type,fn:fn});return wrapper;}function unwrap(el,type,fn){var i=find(el,type,fn);if(i){var wrapper=hardCache[i].wrapper;hardCache.splice(i,1);// free up a tad of memory +return wrapper;}}function find(el,type,fn){var i,item;for(i=0;i0){timeoutTimer=setTimeout(function(){aborted=true;//IE9 may still call readystatechange +xhr.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT";errorFunc(e);},options.timeout);}if(xhr.setRequestHeader){for(key in headers){if(headers.hasOwnProperty(key)){xhr.setRequestHeader(key,headers[key]);}}}else if(options.headers&&!isEmpty(options.headers)){throw new Error("Headers cannot be set on an XDomainRequest object");}if("responseType"in options){xhr.responseType=options.responseType;}if("beforeSend"in options&&typeof options.beforeSend==="function"){options.beforeSend(xhr);}xhr.send(body);return xhr;}function getXml(xhr){if(xhr.responseType==="document"){return xhr.responseXML;}var firefoxBugTakenEffect=xhr.status===204&&xhr.responseXML&&xhr.responseXML.documentElement.nodeName==="parsererror";if(xhr.responseType===""&&!firefoxBugTakenEffect){return xhr.responseXML;}return null;}function noop(){}},{"global/window":19,"is-function":40,"parse-headers":115,"xtend":177}],10:[function(require,module,exports){'use strict';var ticky=require('ticky');module.exports=function debounce(fn,args,ctx){if(!fn){return;}ticky(function run(){fn.apply(ctx||null,args||[]);});};},{"ticky":130}],11:[function(require,module,exports){'use strict';var atoa=require('atoa');var debounce=require('./debounce');module.exports=function emitter(thing,options){var opts=options||{};var evt={};if(thing===undefined){thing={};}thing.on=function(type,fn){if(!evt[type]){evt[type]=[fn];}else{evt[type].push(fn);}return thing;};thing.once=function(type,fn){fn._once=true;// thing.off(fn) still works! +thing.on(type,fn);return thing;};thing.off=function(type,fn){var c=arguments.length;if(c===1){delete evt[type];}else if(c===0){evt={};}else{var et=evt[type];if(!et){return thing;}et.splice(et.indexOf(fn),1);}return thing;};thing.emit=function(){var args=atoa(arguments);return thing.emitterSnapshot(args.shift()).apply(this,args);};thing.emitterSnapshot=function(type){var et=(evt[type]||[]).slice(0);return function(){var args=atoa(arguments);var ctx=this||thing;if(type==='error'&&opts.throws!==false&&!et.length){throw args.length===1?args[0]:args;}et.forEach(function emitter(listen){if(opts.async){debounce(listen,args,ctx);}else{listen.apply(ctx,args);}if(listen._once){thing.off(type,listen);}});return thing;};};return thing;};},{"./debounce":10,"atoa":2}],12:[function(require,module,exports){arguments[4][7][0].apply(exports,arguments);},{"./eventmap":13,"custom-event":14,"dup":7}],13:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments);},{"dup":8}],14:[function(require,module,exports){(function(global){var NativeCustomEvent=global.CustomEvent;function useNative(){try{var p=new NativeCustomEvent('cat',{detail:{foo:'bar'}});return'cat'===p.type&&'bar'===p.detail.foo;}catch(e){}return false;}/** * Cross-browser `CustomEvent` constructor. * * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent * * @public - */ - -module.exports = useNative() ? NativeCustomEvent : - -// IE >= 9 -'function' === typeof document.createEvent ? function CustomEvent (type, params) { - var e = document.createEvent('CustomEvent'); - if (params) { - e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail); - } else { - e.initCustomEvent(type, false, false, void 0); - } - return e; -} : - -// IE <= 8 -function CustomEvent (type, params) { - var e = document.createEventObject(); - e.type = type; - if (params) { - e.bubbles = Boolean(params.bubbles); - e.cancelable = Boolean(params.cancelable); - e.detail = params.detail; - } else { - e.bubbles = false; - e.cancelable = false; - e.detail = void 0; - } - return e; -} - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],15:[function(require,module,exports){ -'use strict'; - -require('string.prototype.repeat'); - -var replacements = { - '\\\\': '\\\\', - '\\[': '\\[', - '\\]': '\\]', - '>': '\\>', - '_': '\\_', - '\\*': '\\*', - '`': '\\`', - '#': '\\#', - '([0-9])\\.(\\s|$)': '$1\\.$2', - '\u00a9': '(c)', - '\u00ae': '(r)', - '\u2122': '(tm)', - '\u00a0': ' ', - '\u00b7': '\\*', - '\u2002': ' ', - '\u2003': ' ', - '\u2009': ' ', - '\u2018': '\'', - '\u2019': '\'', - '\u201c': '"', - '\u201d': '"', - '\u2026': '...', - '\u2013': '--', - '\u2014': '---' -}; -var replacers = Object.keys(replacements).reduce(replacer, {}); -var rspaces = /^\s+|\s+$/g; -var rdisplay = /(display|visibility)\s*:\s*[a-z]+/gi; -var rhidden = /(none|hidden)\s*$/i; -var rheading = /^H([1-6])$/; -var shallowTags = [ - 'APPLET', 'AREA', 'AUDIO', 'BUTTON', 'CANVAS', 'DATALIST', 'EMBED', 'HEAD', 'INPUT', 'MAP', - 'MENU', 'METER', 'NOFRAMES', 'NOSCRIPT', 'OBJECT', 'OPTGROUP', 'OPTION', 'PARAM', 'PROGRESS', - 'RP', 'RT', 'RUBY', 'SCRIPT', 'SELECT', 'STYLE', 'TEXTAREA', 'TITLE', 'VIDEO' -]; -var paragraphTags = [ - 'ADDRESS', 'ARTICLE', 'ASIDE', 'DIV', 'FIELDSET', 'FOOTER', 'HEADER', 'NAV', 'P', 'SECTION' -]; -var blockTags = [ - 'ADDRESS', 'ARTICLE', 'ASIDE', 'DIV', 'FIELDSET', 'FOOTER', 'HEADER', 'NAV', 'P', 'SECTION', 'UL', 'LI', 'BLOCKQUOTE', 'BR' -]; -var windowContext = require('./virtualWindowContext'); + */module.exports=useNative()?NativeCustomEvent:// IE >= 9 +'function'===typeof document.createEvent?function CustomEvent(type,params){var e=document.createEvent('CustomEvent');if(params){e.initCustomEvent(type,params.bubbles,params.cancelable,params.detail);}else{e.initCustomEvent(type,false,false,void 0);}return e;}:// IE <= 8 +function CustomEvent(type,params){var e=document.createEventObject();e.type=type;if(params){e.bubbles=Boolean(params.bubbles);e.cancelable=Boolean(params.cancelable);e.detail=params.detail;}else{e.bubbles=false;e.cancelable=false;e.detail=void 0;}return e;};}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{}],15:[function(require,module,exports){'use strict';require('string.prototype.repeat');var replacements={'\\\\':'\\\\','\\[':'\\[','\\]':'\\]','>':'\\>','_':'\\_','\\*':'\\*','`':'\\`','#':'\\#','([0-9])\\.(\\s|$)':'$1\\.$2','\u00a9':'(c)','\u00ae':'(r)','\u2122':'(tm)','\u00a0':' ','\u00b7':'\\*','\u2002':' ','\u2003':' ','\u2009':' ','\u2018':'\'','\u2019':'\'','\u201c':'"','\u201d':'"','\u2026':'...','\u2013':'--','\u2014':'---'};var replacers=Object.keys(replacements).reduce(replacer,{});var rspaces=/^\s+|\s+$/g;var rdisplay=/(display|visibility)\s*:\s*[a-z]+/gi;var rhidden=/(none|hidden)\s*$/i;var rheading=/^H([1-6])$/;var shallowTags=['APPLET','AREA','AUDIO','BUTTON','CANVAS','DATALIST','EMBED','HEAD','INPUT','MAP','MENU','METER','NOFRAMES','NOSCRIPT','OBJECT','OPTGROUP','OPTION','PARAM','PROGRESS','RP','RT','RUBY','SCRIPT','SELECT','STYLE','TEXTAREA','TITLE','VIDEO'];var paragraphTags=['ADDRESS','ARTICLE','ASIDE','DIV','FIELDSET','FOOTER','HEADER','NAV','P','SECTION'];var blockTags=['ADDRESS','ARTICLE','ASIDE','DIV','FIELDSET','FOOTER','HEADER','NAV','P','SECTION','UL','LI','BLOCKQUOTE','BR'];var windowContext=require('./virtualWindowContext');function replacer(result,key){result[key]=new RegExp(key,'g');return result;}function many(text,times){return new Array(times+1).join(text);}function padLeft(text,times){return many(' ',times)+text;}function trim(text){if(text.trim){return text.trim();}return text.replace(rspaces,'');}function attr(el,prop,direct){var proper=direct===void 0||direct;if(proper||typeof el.getAttribute!=='function'){return el[prop]||'';}return el.getAttribute(prop)||'';}function has(el,prop,direct){var proper=direct===void 0||direct;if(proper||typeof el.hasAttribute!=='function'){return el.hasOwnProperty(prop);}return el.hasAttribute(prop);}function processPlainText(text,tagName){var key;var block=paragraphTags.indexOf(tagName)!==-1||tagName==='BLOCKQUOTE';text=text.replace(/\n([ \t]*\n)+/g,'\n');text=text.replace(/\n[ \t]+/g,'\n');text=text.replace(/[ \t]+/g,' ');for(key in replacements){text=text.replace(replacers[key],replacements[key]);}text=text.replace(/(\s*)\\#/g,block?removeUnnecessaryEscapes:'$1#');return text;function removeUnnecessaryEscapes(escaped,spaces,i){return i?spaces+'#':escaped;}}function processCode(text){return text.replace(/`/g,'\\`');}function outputMapper(fn,tagName){return function bitProcessor(bit){if(bit.marker){return bit.marker;}if(!fn){return bit.text;}return fn(bit.text,tagName);};}function noop(){}function parse(html,options){return new Domador(html,options).parse();}function Domador(html,options){this.html=html||'';this.htmlIndex=0;this.options=options||{};this.markers=this.options.markers?this.options.markers.sort(asc):[];this.windowContext=windowContext(this.options);this.atLeft=this.noTrailingWhitespace=this.atP=true;this.buffer=this.childBuffer='';this.exceptions=[];this.order=1;this.listDepth=0;this.inCode=this.inPre=this.inOrderedList=this.inTable=false;this.last=null;this.left='\n';this.links=[];this.linkMap={};this.unhandled={};if(this.options.absolute===void 0){this.options.absolute=false;}if(this.options.fencing===void 0){this.options.fencing=false;}if(this.options.fencinglanguage===void 0){this.options.fencinglanguage=noop;}if(this.options.transform===void 0){this.options.transform=noop;}function asc(a,b){return a[0]-b[0];}}Domador.prototype.append=function append(text){if(this.last!=null){this.buffer+=this.last;}this.childBuffer+=text;return this.last=text;};Domador.prototype.br=function br(){this.append(' '+this.left);return this.atLeft=this.noTrailingWhitespace=true;};Domador.prototype.code=function code(){var old;old=this.inCode;this.inCode=true;return function(_this){return function after(){return _this.inCode=old;};}(this);};Domador.prototype.li=function li(){var result;result=this.inOrderedList?this.order++ +'. ':'- ';result=padLeft(result,(this.listDepth-1)*2);return this.append(result);};Domador.prototype.td=function td(header){this.noTrailingWhitespace=false;this.output(' ');this.childBuffer='';this.noTrailingWhitespace=false;return function after(){var spaces=header?0:Math.max(0,this.tableCols[this.tableCol++]-this.childBuffer.length);this.append(' '.repeat(spaces+1)+'|');this.noTrailingWhitespace=true;};};Domador.prototype.ol=function ol(){var inOrderedList,order;if(this.listDepth===0){this.p();}inOrderedList=this.inOrderedList;order=this.order;this.inOrderedList=true;this.order=1;this.listDepth++;return function(_this){return function after(){_this.inOrderedList=inOrderedList;_this.order=order;return _this.listDepth--;};}(this);};Domador.prototype.ul=function ul(){var inOrderedList,order;if(this.listDepth===0){this.p();}inOrderedList=this.inOrderedList;order=this.order;this.inOrderedList=false;this.order=1;this.listDepth++;return function(_this){return function after(){_this.inOrderedList=inOrderedList;_this.order=order;return _this.listDepth--;};}(this);};Domador.prototype.output=function output(text){if(!text){return;}if(!this.inPre){text=this.noTrailingWhitespace?text.replace(/^[ \t\n]+/,''):/^[ \t]*\n/.test(text)?text.replace(/^[ \t\n]+/,'\n'):text.replace(/^[ \t]+/,' ');}if(text===''){return;}this.atP=/\n\n$/.test(text);this.atLeft=/\n$/.test(text);this.noTrailingWhitespace=/[ \t\n]$/.test(text);return this.append(text.replace(/\n/g,this.left));};Domador.prototype.outputLater=function outputLater(text){return function(self){return function after(){return self.output(text);};}(this);};Domador.prototype.p=function p(){if(this.atP){return;}if(this.startingBlockquote){this.append('\n');}else{this.append(this.left);}if(!this.atLeft){this.append(this.left);this.atLeft=true;}return this.noTrailingWhitespace=this.atP=true;};Domador.prototype.parse=function parse(){var container;var i;var link;var ref;this.buffer='';if(!this.html){return this.buffer;}if(typeof this.html==='string'){container=this.windowContext.document.createElement('div');container.innerHTML=this.htmlLeft=this.html;}else{container=this.html;this.html=this.htmlLeft=container.innerHTML;}this.process(container);if(this.links.length){while(this.lastElement.parentElement!==container&&this.lastElement.tagName!=='BLOCKQUOTE'){this.lastElement=this.lastElement.parentElement;}if(this.lastElement.tagName!=='BLOCKQUOTE'){this.append('\n\n');}ref=this.links;for(i=0;i');return this.outputLater('');};Domador.prototype.advanceHtmlIndex=function advanceHtmlIndex(token){if(this.markers.length===0){return;}var re=new RegExp(token,'ig');var match=re.exec(this.htmlLeft);if(!match){return;}var diff=re.lastIndex;this.htmlIndex+=diff;this.htmlLeft=this.htmlLeft.slice(diff);};Domador.prototype.insertMarkers=function insertMarkers(){while(this.markers.length&&this.markers[0][0]<=this.htmlIndex){this.append(this.markers.shift()[1]);}};Domador.prototype.interleaveMarkers=function interleaveMarkers(text){var marker;var markerStart;var lastMarkerStart=0;var bits=[];while(this.markers.length&&this.markers[0][0]<=this.htmlIndex+text.length){marker=this.markers.shift();markerStart=Math.max(0,marker[0]-this.htmlIndex);bits.push({text:text.slice(lastMarkerStart,markerStart)},{marker:marker[1]});lastMarkerStart=markerStart;}bits.push({text:text.slice(lastMarkerStart)});return bits;};Domador.prototype.process=function process(el){var after;var base;var href;var i;var ref;var suffix;var summary;var title;var frameSrc;var interleaved;if(!this.isVisible(el)){return;}if((this.inTable||this.inPre)&&blockTags.indexOf(el.tagName)!==-1){return this.output(el.outerHTML);}if(el.nodeType===this.windowContext.Node.TEXT_NODE){if(!this.inPre&&el.nodeValue.replace(/\n/g,'').length===0){return;}interleaved=this.interleaveMarkers(el.nodeValue);if(this.inPre||this.inTable){return this.output(interleaved.map(outputMapper()).join(''));}if(this.inCode){return this.output(interleaved.map(outputMapper(processCode)).join(''));}return this.output(interleaved.map(outputMapper(processPlainText,el.parentElement&&el.parentElement.tagName)).join(''));}if(el.nodeType!==this.windowContext.Node.ELEMENT_NODE){return;}if(this.lastElement){// i.e not the auto-inserted
wrapper +this.insertMarkers();this.advanceHtmlIndex('<'+el.tagName);this.advanceHtmlIndex('>');var transformed=this.options.transform(el);if(transformed!==void 0){return this.output(transformed);}}this.lastElement=el;if(shallowTags.indexOf(el.tagName)!==-1){this.advanceHtmlIndex('\\/\\s?>');return;}switch(el.tagName){case'H1':case'H2':case'H3':case'H4':case'H5':case'H6':this.p();this.output(many('#',parseInt(el.tagName.match(rheading)[1]))+' ');break;case'ADDRESS':case'ARTICLE':case'ASIDE':case'DIV':case'FIELDSET':case'FOOTER':case'HEADER':case'NAV':case'P':case'SECTION':this.p();break;case'BODY':case'FORM':break;case'DETAILS':this.p();if(!has(el,'open',false)){summary=el.getElementsByTagName('summary')[0];if(summary){this.process(summary);}return;}break;case'BR':this.br();break;case'HR':this.p();this.output('---------');this.p();break;case'CITE':case'DFN':case'EM':case'I':case'U':case'VAR':this.output('_');this.noTrailingWhitespace=true;after=this.outputLater('_');break;case'MARK':this.output('');after=this.outputLater('');break;case'DT':case'B':case'STRONG':if(el.tagName==='DT'){this.p();}this.output('**');this.noTrailingWhitespace=true;after=this.outputLater('**');break;case'Q':this.output('"');this.noTrailingWhitespace=true;after=this.outputLater('"');break;case'OL':after=this.ol();break;case'UL':after=this.ul();break;case'LI':this.replaceLeft('\n');this.li();break;case'PRE':if(this.options.fencing){this.append('\n\n');this.openCodeFence(el);after=[this.pre(),this.outputLater('\n```')];}else{after=[this.pushLeft(' '),this.pre()];}break;case'CODE':case'SAMP':if(this.inPre){break;}this.output('`');after=[this.code(),this.outputLater('`')];break;case'BLOCKQUOTE':case'DD':this.startingBlockquote=true;after=this.pushLeft('> ');this.startingBlockquote=false;break;case'KBD':after=this.htmlTag('kbd');break;case'A':case'IMG':href=attr(el,el.tagName==='A'?'href':'src',this.options.absolute);if(!href){break;}title=attr(el,'title');if(title){href+=' "'+title+'"';}if(this.options.inline){suffix='('+href+')';}else{suffix='['+((base=this.linkMap)[href]!=null?base[href]:base[href]=this.links.push(href))+']';}if(el.tagName==='IMG'){this.output('!['+attr(el,'alt')+']'+suffix);return;}this.output('[');this.noTrailingWhitespace=true;after=this.outputLater(']'+suffix);break;case'IFRAME':try{if((ref=el.contentDocument)!=null?ref.documentElement:void 0){this.process(el.contentDocument.documentElement);}else{frameSrc=attr(el,'src');if(frameSrc&&this.options.allowFrame&&this.options.allowFrame(frameSrc)){this.output('');}}}catch(err){}return;}after=this.tables(el)||after;for(i=0;i');if(typeof after==='function'){after=[after];}while(after&&after.length){after.shift().call(this);}};Domador.prototype.tables=function tables(el){if(this.options.tables===false){return;}var name=el.tagName;if(name==='TABLE'){var oldInTable;oldInTable=this.inTable;this.inTable=true;this.append('\n\n');this.tableCols=[];return function(_this){return function after(){return _this.inTable=oldInTable;};}(this);}if(name==='THEAD'){return function after(){return this.append('|'+this.tableCols.reduce(reducer,'')+'\n');function reducer(all,thLength){return all+'-'.repeat(thLength+2)+'|';}};}if(name==='TH'){return[function after(){this.tableCols.push(this.childBuffer.length);},this.td(true)];}if(name==='TR'){this.tableCol=0;this.output('|');this.noTrailingWhitespace=true;return function after(){this.append('\n');};}if(name==='TD'){return this.td();}};Domador.prototype.pushLeft=function pushLeft(text){var old;old=this.left;this.left+=text;if(this.atP){this.append(text);}else{this.p();}return function(_this){return function(){_this.left=old;_this.atLeft=_this.atP=false;return _this.p();};}(this);};Domador.prototype.replaceLeft=function replaceLeft(text){if(!this.atLeft){this.append(this.left.replace(/[ ]{2,4}$/,text));return this.atLeft=this.noTrailingWhitespace=this.atP=true;}else if(this.last){return this.last=this.last.replace(/[ ]{2,4}$/,text);}};Domador.prototype.isVisible=function isVisible(el){var display;var i;var property;var visibility;var visible=true;var style=attr(el,'style',false);var properties=style!=null?typeof style.match==='function'?style.match(rdisplay):void 0:void 0;if(properties!=null){for(i=0;i","GT":">","Gt":"\u226B","gtdot":"\u22D7","gtlPar":"\u2995","gtquest":"\u2A7C","gtrapprox":"\u2A86","gtrarr":"\u2978","gtrdot":"\u22D7","gtreqless":"\u22DB","gtreqqless":"\u2A8C","gtrless":"\u2277","gtrsim":"\u2273","gvertneqq":"\u2269\uFE00","gvnE":"\u2269\uFE00","Hacek":"\u02C7","hairsp":"\u200A","half":"\u00BD","hamilt":"\u210B","HARDcy":"\u042A","hardcy":"\u044A","harrcir":"\u2948","harr":"\u2194","hArr":"\u21D4","harrw":"\u21AD","Hat":"^","hbar":"\u210F","Hcirc":"\u0124","hcirc":"\u0125","hearts":"\u2665","heartsuit":"\u2665","hellip":"\u2026","hercon":"\u22B9","hfr":"\uD835\uDD25","Hfr":"\u210C","HilbertSpace":"\u210B","hksearow":"\u2925","hkswarow":"\u2926","hoarr":"\u21FF","homtht":"\u223B","hookleftarrow":"\u21A9","hookrightarrow":"\u21AA","hopf":"\uD835\uDD59","Hopf":"\u210D","horbar":"\u2015","HorizontalLine":"\u2500","hscr":"\uD835\uDCBD","Hscr":"\u210B","hslash":"\u210F","Hstrok":"\u0126","hstrok":"\u0127","HumpDownHump":"\u224E","HumpEqual":"\u224F","hybull":"\u2043","hyphen":"\u2010","Iacute":"\u00CD","iacute":"\u00ED","ic":"\u2063","Icirc":"\u00CE","icirc":"\u00EE","Icy":"\u0418","icy":"\u0438","Idot":"\u0130","IEcy":"\u0415","iecy":"\u0435","iexcl":"\u00A1","iff":"\u21D4","ifr":"\uD835\uDD26","Ifr":"\u2111","Igrave":"\u00CC","igrave":"\u00EC","ii":"\u2148","iiiint":"\u2A0C","iiint":"\u222D","iinfin":"\u29DC","iiota":"\u2129","IJlig":"\u0132","ijlig":"\u0133","Imacr":"\u012A","imacr":"\u012B","image":"\u2111","ImaginaryI":"\u2148","imagline":"\u2110","imagpart":"\u2111","imath":"\u0131","Im":"\u2111","imof":"\u22B7","imped":"\u01B5","Implies":"\u21D2","incare":"\u2105","in":"\u2208","infin":"\u221E","infintie":"\u29DD","inodot":"\u0131","intcal":"\u22BA","int":"\u222B","Int":"\u222C","integers":"\u2124","Integral":"\u222B","intercal":"\u22BA","Intersection":"\u22C2","intlarhk":"\u2A17","intprod":"\u2A3C","InvisibleComma":"\u2063","InvisibleTimes":"\u2062","IOcy":"\u0401","iocy":"\u0451","Iogon":"\u012E","iogon":"\u012F","Iopf":"\uD835\uDD40","iopf":"\uD835\uDD5A","Iota":"\u0399","iota":"\u03B9","iprod":"\u2A3C","iquest":"\u00BF","iscr":"\uD835\uDCBE","Iscr":"\u2110","isin":"\u2208","isindot":"\u22F5","isinE":"\u22F9","isins":"\u22F4","isinsv":"\u22F3","isinv":"\u2208","it":"\u2062","Itilde":"\u0128","itilde":"\u0129","Iukcy":"\u0406","iukcy":"\u0456","Iuml":"\u00CF","iuml":"\u00EF","Jcirc":"\u0134","jcirc":"\u0135","Jcy":"\u0419","jcy":"\u0439","Jfr":"\uD835\uDD0D","jfr":"\uD835\uDD27","jmath":"\u0237","Jopf":"\uD835\uDD41","jopf":"\uD835\uDD5B","Jscr":"\uD835\uDCA5","jscr":"\uD835\uDCBF","Jsercy":"\u0408","jsercy":"\u0458","Jukcy":"\u0404","jukcy":"\u0454","Kappa":"\u039A","kappa":"\u03BA","kappav":"\u03F0","Kcedil":"\u0136","kcedil":"\u0137","Kcy":"\u041A","kcy":"\u043A","Kfr":"\uD835\uDD0E","kfr":"\uD835\uDD28","kgreen":"\u0138","KHcy":"\u0425","khcy":"\u0445","KJcy":"\u040C","kjcy":"\u045C","Kopf":"\uD835\uDD42","kopf":"\uD835\uDD5C","Kscr":"\uD835\uDCA6","kscr":"\uD835\uDCC0","lAarr":"\u21DA","Lacute":"\u0139","lacute":"\u013A","laemptyv":"\u29B4","lagran":"\u2112","Lambda":"\u039B","lambda":"\u03BB","lang":"\u27E8","Lang":"\u27EA","langd":"\u2991","langle":"\u27E8","lap":"\u2A85","Laplacetrf":"\u2112","laquo":"\u00AB","larrb":"\u21E4","larrbfs":"\u291F","larr":"\u2190","Larr":"\u219E","lArr":"\u21D0","larrfs":"\u291D","larrhk":"\u21A9","larrlp":"\u21AB","larrpl":"\u2939","larrsim":"\u2973","larrtl":"\u21A2","latail":"\u2919","lAtail":"\u291B","lat":"\u2AAB","late":"\u2AAD","lates":"\u2AAD\uFE00","lbarr":"\u290C","lBarr":"\u290E","lbbrk":"\u2772","lbrace":"{","lbrack":"[","lbrke":"\u298B","lbrksld":"\u298F","lbrkslu":"\u298D","Lcaron":"\u013D","lcaron":"\u013E","Lcedil":"\u013B","lcedil":"\u013C","lceil":"\u2308","lcub":"{","Lcy":"\u041B","lcy":"\u043B","ldca":"\u2936","ldquo":"\u201C","ldquor":"\u201E","ldrdhar":"\u2967","ldrushar":"\u294B","ldsh":"\u21B2","le":"\u2264","lE":"\u2266","LeftAngleBracket":"\u27E8","LeftArrowBar":"\u21E4","leftarrow":"\u2190","LeftArrow":"\u2190","Leftarrow":"\u21D0","LeftArrowRightArrow":"\u21C6","leftarrowtail":"\u21A2","LeftCeiling":"\u2308","LeftDoubleBracket":"\u27E6","LeftDownTeeVector":"\u2961","LeftDownVectorBar":"\u2959","LeftDownVector":"\u21C3","LeftFloor":"\u230A","leftharpoondown":"\u21BD","leftharpoonup":"\u21BC","leftleftarrows":"\u21C7","leftrightarrow":"\u2194","LeftRightArrow":"\u2194","Leftrightarrow":"\u21D4","leftrightarrows":"\u21C6","leftrightharpoons":"\u21CB","leftrightsquigarrow":"\u21AD","LeftRightVector":"\u294E","LeftTeeArrow":"\u21A4","LeftTee":"\u22A3","LeftTeeVector":"\u295A","leftthreetimes":"\u22CB","LeftTriangleBar":"\u29CF","LeftTriangle":"\u22B2","LeftTriangleEqual":"\u22B4","LeftUpDownVector":"\u2951","LeftUpTeeVector":"\u2960","LeftUpVectorBar":"\u2958","LeftUpVector":"\u21BF","LeftVectorBar":"\u2952","LeftVector":"\u21BC","lEg":"\u2A8B","leg":"\u22DA","leq":"\u2264","leqq":"\u2266","leqslant":"\u2A7D","lescc":"\u2AA8","les":"\u2A7D","lesdot":"\u2A7F","lesdoto":"\u2A81","lesdotor":"\u2A83","lesg":"\u22DA\uFE00","lesges":"\u2A93","lessapprox":"\u2A85","lessdot":"\u22D6","lesseqgtr":"\u22DA","lesseqqgtr":"\u2A8B","LessEqualGreater":"\u22DA","LessFullEqual":"\u2266","LessGreater":"\u2276","lessgtr":"\u2276","LessLess":"\u2AA1","lesssim":"\u2272","LessSlantEqual":"\u2A7D","LessTilde":"\u2272","lfisht":"\u297C","lfloor":"\u230A","Lfr":"\uD835\uDD0F","lfr":"\uD835\uDD29","lg":"\u2276","lgE":"\u2A91","lHar":"\u2962","lhard":"\u21BD","lharu":"\u21BC","lharul":"\u296A","lhblk":"\u2584","LJcy":"\u0409","ljcy":"\u0459","llarr":"\u21C7","ll":"\u226A","Ll":"\u22D8","llcorner":"\u231E","Lleftarrow":"\u21DA","llhard":"\u296B","lltri":"\u25FA","Lmidot":"\u013F","lmidot":"\u0140","lmoustache":"\u23B0","lmoust":"\u23B0","lnap":"\u2A89","lnapprox":"\u2A89","lne":"\u2A87","lnE":"\u2268","lneq":"\u2A87","lneqq":"\u2268","lnsim":"\u22E6","loang":"\u27EC","loarr":"\u21FD","lobrk":"\u27E6","longleftarrow":"\u27F5","LongLeftArrow":"\u27F5","Longleftarrow":"\u27F8","longleftrightarrow":"\u27F7","LongLeftRightArrow":"\u27F7","Longleftrightarrow":"\u27FA","longmapsto":"\u27FC","longrightarrow":"\u27F6","LongRightArrow":"\u27F6","Longrightarrow":"\u27F9","looparrowleft":"\u21AB","looparrowright":"\u21AC","lopar":"\u2985","Lopf":"\uD835\uDD43","lopf":"\uD835\uDD5D","loplus":"\u2A2D","lotimes":"\u2A34","lowast":"\u2217","lowbar":"_","LowerLeftArrow":"\u2199","LowerRightArrow":"\u2198","loz":"\u25CA","lozenge":"\u25CA","lozf":"\u29EB","lpar":"(","lparlt":"\u2993","lrarr":"\u21C6","lrcorner":"\u231F","lrhar":"\u21CB","lrhard":"\u296D","lrm":"\u200E","lrtri":"\u22BF","lsaquo":"\u2039","lscr":"\uD835\uDCC1","Lscr":"\u2112","lsh":"\u21B0","Lsh":"\u21B0","lsim":"\u2272","lsime":"\u2A8D","lsimg":"\u2A8F","lsqb":"[","lsquo":"\u2018","lsquor":"\u201A","Lstrok":"\u0141","lstrok":"\u0142","ltcc":"\u2AA6","ltcir":"\u2A79","lt":"<","LT":"<","Lt":"\u226A","ltdot":"\u22D6","lthree":"\u22CB","ltimes":"\u22C9","ltlarr":"\u2976","ltquest":"\u2A7B","ltri":"\u25C3","ltrie":"\u22B4","ltrif":"\u25C2","ltrPar":"\u2996","lurdshar":"\u294A","luruhar":"\u2966","lvertneqq":"\u2268\uFE00","lvnE":"\u2268\uFE00","macr":"\u00AF","male":"\u2642","malt":"\u2720","maltese":"\u2720","Map":"\u2905","map":"\u21A6","mapsto":"\u21A6","mapstodown":"\u21A7","mapstoleft":"\u21A4","mapstoup":"\u21A5","marker":"\u25AE","mcomma":"\u2A29","Mcy":"\u041C","mcy":"\u043C","mdash":"\u2014","mDDot":"\u223A","measuredangle":"\u2221","MediumSpace":"\u205F","Mellintrf":"\u2133","Mfr":"\uD835\uDD10","mfr":"\uD835\uDD2A","mho":"\u2127","micro":"\u00B5","midast":"*","midcir":"\u2AF0","mid":"\u2223","middot":"\u00B7","minusb":"\u229F","minus":"\u2212","minusd":"\u2238","minusdu":"\u2A2A","MinusPlus":"\u2213","mlcp":"\u2ADB","mldr":"\u2026","mnplus":"\u2213","models":"\u22A7","Mopf":"\uD835\uDD44","mopf":"\uD835\uDD5E","mp":"\u2213","mscr":"\uD835\uDCC2","Mscr":"\u2133","mstpos":"\u223E","Mu":"\u039C","mu":"\u03BC","multimap":"\u22B8","mumap":"\u22B8","nabla":"\u2207","Nacute":"\u0143","nacute":"\u0144","nang":"\u2220\u20D2","nap":"\u2249","napE":"\u2A70\u0338","napid":"\u224B\u0338","napos":"\u0149","napprox":"\u2249","natural":"\u266E","naturals":"\u2115","natur":"\u266E","nbsp":"\u00A0","nbump":"\u224E\u0338","nbumpe":"\u224F\u0338","ncap":"\u2A43","Ncaron":"\u0147","ncaron":"\u0148","Ncedil":"\u0145","ncedil":"\u0146","ncong":"\u2247","ncongdot":"\u2A6D\u0338","ncup":"\u2A42","Ncy":"\u041D","ncy":"\u043D","ndash":"\u2013","nearhk":"\u2924","nearr":"\u2197","neArr":"\u21D7","nearrow":"\u2197","ne":"\u2260","nedot":"\u2250\u0338","NegativeMediumSpace":"\u200B","NegativeThickSpace":"\u200B","NegativeThinSpace":"\u200B","NegativeVeryThinSpace":"\u200B","nequiv":"\u2262","nesear":"\u2928","nesim":"\u2242\u0338","NestedGreaterGreater":"\u226B","NestedLessLess":"\u226A","NewLine":"\n","nexist":"\u2204","nexists":"\u2204","Nfr":"\uD835\uDD11","nfr":"\uD835\uDD2B","ngE":"\u2267\u0338","nge":"\u2271","ngeq":"\u2271","ngeqq":"\u2267\u0338","ngeqslant":"\u2A7E\u0338","nges":"\u2A7E\u0338","nGg":"\u22D9\u0338","ngsim":"\u2275","nGt":"\u226B\u20D2","ngt":"\u226F","ngtr":"\u226F","nGtv":"\u226B\u0338","nharr":"\u21AE","nhArr":"\u21CE","nhpar":"\u2AF2","ni":"\u220B","nis":"\u22FC","nisd":"\u22FA","niv":"\u220B","NJcy":"\u040A","njcy":"\u045A","nlarr":"\u219A","nlArr":"\u21CD","nldr":"\u2025","nlE":"\u2266\u0338","nle":"\u2270","nleftarrow":"\u219A","nLeftarrow":"\u21CD","nleftrightarrow":"\u21AE","nLeftrightarrow":"\u21CE","nleq":"\u2270","nleqq":"\u2266\u0338","nleqslant":"\u2A7D\u0338","nles":"\u2A7D\u0338","nless":"\u226E","nLl":"\u22D8\u0338","nlsim":"\u2274","nLt":"\u226A\u20D2","nlt":"\u226E","nltri":"\u22EA","nltrie":"\u22EC","nLtv":"\u226A\u0338","nmid":"\u2224","NoBreak":"\u2060","NonBreakingSpace":"\u00A0","nopf":"\uD835\uDD5F","Nopf":"\u2115","Not":"\u2AEC","not":"\u00AC","NotCongruent":"\u2262","NotCupCap":"\u226D","NotDoubleVerticalBar":"\u2226","NotElement":"\u2209","NotEqual":"\u2260","NotEqualTilde":"\u2242\u0338","NotExists":"\u2204","NotGreater":"\u226F","NotGreaterEqual":"\u2271","NotGreaterFullEqual":"\u2267\u0338","NotGreaterGreater":"\u226B\u0338","NotGreaterLess":"\u2279","NotGreaterSlantEqual":"\u2A7E\u0338","NotGreaterTilde":"\u2275","NotHumpDownHump":"\u224E\u0338","NotHumpEqual":"\u224F\u0338","notin":"\u2209","notindot":"\u22F5\u0338","notinE":"\u22F9\u0338","notinva":"\u2209","notinvb":"\u22F7","notinvc":"\u22F6","NotLeftTriangleBar":"\u29CF\u0338","NotLeftTriangle":"\u22EA","NotLeftTriangleEqual":"\u22EC","NotLess":"\u226E","NotLessEqual":"\u2270","NotLessGreater":"\u2278","NotLessLess":"\u226A\u0338","NotLessSlantEqual":"\u2A7D\u0338","NotLessTilde":"\u2274","NotNestedGreaterGreater":"\u2AA2\u0338","NotNestedLessLess":"\u2AA1\u0338","notni":"\u220C","notniva":"\u220C","notnivb":"\u22FE","notnivc":"\u22FD","NotPrecedes":"\u2280","NotPrecedesEqual":"\u2AAF\u0338","NotPrecedesSlantEqual":"\u22E0","NotReverseElement":"\u220C","NotRightTriangleBar":"\u29D0\u0338","NotRightTriangle":"\u22EB","NotRightTriangleEqual":"\u22ED","NotSquareSubset":"\u228F\u0338","NotSquareSubsetEqual":"\u22E2","NotSquareSuperset":"\u2290\u0338","NotSquareSupersetEqual":"\u22E3","NotSubset":"\u2282\u20D2","NotSubsetEqual":"\u2288","NotSucceeds":"\u2281","NotSucceedsEqual":"\u2AB0\u0338","NotSucceedsSlantEqual":"\u22E1","NotSucceedsTilde":"\u227F\u0338","NotSuperset":"\u2283\u20D2","NotSupersetEqual":"\u2289","NotTilde":"\u2241","NotTildeEqual":"\u2244","NotTildeFullEqual":"\u2247","NotTildeTilde":"\u2249","NotVerticalBar":"\u2224","nparallel":"\u2226","npar":"\u2226","nparsl":"\u2AFD\u20E5","npart":"\u2202\u0338","npolint":"\u2A14","npr":"\u2280","nprcue":"\u22E0","nprec":"\u2280","npreceq":"\u2AAF\u0338","npre":"\u2AAF\u0338","nrarrc":"\u2933\u0338","nrarr":"\u219B","nrArr":"\u21CF","nrarrw":"\u219D\u0338","nrightarrow":"\u219B","nRightarrow":"\u21CF","nrtri":"\u22EB","nrtrie":"\u22ED","nsc":"\u2281","nsccue":"\u22E1","nsce":"\u2AB0\u0338","Nscr":"\uD835\uDCA9","nscr":"\uD835\uDCC3","nshortmid":"\u2224","nshortparallel":"\u2226","nsim":"\u2241","nsime":"\u2244","nsimeq":"\u2244","nsmid":"\u2224","nspar":"\u2226","nsqsube":"\u22E2","nsqsupe":"\u22E3","nsub":"\u2284","nsubE":"\u2AC5\u0338","nsube":"\u2288","nsubset":"\u2282\u20D2","nsubseteq":"\u2288","nsubseteqq":"\u2AC5\u0338","nsucc":"\u2281","nsucceq":"\u2AB0\u0338","nsup":"\u2285","nsupE":"\u2AC6\u0338","nsupe":"\u2289","nsupset":"\u2283\u20D2","nsupseteq":"\u2289","nsupseteqq":"\u2AC6\u0338","ntgl":"\u2279","Ntilde":"\u00D1","ntilde":"\u00F1","ntlg":"\u2278","ntriangleleft":"\u22EA","ntrianglelefteq":"\u22EC","ntriangleright":"\u22EB","ntrianglerighteq":"\u22ED","Nu":"\u039D","nu":"\u03BD","num":"#","numero":"\u2116","numsp":"\u2007","nvap":"\u224D\u20D2","nvdash":"\u22AC","nvDash":"\u22AD","nVdash":"\u22AE","nVDash":"\u22AF","nvge":"\u2265\u20D2","nvgt":">\u20D2","nvHarr":"\u2904","nvinfin":"\u29DE","nvlArr":"\u2902","nvle":"\u2264\u20D2","nvlt":"<\u20D2","nvltrie":"\u22B4\u20D2","nvrArr":"\u2903","nvrtrie":"\u22B5\u20D2","nvsim":"\u223C\u20D2","nwarhk":"\u2923","nwarr":"\u2196","nwArr":"\u21D6","nwarrow":"\u2196","nwnear":"\u2927","Oacute":"\u00D3","oacute":"\u00F3","oast":"\u229B","Ocirc":"\u00D4","ocirc":"\u00F4","ocir":"\u229A","Ocy":"\u041E","ocy":"\u043E","odash":"\u229D","Odblac":"\u0150","odblac":"\u0151","odiv":"\u2A38","odot":"\u2299","odsold":"\u29BC","OElig":"\u0152","oelig":"\u0153","ofcir":"\u29BF","Ofr":"\uD835\uDD12","ofr":"\uD835\uDD2C","ogon":"\u02DB","Ograve":"\u00D2","ograve":"\u00F2","ogt":"\u29C1","ohbar":"\u29B5","ohm":"\u03A9","oint":"\u222E","olarr":"\u21BA","olcir":"\u29BE","olcross":"\u29BB","oline":"\u203E","olt":"\u29C0","Omacr":"\u014C","omacr":"\u014D","Omega":"\u03A9","omega":"\u03C9","Omicron":"\u039F","omicron":"\u03BF","omid":"\u29B6","ominus":"\u2296","Oopf":"\uD835\uDD46","oopf":"\uD835\uDD60","opar":"\u29B7","OpenCurlyDoubleQuote":"\u201C","OpenCurlyQuote":"\u2018","operp":"\u29B9","oplus":"\u2295","orarr":"\u21BB","Or":"\u2A54","or":"\u2228","ord":"\u2A5D","order":"\u2134","orderof":"\u2134","ordf":"\u00AA","ordm":"\u00BA","origof":"\u22B6","oror":"\u2A56","orslope":"\u2A57","orv":"\u2A5B","oS":"\u24C8","Oscr":"\uD835\uDCAA","oscr":"\u2134","Oslash":"\u00D8","oslash":"\u00F8","osol":"\u2298","Otilde":"\u00D5","otilde":"\u00F5","otimesas":"\u2A36","Otimes":"\u2A37","otimes":"\u2297","Ouml":"\u00D6","ouml":"\u00F6","ovbar":"\u233D","OverBar":"\u203E","OverBrace":"\u23DE","OverBracket":"\u23B4","OverParenthesis":"\u23DC","para":"\u00B6","parallel":"\u2225","par":"\u2225","parsim":"\u2AF3","parsl":"\u2AFD","part":"\u2202","PartialD":"\u2202","Pcy":"\u041F","pcy":"\u043F","percnt":"%","period":".","permil":"\u2030","perp":"\u22A5","pertenk":"\u2031","Pfr":"\uD835\uDD13","pfr":"\uD835\uDD2D","Phi":"\u03A6","phi":"\u03C6","phiv":"\u03D5","phmmat":"\u2133","phone":"\u260E","Pi":"\u03A0","pi":"\u03C0","pitchfork":"\u22D4","piv":"\u03D6","planck":"\u210F","planckh":"\u210E","plankv":"\u210F","plusacir":"\u2A23","plusb":"\u229E","pluscir":"\u2A22","plus":"+","plusdo":"\u2214","plusdu":"\u2A25","pluse":"\u2A72","PlusMinus":"\u00B1","plusmn":"\u00B1","plussim":"\u2A26","plustwo":"\u2A27","pm":"\u00B1","Poincareplane":"\u210C","pointint":"\u2A15","popf":"\uD835\uDD61","Popf":"\u2119","pound":"\u00A3","prap":"\u2AB7","Pr":"\u2ABB","pr":"\u227A","prcue":"\u227C","precapprox":"\u2AB7","prec":"\u227A","preccurlyeq":"\u227C","Precedes":"\u227A","PrecedesEqual":"\u2AAF","PrecedesSlantEqual":"\u227C","PrecedesTilde":"\u227E","preceq":"\u2AAF","precnapprox":"\u2AB9","precneqq":"\u2AB5","precnsim":"\u22E8","pre":"\u2AAF","prE":"\u2AB3","precsim":"\u227E","prime":"\u2032","Prime":"\u2033","primes":"\u2119","prnap":"\u2AB9","prnE":"\u2AB5","prnsim":"\u22E8","prod":"\u220F","Product":"\u220F","profalar":"\u232E","profline":"\u2312","profsurf":"\u2313","prop":"\u221D","Proportional":"\u221D","Proportion":"\u2237","propto":"\u221D","prsim":"\u227E","prurel":"\u22B0","Pscr":"\uD835\uDCAB","pscr":"\uD835\uDCC5","Psi":"\u03A8","psi":"\u03C8","puncsp":"\u2008","Qfr":"\uD835\uDD14","qfr":"\uD835\uDD2E","qint":"\u2A0C","qopf":"\uD835\uDD62","Qopf":"\u211A","qprime":"\u2057","Qscr":"\uD835\uDCAC","qscr":"\uD835\uDCC6","quaternions":"\u210D","quatint":"\u2A16","quest":"?","questeq":"\u225F","quot":"\"","QUOT":"\"","rAarr":"\u21DB","race":"\u223D\u0331","Racute":"\u0154","racute":"\u0155","radic":"\u221A","raemptyv":"\u29B3","rang":"\u27E9","Rang":"\u27EB","rangd":"\u2992","range":"\u29A5","rangle":"\u27E9","raquo":"\u00BB","rarrap":"\u2975","rarrb":"\u21E5","rarrbfs":"\u2920","rarrc":"\u2933","rarr":"\u2192","Rarr":"\u21A0","rArr":"\u21D2","rarrfs":"\u291E","rarrhk":"\u21AA","rarrlp":"\u21AC","rarrpl":"\u2945","rarrsim":"\u2974","Rarrtl":"\u2916","rarrtl":"\u21A3","rarrw":"\u219D","ratail":"\u291A","rAtail":"\u291C","ratio":"\u2236","rationals":"\u211A","rbarr":"\u290D","rBarr":"\u290F","RBarr":"\u2910","rbbrk":"\u2773","rbrace":"}","rbrack":"]","rbrke":"\u298C","rbrksld":"\u298E","rbrkslu":"\u2990","Rcaron":"\u0158","rcaron":"\u0159","Rcedil":"\u0156","rcedil":"\u0157","rceil":"\u2309","rcub":"}","Rcy":"\u0420","rcy":"\u0440","rdca":"\u2937","rdldhar":"\u2969","rdquo":"\u201D","rdquor":"\u201D","rdsh":"\u21B3","real":"\u211C","realine":"\u211B","realpart":"\u211C","reals":"\u211D","Re":"\u211C","rect":"\u25AD","reg":"\u00AE","REG":"\u00AE","ReverseElement":"\u220B","ReverseEquilibrium":"\u21CB","ReverseUpEquilibrium":"\u296F","rfisht":"\u297D","rfloor":"\u230B","rfr":"\uD835\uDD2F","Rfr":"\u211C","rHar":"\u2964","rhard":"\u21C1","rharu":"\u21C0","rharul":"\u296C","Rho":"\u03A1","rho":"\u03C1","rhov":"\u03F1","RightAngleBracket":"\u27E9","RightArrowBar":"\u21E5","rightarrow":"\u2192","RightArrow":"\u2192","Rightarrow":"\u21D2","RightArrowLeftArrow":"\u21C4","rightarrowtail":"\u21A3","RightCeiling":"\u2309","RightDoubleBracket":"\u27E7","RightDownTeeVector":"\u295D","RightDownVectorBar":"\u2955","RightDownVector":"\u21C2","RightFloor":"\u230B","rightharpoondown":"\u21C1","rightharpoonup":"\u21C0","rightleftarrows":"\u21C4","rightleftharpoons":"\u21CC","rightrightarrows":"\u21C9","rightsquigarrow":"\u219D","RightTeeArrow":"\u21A6","RightTee":"\u22A2","RightTeeVector":"\u295B","rightthreetimes":"\u22CC","RightTriangleBar":"\u29D0","RightTriangle":"\u22B3","RightTriangleEqual":"\u22B5","RightUpDownVector":"\u294F","RightUpTeeVector":"\u295C","RightUpVectorBar":"\u2954","RightUpVector":"\u21BE","RightVectorBar":"\u2953","RightVector":"\u21C0","ring":"\u02DA","risingdotseq":"\u2253","rlarr":"\u21C4","rlhar":"\u21CC","rlm":"\u200F","rmoustache":"\u23B1","rmoust":"\u23B1","rnmid":"\u2AEE","roang":"\u27ED","roarr":"\u21FE","robrk":"\u27E7","ropar":"\u2986","ropf":"\uD835\uDD63","Ropf":"\u211D","roplus":"\u2A2E","rotimes":"\u2A35","RoundImplies":"\u2970","rpar":")","rpargt":"\u2994","rppolint":"\u2A12","rrarr":"\u21C9","Rrightarrow":"\u21DB","rsaquo":"\u203A","rscr":"\uD835\uDCC7","Rscr":"\u211B","rsh":"\u21B1","Rsh":"\u21B1","rsqb":"]","rsquo":"\u2019","rsquor":"\u2019","rthree":"\u22CC","rtimes":"\u22CA","rtri":"\u25B9","rtrie":"\u22B5","rtrif":"\u25B8","rtriltri":"\u29CE","RuleDelayed":"\u29F4","ruluhar":"\u2968","rx":"\u211E","Sacute":"\u015A","sacute":"\u015B","sbquo":"\u201A","scap":"\u2AB8","Scaron":"\u0160","scaron":"\u0161","Sc":"\u2ABC","sc":"\u227B","sccue":"\u227D","sce":"\u2AB0","scE":"\u2AB4","Scedil":"\u015E","scedil":"\u015F","Scirc":"\u015C","scirc":"\u015D","scnap":"\u2ABA","scnE":"\u2AB6","scnsim":"\u22E9","scpolint":"\u2A13","scsim":"\u227F","Scy":"\u0421","scy":"\u0441","sdotb":"\u22A1","sdot":"\u22C5","sdote":"\u2A66","searhk":"\u2925","searr":"\u2198","seArr":"\u21D8","searrow":"\u2198","sect":"\u00A7","semi":";","seswar":"\u2929","setminus":"\u2216","setmn":"\u2216","sext":"\u2736","Sfr":"\uD835\uDD16","sfr":"\uD835\uDD30","sfrown":"\u2322","sharp":"\u266F","SHCHcy":"\u0429","shchcy":"\u0449","SHcy":"\u0428","shcy":"\u0448","ShortDownArrow":"\u2193","ShortLeftArrow":"\u2190","shortmid":"\u2223","shortparallel":"\u2225","ShortRightArrow":"\u2192","ShortUpArrow":"\u2191","shy":"\u00AD","Sigma":"\u03A3","sigma":"\u03C3","sigmaf":"\u03C2","sigmav":"\u03C2","sim":"\u223C","simdot":"\u2A6A","sime":"\u2243","simeq":"\u2243","simg":"\u2A9E","simgE":"\u2AA0","siml":"\u2A9D","simlE":"\u2A9F","simne":"\u2246","simplus":"\u2A24","simrarr":"\u2972","slarr":"\u2190","SmallCircle":"\u2218","smallsetminus":"\u2216","smashp":"\u2A33","smeparsl":"\u29E4","smid":"\u2223","smile":"\u2323","smt":"\u2AAA","smte":"\u2AAC","smtes":"\u2AAC\uFE00","SOFTcy":"\u042C","softcy":"\u044C","solbar":"\u233F","solb":"\u29C4","sol":"/","Sopf":"\uD835\uDD4A","sopf":"\uD835\uDD64","spades":"\u2660","spadesuit":"\u2660","spar":"\u2225","sqcap":"\u2293","sqcaps":"\u2293\uFE00","sqcup":"\u2294","sqcups":"\u2294\uFE00","Sqrt":"\u221A","sqsub":"\u228F","sqsube":"\u2291","sqsubset":"\u228F","sqsubseteq":"\u2291","sqsup":"\u2290","sqsupe":"\u2292","sqsupset":"\u2290","sqsupseteq":"\u2292","square":"\u25A1","Square":"\u25A1","SquareIntersection":"\u2293","SquareSubset":"\u228F","SquareSubsetEqual":"\u2291","SquareSuperset":"\u2290","SquareSupersetEqual":"\u2292","SquareUnion":"\u2294","squarf":"\u25AA","squ":"\u25A1","squf":"\u25AA","srarr":"\u2192","Sscr":"\uD835\uDCAE","sscr":"\uD835\uDCC8","ssetmn":"\u2216","ssmile":"\u2323","sstarf":"\u22C6","Star":"\u22C6","star":"\u2606","starf":"\u2605","straightepsilon":"\u03F5","straightphi":"\u03D5","strns":"\u00AF","sub":"\u2282","Sub":"\u22D0","subdot":"\u2ABD","subE":"\u2AC5","sube":"\u2286","subedot":"\u2AC3","submult":"\u2AC1","subnE":"\u2ACB","subne":"\u228A","subplus":"\u2ABF","subrarr":"\u2979","subset":"\u2282","Subset":"\u22D0","subseteq":"\u2286","subseteqq":"\u2AC5","SubsetEqual":"\u2286","subsetneq":"\u228A","subsetneqq":"\u2ACB","subsim":"\u2AC7","subsub":"\u2AD5","subsup":"\u2AD3","succapprox":"\u2AB8","succ":"\u227B","succcurlyeq":"\u227D","Succeeds":"\u227B","SucceedsEqual":"\u2AB0","SucceedsSlantEqual":"\u227D","SucceedsTilde":"\u227F","succeq":"\u2AB0","succnapprox":"\u2ABA","succneqq":"\u2AB6","succnsim":"\u22E9","succsim":"\u227F","SuchThat":"\u220B","sum":"\u2211","Sum":"\u2211","sung":"\u266A","sup1":"\u00B9","sup2":"\u00B2","sup3":"\u00B3","sup":"\u2283","Sup":"\u22D1","supdot":"\u2ABE","supdsub":"\u2AD8","supE":"\u2AC6","supe":"\u2287","supedot":"\u2AC4","Superset":"\u2283","SupersetEqual":"\u2287","suphsol":"\u27C9","suphsub":"\u2AD7","suplarr":"\u297B","supmult":"\u2AC2","supnE":"\u2ACC","supne":"\u228B","supplus":"\u2AC0","supset":"\u2283","Supset":"\u22D1","supseteq":"\u2287","supseteqq":"\u2AC6","supsetneq":"\u228B","supsetneqq":"\u2ACC","supsim":"\u2AC8","supsub":"\u2AD4","supsup":"\u2AD6","swarhk":"\u2926","swarr":"\u2199","swArr":"\u21D9","swarrow":"\u2199","swnwar":"\u292A","szlig":"\u00DF","Tab":"\t","target":"\u2316","Tau":"\u03A4","tau":"\u03C4","tbrk":"\u23B4","Tcaron":"\u0164","tcaron":"\u0165","Tcedil":"\u0162","tcedil":"\u0163","Tcy":"\u0422","tcy":"\u0442","tdot":"\u20DB","telrec":"\u2315","Tfr":"\uD835\uDD17","tfr":"\uD835\uDD31","there4":"\u2234","therefore":"\u2234","Therefore":"\u2234","Theta":"\u0398","theta":"\u03B8","thetasym":"\u03D1","thetav":"\u03D1","thickapprox":"\u2248","thicksim":"\u223C","ThickSpace":"\u205F\u200A","ThinSpace":"\u2009","thinsp":"\u2009","thkap":"\u2248","thksim":"\u223C","THORN":"\u00DE","thorn":"\u00FE","tilde":"\u02DC","Tilde":"\u223C","TildeEqual":"\u2243","TildeFullEqual":"\u2245","TildeTilde":"\u2248","timesbar":"\u2A31","timesb":"\u22A0","times":"\u00D7","timesd":"\u2A30","tint":"\u222D","toea":"\u2928","topbot":"\u2336","topcir":"\u2AF1","top":"\u22A4","Topf":"\uD835\uDD4B","topf":"\uD835\uDD65","topfork":"\u2ADA","tosa":"\u2929","tprime":"\u2034","trade":"\u2122","TRADE":"\u2122","triangle":"\u25B5","triangledown":"\u25BF","triangleleft":"\u25C3","trianglelefteq":"\u22B4","triangleq":"\u225C","triangleright":"\u25B9","trianglerighteq":"\u22B5","tridot":"\u25EC","trie":"\u225C","triminus":"\u2A3A","TripleDot":"\u20DB","triplus":"\u2A39","trisb":"\u29CD","tritime":"\u2A3B","trpezium":"\u23E2","Tscr":"\uD835\uDCAF","tscr":"\uD835\uDCC9","TScy":"\u0426","tscy":"\u0446","TSHcy":"\u040B","tshcy":"\u045B","Tstrok":"\u0166","tstrok":"\u0167","twixt":"\u226C","twoheadleftarrow":"\u219E","twoheadrightarrow":"\u21A0","Uacute":"\u00DA","uacute":"\u00FA","uarr":"\u2191","Uarr":"\u219F","uArr":"\u21D1","Uarrocir":"\u2949","Ubrcy":"\u040E","ubrcy":"\u045E","Ubreve":"\u016C","ubreve":"\u016D","Ucirc":"\u00DB","ucirc":"\u00FB","Ucy":"\u0423","ucy":"\u0443","udarr":"\u21C5","Udblac":"\u0170","udblac":"\u0171","udhar":"\u296E","ufisht":"\u297E","Ufr":"\uD835\uDD18","ufr":"\uD835\uDD32","Ugrave":"\u00D9","ugrave":"\u00F9","uHar":"\u2963","uharl":"\u21BF","uharr":"\u21BE","uhblk":"\u2580","ulcorn":"\u231C","ulcorner":"\u231C","ulcrop":"\u230F","ultri":"\u25F8","Umacr":"\u016A","umacr":"\u016B","uml":"\u00A8","UnderBar":"_","UnderBrace":"\u23DF","UnderBracket":"\u23B5","UnderParenthesis":"\u23DD","Union":"\u22C3","UnionPlus":"\u228E","Uogon":"\u0172","uogon":"\u0173","Uopf":"\uD835\uDD4C","uopf":"\uD835\uDD66","UpArrowBar":"\u2912","uparrow":"\u2191","UpArrow":"\u2191","Uparrow":"\u21D1","UpArrowDownArrow":"\u21C5","updownarrow":"\u2195","UpDownArrow":"\u2195","Updownarrow":"\u21D5","UpEquilibrium":"\u296E","upharpoonleft":"\u21BF","upharpoonright":"\u21BE","uplus":"\u228E","UpperLeftArrow":"\u2196","UpperRightArrow":"\u2197","upsi":"\u03C5","Upsi":"\u03D2","upsih":"\u03D2","Upsilon":"\u03A5","upsilon":"\u03C5","UpTeeArrow":"\u21A5","UpTee":"\u22A5","upuparrows":"\u21C8","urcorn":"\u231D","urcorner":"\u231D","urcrop":"\u230E","Uring":"\u016E","uring":"\u016F","urtri":"\u25F9","Uscr":"\uD835\uDCB0","uscr":"\uD835\uDCCA","utdot":"\u22F0","Utilde":"\u0168","utilde":"\u0169","utri":"\u25B5","utrif":"\u25B4","uuarr":"\u21C8","Uuml":"\u00DC","uuml":"\u00FC","uwangle":"\u29A7","vangrt":"\u299C","varepsilon":"\u03F5","varkappa":"\u03F0","varnothing":"\u2205","varphi":"\u03D5","varpi":"\u03D6","varpropto":"\u221D","varr":"\u2195","vArr":"\u21D5","varrho":"\u03F1","varsigma":"\u03C2","varsubsetneq":"\u228A\uFE00","varsubsetneqq":"\u2ACB\uFE00","varsupsetneq":"\u228B\uFE00","varsupsetneqq":"\u2ACC\uFE00","vartheta":"\u03D1","vartriangleleft":"\u22B2","vartriangleright":"\u22B3","vBar":"\u2AE8","Vbar":"\u2AEB","vBarv":"\u2AE9","Vcy":"\u0412","vcy":"\u0432","vdash":"\u22A2","vDash":"\u22A8","Vdash":"\u22A9","VDash":"\u22AB","Vdashl":"\u2AE6","veebar":"\u22BB","vee":"\u2228","Vee":"\u22C1","veeeq":"\u225A","vellip":"\u22EE","verbar":"|","Verbar":"\u2016","vert":"|","Vert":"\u2016","VerticalBar":"\u2223","VerticalLine":"|","VerticalSeparator":"\u2758","VerticalTilde":"\u2240","VeryThinSpace":"\u200A","Vfr":"\uD835\uDD19","vfr":"\uD835\uDD33","vltri":"\u22B2","vnsub":"\u2282\u20D2","vnsup":"\u2283\u20D2","Vopf":"\uD835\uDD4D","vopf":"\uD835\uDD67","vprop":"\u221D","vrtri":"\u22B3","Vscr":"\uD835\uDCB1","vscr":"\uD835\uDCCB","vsubnE":"\u2ACB\uFE00","vsubne":"\u228A\uFE00","vsupnE":"\u2ACC\uFE00","vsupne":"\u228B\uFE00","Vvdash":"\u22AA","vzigzag":"\u299A","Wcirc":"\u0174","wcirc":"\u0175","wedbar":"\u2A5F","wedge":"\u2227","Wedge":"\u22C0","wedgeq":"\u2259","weierp":"\u2118","Wfr":"\uD835\uDD1A","wfr":"\uD835\uDD34","Wopf":"\uD835\uDD4E","wopf":"\uD835\uDD68","wp":"\u2118","wr":"\u2240","wreath":"\u2240","Wscr":"\uD835\uDCB2","wscr":"\uD835\uDCCC","xcap":"\u22C2","xcirc":"\u25EF","xcup":"\u22C3","xdtri":"\u25BD","Xfr":"\uD835\uDD1B","xfr":"\uD835\uDD35","xharr":"\u27F7","xhArr":"\u27FA","Xi":"\u039E","xi":"\u03BE","xlarr":"\u27F5","xlArr":"\u27F8","xmap":"\u27FC","xnis":"\u22FB","xodot":"\u2A00","Xopf":"\uD835\uDD4F","xopf":"\uD835\uDD69","xoplus":"\u2A01","xotime":"\u2A02","xrarr":"\u27F6","xrArr":"\u27F9","Xscr":"\uD835\uDCB3","xscr":"\uD835\uDCCD","xsqcup":"\u2A06","xuplus":"\u2A04","xutri":"\u25B3","xvee":"\u22C1","xwedge":"\u22C0","Yacute":"\u00DD","yacute":"\u00FD","YAcy":"\u042F","yacy":"\u044F","Ycirc":"\u0176","ycirc":"\u0177","Ycy":"\u042B","ycy":"\u044B","yen":"\u00A5","Yfr":"\uD835\uDD1C","yfr":"\uD835\uDD36","YIcy":"\u0407","yicy":"\u0457","Yopf":"\uD835\uDD50","yopf":"\uD835\uDD6A","Yscr":"\uD835\uDCB4","yscr":"\uD835\uDCCE","YUcy":"\u042E","yucy":"\u044E","yuml":"\u00FF","Yuml":"\u0178","Zacute":"\u0179","zacute":"\u017A","Zcaron":"\u017D","zcaron":"\u017E","Zcy":"\u0417","zcy":"\u0437","Zdot":"\u017B","zdot":"\u017C","zeetrf":"\u2128","ZeroWidthSpace":"\u200B","Zeta":"\u0396","zeta":"\u03B6","zfr":"\uD835\uDD37","Zfr":"\u2128","ZHcy":"\u0416","zhcy":"\u0436","zigrarr":"\u21DD","zopf":"\uD835\uDD6B","Zopf":"\u2124","Zscr":"\uD835\uDCB5","zscr":"\uD835\uDCCF","zwj":"\u200D","zwnj":"\u200C"};},{}],18:[function(require,module,exports){var isFunction=require('is-function');module.exports=forEach;var toString=Object.prototype.toString;var hasOwnProperty=Object.prototype.hasOwnProperty;function forEach(list,iterator,context){if(!isFunction(iterator)){throw new TypeError('iterator must be a function');}if(arguments.length<3){context=this;}if(toString.call(list)==='[object Array]')forEachArray(list,iterator,context);else if(typeof list==='string')forEachString(list,iterator,context);else forEachObject(list,iterator,context);}function forEachArray(array,iterator,context){for(var i=0,len=array.length;i/gm,'>');}function tag(node){return node.nodeName.toLowerCase();}function testRe(re,lexeme){var match=re&&re.exec(lexeme);return match&&match.index==0;}function blockText(block){return Array.prototype.map.call(block.childNodes,function(node){if(node.nodeType==3){return options.useBR?node.nodeValue.replace(/\n/g,''):node.nodeValue;}if(tag(node)=='br'){return'\n';}return blockText(node);}).join('');}function blockLanguage(block){var classes=(block.className+' '+(block.parentNode?block.parentNode.className:'')).split(/\s+/);classes=classes.map(function(c){return c.replace(/^language-/,'');});return classes.filter(function(c){return getLanguage(c)||c=='no-highlight';})[0];}function inherit(parent,obj){var result={};for(var key in parent)result[key]=parent[key];if(obj)for(var key in obj)result[key]=obj[key];return result;};/* Stream merging */function nodeStream(node){var result=[];(function _nodeStream(node,offset){for(var child=node.firstChild;child;child=child.nextSibling){if(child.nodeType==3)offset+=child.nodeValue.length;else if(tag(child)=='br')offset+=1;else if(child.nodeType==1){result.push({event:'start',offset:offset,node:child});offset=_nodeStream(child,offset);result.push({event:'stop',offset:offset,node:child});}}return offset;})(node,0);return result;}function mergeStreams(original,highlighted,value){var processed=0;var result='';var nodeStack=[];function selectStream(){if(!original.length||!highlighted.length){return original.length?original:highlighted;}if(original[0].offset!=highlighted[0].offset){return original[0].offset';}function close(node){result+='';}function render(event){(event.event=='start'?open:close)(event.node);}while(original.length||highlighted.length){var stream=selectStream();result+=escape(value.substr(processed,stream[0].offset-processed));processed=stream[0].offset;if(stream==original){/* + On any opening or closing tag of the original markup we first close + the entire highlighted node stack, then render the original tag along + with all the following original tags at the same offset and then + reopen all the tags on the highlighted stack. + */nodeStack.reverse().forEach(close);do{render(stream.splice(0,1)[0]);stream=selectStream();}while(stream==original&&stream.length&&stream[0].offset==processed);nodeStack.reverse().forEach(open);}else{if(stream[0].event=='start'){nodeStack.push(stream[0].node);}else{nodeStack.pop();}render(stream.splice(0,1)[0]);}}return result+escape(value.substr(processed));}/* Initialization */function compileLanguage(language){function reStr(re){return re&&re.source||re;}function langRe(value,global){return RegExp(reStr(value),'m'+(language.case_insensitive?'i':'')+(global?'g':''));}function compileMode(mode,parent){if(mode.compiled)return;mode.compiled=true;mode.keywords=mode.keywords||mode.beginKeywords;if(mode.keywords){var compiled_keywords={};function flatten(className,str){if(language.case_insensitive){str=str.toLowerCase();}str.split(' ').forEach(function(kw){var pair=kw.split('|');compiled_keywords[pair[0]]=[className,pair[1]?Number(pair[1]):1];});}if(typeof mode.keywords=='string'){// string +flatten('keyword',mode.keywords);}else{Object.keys(mode.keywords).forEach(function(className){flatten(className,mode.keywords[className]);});}mode.keywords=compiled_keywords;}mode.lexemesRe=langRe(mode.lexemes||/\b[A-Za-z0-9_]+\b/,true);if(parent){if(mode.beginKeywords){mode.begin=mode.beginKeywords.split(' ').join('|');}if(!mode.begin)mode.begin=/\B|\b/;mode.beginRe=langRe(mode.begin);if(!mode.end&&!mode.endsWithParent)mode.end=/\B|\b/;if(mode.end)mode.endRe=langRe(mode.end);mode.terminator_end=reStr(mode.end)||'';if(mode.endsWithParent&&parent.terminator_end)mode.terminator_end+=(mode.end?'|':'')+parent.terminator_end;}if(mode.illegal)mode.illegalRe=langRe(mode.illegal);if(mode.relevance===undefined)mode.relevance=1;if(!mode.contains){mode.contains=[];}var expanded_contains=[];mode.contains.forEach(function(c){if(c.variants){c.variants.forEach(function(v){expanded_contains.push(inherit(c,v));});}else{expanded_contains.push(c=='self'?mode:c);}});mode.contains=expanded_contains;mode.contains.forEach(function(c){compileMode(c,mode);});if(mode.starts){compileMode(mode.starts,parent);}var terminators=mode.contains.map(function(c){return c.beginKeywords?'\\.?\\b('+c.begin+')\\b\\.?':c.begin;}).concat([mode.terminator_end]).concat([mode.illegal]).map(reStr).filter(Boolean);mode.terminators=terminators.length?langRe(terminators.join('|'),true):{exec:function(s){return null;}};mode.continuation={};}compileMode(language);}/* + Core highlighting function. Accepts a language name, or an alias, and a + string with the code to highlight. Returns an object with the following + properties: -function padLeft (text, times) { - return many(' ', times) + text; -} + - relevance (int) + - value (an HTML string with highlighting markup) -function trim (text) { - if (text.trim) { - return text.trim(); - } - return text.replace(rspaces, ''); -} + */function highlight(name,value,ignore_illegals,continuation){function subMode(lexeme,mode){for(var i=0;i';return openSpan+insideSpan+closeSpan;}function processKeywords(){var buffer=escape(mode_buffer);if(!top.keywords)return buffer;var result='';var last_index=0;top.lexemesRe.lastIndex=0;var match=top.lexemesRe.exec(buffer);while(match){result+=buffer.substr(last_index,match.index-last_index);var keyword_match=keywordMatch(top,match);if(keyword_match){relevance+=keyword_match[1];result+=buildSpan(keyword_match[0],match[0]);}else{result+=match[0];}last_index=top.lexemesRe.lastIndex;match=top.lexemesRe.exec(buffer);}return result+buffer.substr(last_index);}function processSubLanguage(){if(top.subLanguage&&!languages[top.subLanguage]){return escape(mode_buffer);}var result=top.subLanguage?highlight(top.subLanguage,mode_buffer,true,top.continuation.top):highlightAuto(mode_buffer);// Counting embedded language score towards the host language may be disabled +// with zeroing the containing mode relevance. Usecase in point is Markdown that +// allows XML everywhere and makes every XML snippet to have a much larger Markdown +// score. +if(top.relevance>0){relevance+=result.relevance;}if(top.subLanguageMode=='continuous'){top.continuation.top=result.top;}return buildSpan(result.language,result.value,false,true);}function processBuffer(){return top.subLanguage!==undefined?processSubLanguage():processKeywords();}function startNewMode(mode,lexeme){var markup=mode.className?buildSpan(mode.className,'',true):'';if(mode.returnBegin){result+=markup;mode_buffer='';}else if(mode.excludeBegin){result+=escape(lexeme)+markup;mode_buffer='';}else{result+=markup;mode_buffer=lexeme;}top=Object.create(mode,{parent:{value:top}});}function processLexeme(buffer,lexeme){mode_buffer+=buffer;if(lexeme===undefined){result+=processBuffer();return 0;}var new_mode=subMode(lexeme,top);if(new_mode){result+=processBuffer();startNewMode(new_mode,lexeme);return new_mode.returnBegin?0:lexeme.length;}var end_mode=endOfMode(top,lexeme);if(end_mode){var origin=top;if(!(origin.returnEnd||origin.excludeEnd)){mode_buffer+=lexeme;}result+=processBuffer();do{if(top.className){result+='';}relevance+=top.relevance;top=top.parent;}while(top!=end_mode.parent);if(origin.excludeEnd){result+=escape(lexeme);}mode_buffer='';if(end_mode.starts){startNewMode(end_mode.starts,'');}return origin.returnEnd?0:lexeme.length;}if(isIllegal(lexeme,top))throw new Error('Illegal lexeme "'+lexeme+'" for mode "'+(top.className||'')+'"');/* + Parser should not reach this point as all types of lexemes should be caught + earlier, but if it does due to some bug make sure it advances at least one + character forward to prevent infinite looping. + */mode_buffer+=lexeme;return lexeme.length||1;}var language=getLanguage(name);if(!language){throw new Error('Unknown language: "'+name+'"');}compileLanguage(language);var top=continuation||language;var result='';for(var current=top;current!=language;current=current.parent){if(current.className){result=buildSpan(current.className,result,true);}}var mode_buffer='';var relevance=0;try{var match,count,index=0;while(true){top.terminators.lastIndex=index;match=top.terminators.exec(value);if(!match)break;count=processLexeme(value.substr(index,match.index-index),match[0]);index=match.index+count;}processLexeme(value.substr(index));for(var current=top;current.parent;current=current.parent){// close dangling modes +if(current.className){result+='';}};return{relevance:relevance,value:result,language:name,top:top};}catch(e){if(e.message.indexOf('Illegal')!=-1){return{relevance:0,value:escape(value)};}else{throw e;}}}/* + Highlighting with language detection. Accepts a string with the code to + highlight. Returns an object with the following properties: -function attr (el, prop, direct) { - var proper = direct === void 0 || direct; - if (proper || typeof el.getAttribute !== 'function') { - return el[prop] || ''; - } - return el.getAttribute(prop) || ''; -} + - language (detected language) + - relevance (int) + - value (an HTML string with highlighting markup) + - second_best (object with the same structure for second-best heuristically + detected language, may be absent) -function has (el, prop, direct) { - var proper = direct === void 0 || direct; - if (proper || typeof el.hasAttribute !== 'function') { - return el.hasOwnProperty(prop); - } - return el.hasAttribute(prop); -} + */function highlightAuto(text,languageSubset){languageSubset=languageSubset||options.languages||Object.keys(languages);var result={relevance:0,value:escape(text)};var second_best=result;languageSubset.forEach(function(name){if(!getLanguage(name)){return;}var current=highlight(name,text,false);current.language=name;if(current.relevance>second_best.relevance){second_best=current;}if(current.relevance>result.relevance){second_best=result;result=current;}});if(second_best.language){result.second_best=second_best;}return result;}/* + Post-processing of the highlighted markup: -function processPlainText (text, tagName) { - var key; - var block = paragraphTags.indexOf(tagName) !== -1 || tagName === 'BLOCKQUOTE'; - text = text.replace(/\n([ \t]*\n)+/g, '\n'); - text = text.replace(/\n[ \t]+/g, '\n'); - text = text.replace(/[ \t]+/g, ' '); - for (key in replacements) { - text = text.replace(replacers[key], replacements[key]); - } - text = text.replace(/(\s*)\\#/g, block ? removeUnnecessaryEscapes : '$1#'); - return text; + - replace TABs with something more useful + - replace real line-breaks with '
' for non-pre containers - function removeUnnecessaryEscapes (escaped, spaces, i) { - return i ? spaces + '#' : escaped; - } -} + */function fixMarkup(value){if(options.tabReplace){value=value.replace(/^((<[^>]+>|\t)+)/gm,function(match,p1,offset,s){return p1.replace(/\t/g,options.tabReplace);});}if(options.useBR){value=value.replace(/\n/g,'
');}return value;}/* + Applies highlighting to a DOM node containing code. Accepts a DOM node and + two optional parameters for fixMarkup. + */function highlightBlock(block){var text=blockText(block);var language=blockLanguage(block);if(language=='no-highlight')return;var result=language?highlight(language,text,true):highlightAuto(text);var original=nodeStream(block);if(original.length){var pre=document.createElementNS('http://www.w3.org/1999/xhtml','pre');pre.innerHTML=result.value;result.value=mergeStreams(original,nodeStream(pre),text);}result.value=fixMarkup(result.value);block.innerHTML=result.value;block.className+=' hljs '+(!language&&result.language||'');block.result={language:result.language,re:result.relevance};if(result.second_best){block.second_best={language:result.second_best.language,re:result.second_best.relevance};}}var options={classPrefix:'hljs-',tabReplace:null,useBR:false,languages:undefined};/* + Updates highlight.js global options with values passed in the form of an object + */function configure(user_options){options=inherit(options,user_options);}/* + Applies highlighting to all
..
blocks on a page. + */function initHighlighting(){if(initHighlighting.called)return;initHighlighting.called=true;var blocks=document.querySelectorAll('pre code');Array.prototype.forEach.call(blocks,highlightBlock);}/* + Attaches highlighting to the page load event. + */function initHighlightingOnLoad(){addEventListener('DOMContentLoaded',initHighlighting,false);addEventListener('load',initHighlighting,false);}var languages={};var aliases={};function registerLanguage(name,language){var lang=languages[name]=language(this);if(lang.aliases){lang.aliases.forEach(function(alias){aliases[alias]=name;});}}function getLanguage(name){return languages[name]||languages[aliases[name]];}/* Interface definition */this.highlight=highlight;this.highlightAuto=highlightAuto;this.fixMarkup=fixMarkup;this.highlightBlock=highlightBlock;this.configure=configure;this.initHighlighting=initHighlighting;this.initHighlightingOnLoad=initHighlightingOnLoad;this.registerLanguage=registerLanguage;this.getLanguage=getLanguage;this.inherit=inherit;// Common regexps +this.IDENT_RE='[a-zA-Z][a-zA-Z0-9_]*';this.UNDERSCORE_IDENT_RE='[a-zA-Z_][a-zA-Z0-9_]*';this.NUMBER_RE='\\b\\d+(\\.\\d+)?';this.C_NUMBER_RE='(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)';// 0x..., 0..., decimal, float +this.BINARY_NUMBER_RE='\\b(0b[01]+)';// 0b... +this.RE_STARTERS_RE='!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~';// Common modes +this.BACKSLASH_ESCAPE={begin:'\\\\[\\s\\S]',relevance:0};this.APOS_STRING_MODE={className:'string',begin:'\'',end:'\'',illegal:'\\n',contains:[this.BACKSLASH_ESCAPE]};this.QUOTE_STRING_MODE={className:'string',begin:'"',end:'"',illegal:'\\n',contains:[this.BACKSLASH_ESCAPE]};this.C_LINE_COMMENT_MODE={className:'comment',begin:'//',end:'$'};this.C_BLOCK_COMMENT_MODE={className:'comment',begin:'/\\*',end:'\\*/'};this.HASH_COMMENT_MODE={className:'comment',begin:'#',end:'$'};this.NUMBER_MODE={className:'number',begin:this.NUMBER_RE,relevance:0};this.C_NUMBER_MODE={className:'number',begin:this.C_NUMBER_RE,relevance:0};this.BINARY_NUMBER_MODE={className:'number',begin:this.BINARY_NUMBER_RE,relevance:0};this.REGEXP_MODE={className:'regexp',begin:/\//,end:/\/[gim]*/,illegal:/\n/,contains:[this.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[this.BACKSLASH_ESCAPE]}]};this.TITLE_MODE={className:'title',begin:this.IDENT_RE,relevance:0};this.UNDERSCORE_TITLE_MODE={className:'title',begin:this.UNDERSCORE_IDENT_RE,relevance:0};};module.exports=Highlight;},{}],21:[function(require,module,exports){var Highlight=require('./highlight');var hljs=new Highlight();hljs.registerLanguage('bash',require('./languages/bash.js'));hljs.registerLanguage('javascript',require('./languages/javascript.js'));hljs.registerLanguage('xml',require('./languages/xml.js'));hljs.registerLanguage('markdown',require('./languages/markdown.js'));hljs.registerLanguage('css',require('./languages/css.js'));hljs.registerLanguage('http',require('./languages/http.js'));hljs.registerLanguage('ini',require('./languages/ini.js'));hljs.registerLanguage('json',require('./languages/json.js'));module.exports=hljs;},{"./highlight":20,"./languages/bash.js":22,"./languages/css.js":23,"./languages/http.js":24,"./languages/ini.js":25,"./languages/javascript.js":26,"./languages/json.js":27,"./languages/markdown.js":28,"./languages/xml.js":29}],22:[function(require,module,exports){module.exports=function(hljs){var VAR={className:'variable',variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)\}/}]};var QUOTE_STRING={className:'string',begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,VAR,{className:'variable',begin:/\$\(/,end:/\)/,contains:[hljs.BACKSLASH_ESCAPE]}]};var APOS_STRING={className:'string',begin:/'/,end:/'/};return{lexemes:/-?[a-z\.]+/,keywords:{keyword:'if then else elif fi for break continue while in do done exit return set '+'declare case esac export exec',literal:'true false',built_in:'printf echo read cd pwd pushd popd dirs let eval unset typeset readonly '+'getopts source shopt caller type hash bind help sudo',operator:'-ne -eq -lt -gt -f -d -e -s -l -a'// relevance booster +},contains:[{className:'shebang',begin:/^#![^\n]+sh\s*$/,relevance:10},{className:'function',begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:true,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},hljs.HASH_COMMENT_MODE,hljs.NUMBER_MODE,QUOTE_STRING,APOS_STRING,VAR]};};},{}],23:[function(require,module,exports){module.exports=function(hljs){var IDENT_RE='[a-zA-Z-][a-zA-Z0-9_-]*';var FUNCTION={className:'function',begin:IDENT_RE+'\\(',end:'\\)',contains:['self',hljs.NUMBER_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]};return{case_insensitive:true,illegal:'[=/|\']',contains:[hljs.C_BLOCK_COMMENT_MODE,{className:'id',begin:'\\#[A-Za-z0-9_-]+'},{className:'class',begin:'\\.[A-Za-z0-9_-]+',relevance:0},{className:'attr_selector',begin:'\\[',end:'\\]',illegal:'$'},{className:'pseudo',begin:':(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\"\\\']+'},{className:'at_rule',begin:'@(font-face|page)',lexemes:'[a-z-]+',keywords:'font-face page'},{className:'at_rule',begin:'@',end:'[{;]',// at_rule eating first "{" is a good thing +// because it doesn’t let it to be parsed as +// a rule set but instead drops parser into +// the default mode which is how it should be. +contains:[{className:'keyword',begin:/\S+/},{begin:/\s/,endsWithParent:true,excludeEnd:true,relevance:0,contains:[FUNCTION,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE]}]},{className:'tag',begin:IDENT_RE,relevance:0},{className:'rules',begin:'{',end:'}',illegal:'[^\\s]',relevance:0,contains:[hljs.C_BLOCK_COMMENT_MODE,{className:'rule',begin:'[^\\s]',returnBegin:true,end:';',endsWithParent:true,contains:[{className:'attribute',begin:'[A-Z\\_\\.\\-]+',end:':',excludeEnd:true,illegal:'[^\\s]',starts:{className:'value',endsWithParent:true,excludeEnd:true,contains:[FUNCTION,hljs.NUMBER_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:'hexcolor',begin:'#[0-9A-Fa-f]+'},{className:'important',begin:'!important'}]}}]}]}]};};},{}],24:[function(require,module,exports){module.exports=function(hljs){return{illegal:'\\S',contains:[{className:'status',begin:'^HTTP/[0-9\\.]+',end:'$',contains:[{className:'number',begin:'\\b\\d{3}\\b'}]},{className:'request',begin:'^[A-Z]+ (.*?) HTTP/[0-9\\.]+$',returnBegin:true,end:'$',contains:[{className:'string',begin:' ',end:' ',excludeBegin:true,excludeEnd:true}]},{className:'attribute',begin:'^\\w',end:': ',excludeEnd:true,illegal:'\\n|\\s|=',starts:{className:'string',end:'$'}},{begin:'\\n\\n',starts:{subLanguage:'',endsWithParent:true}}]};};},{}],25:[function(require,module,exports){module.exports=function(hljs){return{case_insensitive:true,illegal:/\S/,contains:[{className:'comment',begin:';',end:'$'},{className:'title',begin:'^\\[',end:'\\]'},{className:'setting',begin:'^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*',end:'$',contains:[{className:'value',endsWithParent:true,keywords:'on off true false yes no',contains:[hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE],relevance:0}]}]};};},{}],26:[function(require,module,exports){module.exports=function(hljs){return{aliases:['js'],keywords:{keyword:'in if for while finally var new function do return void else break catch '+'instanceof with throw case default try this switch continue typeof delete '+'let yield const class',literal:'true false null undefined NaN Infinity',built_in:'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent '+'encodeURI encodeURIComponent escape unescape Object Function Boolean Error '+'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError '+'TypeError URIError Number Math Date String RegExp Array Float32Array '+'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array '+'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require'},contains:[{className:'pi',begin:/^\s*('|")use strict('|")/,relevance:10},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.C_NUMBER_MODE,{// "value" container +begin:'('+hljs.RE_STARTERS_RE+'|\\b(case|return|throw)\\b)\\s*',keywords:'return throw case',contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.REGEXP_MODE,{// E4X +begin:/;/,relevance:0,subLanguage:'xml'}],relevance:0},{className:'function',beginKeywords:'function',end:/\{/,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:'params',begin:/\(/,end:/\)/,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE],illegal:/["'\(]/}],illegal:/\[|%/},{begin:/\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something` +},{begin:'\\.'+hljs.IDENT_RE,relevance:0// hack: prevents detection of keywords after dots +}]};};},{}],27:[function(require,module,exports){module.exports=function(hljs){var LITERALS={literal:'true false null'};var TYPES=[hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE];var VALUE_CONTAINER={className:'value',end:',',endsWithParent:true,excludeEnd:true,contains:TYPES,keywords:LITERALS};var OBJECT={begin:'{',end:'}',contains:[{className:'attribute',begin:'\\s*"',end:'"\\s*:\\s*',excludeBegin:true,excludeEnd:true,contains:[hljs.BACKSLASH_ESCAPE],illegal:'\\n',starts:VALUE_CONTAINER}],illegal:'\\S'};var ARRAY={begin:'\\[',end:'\\]',contains:[hljs.inherit(VALUE_CONTAINER,{className:null})],// inherit is also a workaround for a bug that makes shared modes with endsWithParent compile only the ending of one of the parents +illegal:'\\S'};TYPES.splice(TYPES.length,0,OBJECT,ARRAY);return{contains:TYPES,keywords:LITERALS,illegal:'\\S'};};},{}],28:[function(require,module,exports){module.exports=function(hljs){return{contains:[// highlight headers +{className:'header',variants:[{begin:'^#{1,6}',end:'$'},{begin:'^.+?\\n[=-]{2,}$'}]},// inline html +{begin:'<',end:'>',subLanguage:'xml',relevance:0},// lists (indicators only) +{className:'bullet',begin:'^([*+-]|(\\d+\\.))\\s+'},// strong segments +{className:'strong',begin:'[*_]{2}.+?[*_]{2}'},// emphasis segments +{className:'emphasis',variants:[{begin:'\\*.+?\\*'},{begin:'_.+?_',relevance:0}]},// blockquotes +{className:'blockquote',begin:'^>\\s+',end:'$'},// code snippets +{className:'code',variants:[{begin:'`.+?`'},{begin:'^( {4}|\t)',end:'$',relevance:0}]},// horizontal rules +{className:'horizontal_rule',begin:'^[-\\*]{3,}',end:'$'},// using links - title and link +{begin:'\\[.+?\\][\\(\\[].+?[\\)\\]]',returnBegin:true,contains:[{className:'link_label',begin:'\\[',end:'\\]',excludeBegin:true,returnEnd:true,relevance:0},{className:'link_url',begin:'\\]\\(',end:'\\)',excludeBegin:true,excludeEnd:true},{className:'link_reference',begin:'\\]\\[',end:'\\]',excludeBegin:true,excludeEnd:true}],relevance:10},{begin:'^\\[\.+\\]:',end:'$',returnBegin:true,contains:[{className:'link_reference',begin:'\\[',end:'\\]',excludeBegin:true,excludeEnd:true},{className:'link_url',begin:'\\s',end:'$'}]}]};};},{}],29:[function(require,module,exports){module.exports=function(hljs){var XML_IDENT_RE='[A-Za-z0-9\\._:-]+';var PHP={begin:/<\?(php)?(?!\w)/,end:/\?>/,subLanguage:'php',subLanguageMode:'continuous'};var TAG_INTERNALS={endsWithParent:true,illegal:/]+/}]}]}]};return{aliases:['html'],case_insensitive:true,contains:[{className:'doctype',begin:'',relevance:10,contains:[{begin:'\\[',end:'\\]'}]},{className:'comment',begin:'',relevance:10},{className:'cdata',begin:'<\\!\\[CDATA\\[',end:'\\]\\]>',relevance:10},{className:'tag',/* + The lookahead pattern (?=...) ensures that 'begin' only matches + '|$)',end:'>',keywords:{title:'style'},contains:[TAG_INTERNALS],starts:{end:'',returnEnd:true,subLanguage:'css'}},{className:'tag',// See the comment in the ', returnEnd: true, - subLanguage: 'css' - } - }, - { - className: 'tag', - // See the comment in the