10 lines
266 KiB
JavaScript
10 lines
266 KiB
JavaScript
!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.openscadOpenJscadParser=f()}}(function(){var define;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&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}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){},{}],2:[function(require,module,exports){(function(global){(function(){function addMapEntry(map,pair){return map.set(pair[0],pair[1]),map}function addSetEntry(set,value){return set.add(value),set}function apply(func,thisArg,args){switch(args.length){case 0:return func.call(thisArg);case 1:return func.call(thisArg,args[0]);case 2:return func.call(thisArg,args[0],args[1]);case 3:return func.call(thisArg,args[0],args[1],args[2])}return func.apply(thisArg,args)}function arrayAggregator(array,setter,iteratee,accumulator){for(var index=-1,length=null==array?0:array.length;++index<length;){var value=array[index];setter(accumulator,value,iteratee(value),array)}return accumulator}function arrayEach(array,iteratee){for(var index=-1,length=null==array?0:array.length;++index<length&&iteratee(array[index],index,array)!==!1;);return array}function arrayEachRight(array,iteratee){for(var length=null==array?0:array.length;length--&&iteratee(array[length],length,array)!==!1;);return array}function arrayEvery(array,predicate){for(var index=-1,length=null==array?0:array.length;++index<length;)if(!predicate(array[index],index,array))return!1;return!0}function arrayFilter(array,predicate){for(var index=-1,length=null==array?0:array.length,resIndex=0,result=[];++index<length;){var value=array[index];predicate(value,index,array)&&(result[resIndex++]=value)}return result}function arrayIncludes(array,value){var length=null==array?0:array.length;return!!length&&baseIndexOf(array,value,0)>-1}function arrayIncludesWith(array,value,comparator){for(var index=-1,length=null==array?0:array.length;++index<length;)if(comparator(value,array[index]))return!0;return!1}function arrayMap(array,iteratee){for(var index=-1,length=null==array?0:array.length,result=Array(length);++index<length;)result[index]=iteratee(array[index],index,array);return result}function arrayPush(array,values){for(var index=-1,length=values.length,offset=array.length;++index<length;)array[offset+index]=values[index];return array}function arrayReduce(array,iteratee,accumulator,initAccum){var index=-1,length=null==array?0:array.length;for(initAccum&&length&&(accumulator=array[++index]);++index<length;)accumulator=iteratee(accumulator,array[index],index,array);return accumulator}function arrayReduceRight(array,iteratee,accumulator,initAccum){var length=null==array?0:array.length;for(initAccum&&length&&(accumulator=array[--length]);length--;)accumulator=iteratee(accumulator,array[length],length,array);return accumulator}function arraySome(array,predicate){for(var index=-1,length=null==array?0:array.length;++index<length;)if(predicate(array[index],index,array))return!0;return!1}function asciiToArray(string){return string.split("")}function asciiWords(string){return string.match(reAsciiWord)||[]}function baseFindKey(collection,predicate,eachFunc){var result;return eachFunc(collection,function(value,key,collection){if(predicate(value,key,collection))return result=key,!1}),result}function baseFindIndex(array,predicate,fromIndex,fromRight){for(var length=array.length,index=fromIndex+(fromRight?1:-1);fromRight?index--:++index<length;)if(predicate(array[index],index,array))return index;return-1}function baseIndexOf(array,value,fromIndex){return value===value?strictIndexOf(array,value,fromIndex):baseFindIndex(array,baseIsNaN,fromIndex)}function baseIndexOfWith(array,value,fromIndex,comparator){for(var index=fromIndex-1,length=array.length;++index<length;)if(comparator(array[index],value))return index;return-1}function baseIsNaN(value){return value!==value}function baseMean(array,iteratee){var length=null==array?0:array.length;return length?baseSum(array,iteratee)/length:NAN}function baseProperty(key){return function(object){return null==object?undefined:object[key]}}function basePropertyOf(object){return function(key){return null==object?undefined:object[key]}}function baseReduce(collection,iteratee,accumulator,initAccum,eachFunc){return eachFunc(collection,function(value,index,collection){accumulator=initAccum?(initAccum=!1,value):iteratee(accumulator,value,index,collection)}),accumulator}function baseSortBy(array,comparer){var length=array.length;for(array.sort(comparer);length--;)array[length]=array[length].value;return array}function baseSum(array,iteratee){for(var result,index=-1,length=array.length;++index<length;){var current=iteratee(array[index]);current!==undefined&&(result=result===undefined?current:result+current)}return result}function baseTimes(n,iteratee){for(var index=-1,result=Array(n);++index<n;)result[index]=iteratee(index);return result}function baseToPairs(object,props){return arrayMap(props,function(key){return[key,object[key]]})}function baseUnary(func){return function(value){return func(value)}}function baseValues(object,props){return arrayMap(props,function(key){return object[key]})}function cacheHas(cache,key){return cache.has(key)}function charsStartIndex(strSymbols,chrSymbols){for(var index=-1,length=strSymbols.length;++index<length&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1;);return index}function charsEndIndex(strSymbols,chrSymbols){for(var index=strSymbols.length;index--&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1;);return index}function countHolders(array,placeholder){for(var length=array.length,result=0;length--;)array[length]===placeholder&&++result;return result}function escapeStringChar(chr){return"\\"+stringEscapes[chr]}function getValue(object,key){return null==object?undefined:object[key]}function hasUnicode(string){return reHasUnicode.test(string)}function hasUnicodeWord(string){return reHasUnicodeWord.test(string)}function iteratorToArray(iterator){for(var data,result=[];!(data=iterator.next()).done;)result.push(data.value);return result}function mapToArray(map){var index=-1,result=Array(map.size);return map.forEach(function(value,key){result[++index]=[key,value]}),result}function overArg(func,transform){return function(arg){return func(transform(arg))}}function replaceHolders(array,placeholder){for(var index=-1,length=array.length,resIndex=0,result=[];++index<length;){var value=array[index];value!==placeholder&&value!==PLACEHOLDER||(array[index]=PLACEHOLDER,result[resIndex++]=index)}return result}function setToArray(set){var index=-1,result=Array(set.size);return set.forEach(function(value){result[++index]=value}),result}function setToPairs(set){var index=-1,result=Array(set.size);return set.forEach(function(value){result[++index]=[value,value]}),result}function strictIndexOf(array,value,fromIndex){for(var index=fromIndex-1,length=array.length;++index<length;)if(array[index]===value)return index;return-1}function strictLastIndexOf(array,value,fromIndex){for(var index=fromIndex+1;index--;)if(array[index]===value)return index;return index}function stringSize(string){return hasUnicode(string)?unicodeSize(string):asciiSize(string)}function stringToArray(string){return hasUnicode(string)?unicodeToArray(string):asciiToArray(string)}function unicodeSize(string){for(var result=reUnicode.lastIndex=0;reUnicode.test(string);)++result;return result}function unicodeToArray(string){return string.match(reUnicode)||[]}function unicodeWords(string){return string.match(reUnicodeWord)||[]}var undefined,VERSION="4.17.4",LARGE_ARRAY_SIZE=200,CORE_ERROR_TEXT="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",FUNC_ERROR_TEXT="Expected a function",HASH_UNDEFINED="__lodash_hash_undefined__",MAX_MEMOIZE_SIZE=500,PLACEHOLDER="__lodash_placeholder__",CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2,WRAP_BIND_FLAG=1,WRAP_BIND_KEY_FLAG=2,WRAP_CURRY_BOUND_FLAG=4,WRAP_CURRY_FLAG=8,WRAP_CURRY_RIGHT_FLAG=16,WRAP_PARTIAL_FLAG=32,WRAP_PARTIAL_RIGHT_FLAG=64,WRAP_ARY_FLAG=128,WRAP_REARG_FLAG=256,WRAP_FLIP_FLAG=512,DEFAULT_TRUNC_LENGTH=30,DEFAULT_TRUNC_OMISSION="...",HOT_COUNT=800,HOT_SPAN=16,LAZY_FILTER_FLAG=1,LAZY_MAP_FLAG=2,LAZY_WHILE_FLAG=3,INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,MAX_INTEGER=1.7976931348623157e308,NAN=NaN,MAX_ARRAY_LENGTH=4294967295,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1,wrapFlags=[["ary",WRAP_ARY_FLAG],["bind",WRAP_BIND_FLAG],["bindKey",WRAP_BIND_KEY_FLAG],["curry",WRAP_CURRY_FLAG],["curryRight",WRAP_CURRY_RIGHT_FLAG],["flip",WRAP_FLIP_FLAG],["partial",WRAP_PARTIAL_FLAG],["partialRight",WRAP_PARTIAL_RIGHT_FLAG],["rearg",WRAP_REARG_FLAG]],argsTag="[object Arguments]",arrayTag="[object Array]",asyncTag="[object AsyncFunction]",boolTag="[object Boolean]",dateTag="[object Date]",domExcTag="[object DOMException]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",nullTag="[object Null]",objectTag="[object Object]",promiseTag="[object Promise]",proxyTag="[object Proxy]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",undefinedTag="[object Undefined]",weakMapTag="[object WeakMap]",weakSetTag="[object WeakSet]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g,reEscapedHtml=/&(?:amp|lt|gt|quot|#39);/g,reUnescapedHtml=/[&<>"']/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source),reEscape=/<%-([\s\S]+?)%>/g,reEvaluate=/<%([\s\S]+?)%>/g,reInterpolate=/<%=([\s\S]+?)%>/g,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,reLeadingDot=/^\./,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reHasRegExpChar=RegExp(reRegExpChar.source),reTrim=/^\s+|\s+$/g,reTrimStart=/^\s+/,reTrimEnd=/\s+$/,reWrapComment=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,reWrapDetails=/\{\n\/\* \[wrapped with (.+)\] \*/,reSplitDetails=/,? & /,reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,reEscapeChar=/\\(\\)?/g,reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,reFlags=/\w*$/,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsHostCtor=/^\[object .+?Constructor\]$/,reIsOctal=/^0o[0-7]+$/i,reIsUint=/^(?:0|[1-9]\d*)$/,reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,reNoMatch=/($^)/,reUnescapedString=/['\n\r\u2028\u2029\\]/g,rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsDingbatRange="\\u2700-\\u27bf",rsLowerRange="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange="\\xac\\xb1\\xd7\\xf7",rsNonCharRange="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsUpperRange="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange,rsApos="['’]",rsAstral="["+rsAstralRange+"]",rsBreak="["+rsBreakRange+"]",rsCombo="["+rsComboRange+"]",rsDigits="\\d+",rsDingbat="["+rsDingbatRange+"]",rsLower="["+rsLowerRange+"]",rsMisc="[^"+rsAstralRange+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="["+rsUpperRange+"]",rsZWJ="\\u200d",rsMiscLower="(?:"+rsLower+"|"+rsMisc+")",rsMiscUpper="(?:"+rsUpper+"|"+rsMisc+")",rsOptContrLower="(?:"+rsApos+"(?:d|ll|m|re|s|t|ve))?",rsOptContrUpper="(?:"+rsApos+"(?:D|LL|M|RE|S|T|VE))?",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsOrdLower="\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)",rsOrdUpper="\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsEmoji="(?:"+[rsDingbat,rsRegional,rsSurrPair].join("|")+")"+rsSeq,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reApos=RegExp(rsApos,"g"),reComboMark=RegExp(rsCombo,"g"),reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g"),reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+"+rsOptContrLower+"(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsMiscUpper+"+"+rsOptContrUpper+"(?="+[rsBreak,rsUpper+rsMiscLower,"$"].join("|")+")",rsUpper+"?"+rsMiscLower+"+"+rsOptContrLower,rsUpper+"+"+rsOptContrUpper,rsOrdUpper,rsOrdLower,rsDigits,rsEmoji].join("|"),"g"),reHasUnicode=RegExp("["+rsZWJ+rsAstralRange+rsComboRange+rsVarRange+"]"),reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,contextProps=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],templateCounter=-1,typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=!1;var deburredLetters={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},htmlEscapes={"&":"&","<":"<",">":">",'"':""","'":"'"},htmlUnescapes={"&":"&","<":"<",">":">",""":'"',"'":"'"},stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},freeParseFloat=parseFloat,freeParseInt=parseInt,freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),freeExports="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&"object"==typeof module&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,freeProcess=moduleExports&&freeGlobal.process,nodeUtil=function(){try{return freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch(e){}}(),nodeIsArrayBuffer=nodeUtil&&nodeUtil.isArrayBuffer,nodeIsDate=nodeUtil&&nodeUtil.isDate,nodeIsMap=nodeUtil&&nodeUtil.isMap,nodeIsRegExp=nodeUtil&&nodeUtil.isRegExp,nodeIsSet=nodeUtil&&nodeUtil.isSet,nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,asciiSize=baseProperty("length"),deburrLetter=basePropertyOf(deburredLetters),escapeHtmlChar=basePropertyOf(htmlEscapes),unescapeHtmlChar=basePropertyOf(htmlUnescapes),runInContext=function runInContext(context){function lodash(value){if(isObjectLike(value)&&!isArray(value)&&!(value instanceof LazyWrapper)){if(value instanceof LodashWrapper)return value;if(hasOwnProperty.call(value,"__wrapped__"))return wrapperClone(value)}return new LodashWrapper(value)}function baseLodash(){}function LodashWrapper(value,chainAll){this.__wrapped__=value,this.__actions__=[],this.__chain__=!!chainAll,this.__index__=0,this.__values__=undefined}function LazyWrapper(value){this.__wrapped__=value,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=MAX_ARRAY_LENGTH,this.__views__=[]}function lazyClone(){var result=new LazyWrapper(this.__wrapped__);return result.__actions__=copyArray(this.__actions__),result.__dir__=this.__dir__,result.__filtered__=this.__filtered__,result.__iteratees__=copyArray(this.__iteratees__),result.__takeCount__=this.__takeCount__,result.__views__=copyArray(this.__views__),result}function lazyReverse(){if(this.__filtered__){var result=new LazyWrapper(this);result.__dir__=-1,result.__filtered__=!0}else result=this.clone(),result.__dir__*=-1;return result}function lazyValue(){var array=this.__wrapped__.value(),dir=this.__dir__,isArr=isArray(array),isRight=dir<0,arrLength=isArr?array.length:0,view=getView(0,arrLength,this.__views__),start=view.start,end=view.end,length=end-start,index=isRight?end:start-1,iteratees=this.__iteratees__,iterLength=iteratees.length,resIndex=0,takeCount=nativeMin(length,this.__takeCount__);if(!isArr||!isRight&&arrLength==length&&takeCount==length)return baseWrapperValue(array,this.__actions__);var result=[];outer:for(;length--&&resIndex<takeCount;){index+=dir;for(var iterIndex=-1,value=array[index];++iterIndex<iterLength;){var data=iteratees[iterIndex],iteratee=data.iteratee,type=data.type,computed=iteratee(value);if(type==LAZY_MAP_FLAG)value=computed;else if(!computed){if(type==LAZY_FILTER_FLAG)continue outer;break outer}}result[resIndex++]=value}return result}function Hash(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(key){var result=this.has(key)&&delete this.__data__[key];return this.size-=result?1:0,result}function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?undefined:result}return hasOwnProperty.call(data,key)?data[key]:undefined}function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==undefined:hasOwnProperty.call(data,key)}function hashSet(key,value){var data=this.__data__;return this.size+=this.has(key)?0:1,data[key]=nativeCreate&&value===undefined?HASH_UNDEFINED:value,this}function ListCache(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function listCacheClear(){this.__data__=[],this.size=0}function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0)return!1;var lastIndex=data.length-1;return index==lastIndex?data.pop():splice.call(data,index,1),--this.size,!0}function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined:data[index][1]}function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);return index<0?(++this.size,data.push([key,value])):data[index][1]=value,this}function MapCache(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}function mapCacheDelete(key){var result=getMapData(this,key).delete(key);return this.size-=result?1:0,result}function mapCacheGet(key){return getMapData(this,key).get(key)}function mapCacheHas(key){return getMapData(this,key).has(key)}function mapCacheSet(key,value){var data=getMapData(this,key),size=data.size;return data.set(key,value),this.size+=data.size==size?0:1,this}function SetCache(values){var index=-1,length=null==values?0:values.length;for(this.__data__=new MapCache;++index<length;)this.add(values[index])}function setCacheAdd(value){return this.__data__.set(value,HASH_UNDEFINED),this}function setCacheHas(value){return this.__data__.has(value)}function Stack(entries){var data=this.__data__=new ListCache(entries);this.size=data.size}function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(key){var data=this.__data__,result=data.delete(key);return this.size=data.size,result}function stackGet(key){return this.__data__.get(key)}function stackHas(key){return this.__data__.has(key)}function stackSet(key,value){var data=this.__data__;if(data instanceof ListCache){var pairs=data.__data__;if(!Map||pairs.length<LARGE_ARRAY_SIZE-1)return pairs.push([key,value]),this.size=++data.size,this;data=this.__data__=new MapCache(pairs)}return data.set(key,value),this.size=data.size,this}function arrayLikeKeys(value,inherited){var isArr=isArray(value),isArg=!isArr&&isArguments(value),isBuff=!isArr&&!isArg&&isBuffer(value),isType=!isArr&&!isArg&&!isBuff&&isTypedArray(value),skipIndexes=isArr||isArg||isBuff||isType,result=skipIndexes?baseTimes(value.length,String):[],length=result.length;for(var key in value)!inherited&&!hasOwnProperty.call(value,key)||skipIndexes&&("length"==key||isBuff&&("offset"==key||"parent"==key)||isType&&("buffer"==key||"byteLength"==key||"byteOffset"==key)||isIndex(key,length))||result.push(key);return result}function arraySample(array){var length=array.length;return length?array[baseRandom(0,length-1)]:undefined}function arraySampleSize(array,n){return shuffleSelf(copyArray(array),baseClamp(n,0,array.length))}function arrayShuffle(array){return shuffleSelf(copyArray(array))}function assignMergeValue(object,key,value){(value===undefined||eq(object[key],value))&&(value!==undefined||key in object)||baseAssignValue(object,key,value)}function assignValue(object,key,value){var objValue=object[key];hasOwnProperty.call(object,key)&&eq(objValue,value)&&(value!==undefined||key in object)||baseAssignValue(object,key,value)}function assocIndexOf(array,key){for(var length=array.length;length--;)if(eq(array[length][0],key))return length;return-1}function baseAggregator(collection,setter,iteratee,accumulator){return baseEach(collection,function(value,key,collection){setter(accumulator,value,iteratee(value),collection)}),accumulator}function baseAssign(object,source){return object&©Object(source,keys(source),object)}function baseAssignIn(object,source){return object&©Object(source,keysIn(source),object)}function baseAssignValue(object,key,value){"__proto__"==key&&defineProperty?defineProperty(object,key,{configurable:!0,enumerable:!0,value:value,writable:!0}):object[key]=value}function baseAt(object,paths){for(var index=-1,length=paths.length,result=Array(length),skip=null==object;++index<length;)result[index]=skip?undefined:get(object,paths[index]);return result}function baseClamp(number,lower,upper){return number===number&&(upper!==undefined&&(number=number<=upper?number:upper),lower!==undefined&&(number=number>=lower?number:lower)),number}function baseClone(value,bitmask,customizer,key,object,stack){var result,isDeep=bitmask&CLONE_DEEP_FLAG,isFlat=bitmask&CLONE_FLAT_FLAG,isFull=bitmask&CLONE_SYMBOLS_FLAG;if(customizer&&(result=object?customizer(value,key,object,stack):customizer(value)),result!==undefined)return result;if(!isObject(value))return value;var isArr=isArray(value);if(isArr){if(result=initCloneArray(value),!isDeep)return copyArray(value,result)}else{var tag=getTag(value),isFunc=tag==funcTag||tag==genTag;if(isBuffer(value))return cloneBuffer(value,isDeep);if(tag==objectTag||tag==argsTag||isFunc&&!object){if(result=isFlat||isFunc?{}:initCloneObject(value),!isDeep)return isFlat?copySymbolsIn(value,baseAssignIn(result,value)):copySymbols(value,baseAssign(result,value))}else{if(!cloneableTags[tag])return object?value:{};result=initCloneByTag(value,tag,baseClone,isDeep)}}stack||(stack=new Stack);var stacked=stack.get(value);if(stacked)return stacked;stack.set(value,result);var keysFunc=isFull?isFlat?getAllKeysIn:getAllKeys:isFlat?keysIn:keys,props=isArr?undefined:keysFunc(value);return arrayEach(props||value,function(subValue,key){props&&(key=subValue,subValue=value[key]),assignValue(result,key,baseClone(subValue,bitmask,customizer,key,value,stack))}),result}function baseConforms(source){var props=keys(source);return function(object){return baseConformsTo(object,source,props)}}function baseConformsTo(object,source,props){var length=props.length;if(null==object)return!length;for(object=Object(object);length--;){var key=props[length],predicate=source[key],value=object[key];if(value===undefined&&!(key in object)||!predicate(value))return!1}return!0}function baseDelay(func,wait,args){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return setTimeout(function(){func.apply(undefined,args)},wait)}function baseDifference(array,values,iteratee,comparator){var index=-1,includes=arrayIncludes,isCommon=!0,length=array.length,result=[],valuesLength=values.length;if(!length)return result;iteratee&&(values=arrayMap(values,baseUnary(iteratee))),comparator?(includes=arrayIncludesWith,isCommon=!1):values.length>=LARGE_ARRAY_SIZE&&(includes=cacheHas,isCommon=!1,values=new SetCache(values));outer:for(;++index<length;){var value=array[index],computed=null==iteratee?value:iteratee(value);if(value=comparator||0!==value?value:0,isCommon&&computed===computed){for(var valuesIndex=valuesLength;valuesIndex--;)if(values[valuesIndex]===computed)continue outer;result.push(value)}else includes(values,computed,comparator)||result.push(value)}return result}function baseEvery(collection,predicate){var result=!0;return baseEach(collection,function(value,index,collection){return result=!!predicate(value,index,collection)}),result}function baseExtremum(array,iteratee,comparator){for(var index=-1,length=array.length;++index<length;){var value=array[index],current=iteratee(value);if(null!=current&&(computed===undefined?current===current&&!isSymbol(current):comparator(current,computed)))var computed=current,result=value}return result}function baseFill(array,value,start,end){var length=array.length;for(start=toInteger(start),start<0&&(start=-start>length?0:length+start),end=end===undefined||end>length?length:toInteger(end),end<0&&(end+=length),end=start>end?0:toLength(end);start<end;)array[start++]=value;return array}function baseFilter(collection,predicate){var result=[];return baseEach(collection,function(value,index,collection){predicate(value,index,collection)&&result.push(value)}),result}function baseFlatten(array,depth,predicate,isStrict,result){var index=-1,length=array.length;for(predicate||(predicate=isFlattenable),result||(result=[]);++index<length;){var value=array[index];depth>0&&predicate(value)?depth>1?baseFlatten(value,depth-1,predicate,isStrict,result):arrayPush(result,value):isStrict||(result[result.length]=value)}return result}function baseForOwn(object,iteratee){return object&&baseFor(object,iteratee,keys)}function baseForOwnRight(object,iteratee){return object&&baseForRight(object,iteratee,keys)}function baseFunctions(object,props){return arrayFilter(props,function(key){return isFunction(object[key])})}function baseGet(object,path){path=castPath(path,object);for(var index=0,length=path.length;null!=object&&index<length;)object=object[toKey(path[index++])];return index&&index==length?object:undefined}function baseGetAllKeys(object,keysFunc,symbolsFunc){var result=keysFunc(object);return isArray(object)?result:arrayPush(result,symbolsFunc(object))}function baseGetTag(value){return null==value?value===undefined?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(value)?getRawTag(value):objectToString(value)}function baseGt(value,other){return value>other}function baseHas(object,key){return null!=object&&hasOwnProperty.call(object,key)}function baseHasIn(object,key){return null!=object&&key in Object(object)}function baseInRange(number,start,end){return number>=nativeMin(start,end)&&number<nativeMax(start,end)}function baseIntersection(arrays,iteratee,comparator){for(var includes=comparator?arrayIncludesWith:arrayIncludes,length=arrays[0].length,othLength=arrays.length,othIndex=othLength,caches=Array(othLength),maxLength=1/0,result=[];othIndex--;){var array=arrays[othIndex];othIndex&&iteratee&&(array=arrayMap(array,baseUnary(iteratee))),maxLength=nativeMin(array.length,maxLength),caches[othIndex]=!comparator&&(iteratee||length>=120&&array.length>=120)?new SetCache(othIndex&&array):undefined}array=arrays[0];var index=-1,seen=caches[0];outer:for(;++index<length&&result.length<maxLength;){var value=array[index],computed=iteratee?iteratee(value):value;if(value=comparator||0!==value?value:0,!(seen?cacheHas(seen,computed):includes(result,computed,comparator))){for(othIndex=othLength;--othIndex;){var cache=caches[othIndex];if(!(cache?cacheHas(cache,computed):includes(arrays[othIndex],computed,comparator)))continue outer}seen&&seen.push(computed),result.push(value)}}return result}function baseInverter(object,setter,iteratee,accumulator){return baseForOwn(object,function(value,key,object){setter(accumulator,iteratee(value),key,object)}),accumulator}function baseInvoke(object,path,args){path=castPath(path,object),
|
||
object=parent(object,path);var func=null==object?object:object[toKey(last(path))];return null==func?undefined:apply(func,object,args)}function baseIsArguments(value){return isObjectLike(value)&&baseGetTag(value)==argsTag}function baseIsArrayBuffer(value){return isObjectLike(value)&&baseGetTag(value)==arrayBufferTag}function baseIsDate(value){return isObjectLike(value)&&baseGetTag(value)==dateTag}function baseIsEqual(value,other,bitmask,customizer,stack){return value===other||(null==value||null==other||!isObjectLike(value)&&!isObjectLike(other)?value!==value&&other!==other:baseIsEqualDeep(value,other,bitmask,customizer,baseIsEqual,stack))}function baseIsEqualDeep(object,other,bitmask,customizer,equalFunc,stack){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=objIsArr?arrayTag:getTag(object),othTag=othIsArr?arrayTag:getTag(other);objTag=objTag==argsTag?objectTag:objTag,othTag=othTag==argsTag?objectTag:othTag;var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&isBuffer(object)){if(!isBuffer(other))return!1;objIsArr=!0,objIsObj=!1}if(isSameTag&&!objIsObj)return stack||(stack=new Stack),objIsArr||isTypedArray(object)?equalArrays(object,other,bitmask,customizer,equalFunc,stack):equalByTag(object,other,objTag,bitmask,customizer,equalFunc,stack);if(!(bitmask&COMPARE_PARTIAL_FLAG)){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;return stack||(stack=new Stack),equalFunc(objUnwrapped,othUnwrapped,bitmask,customizer,stack)}}return!!isSameTag&&(stack||(stack=new Stack),equalObjects(object,other,bitmask,customizer,equalFunc,stack))}function baseIsMap(value){return isObjectLike(value)&&getTag(value)==mapTag}function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(null==object)return!length;for(object=Object(object);index--;){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object))return!1}for(;++index<length;){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(objValue===undefined&&!(key in object))return!1}else{var stack=new Stack;if(customizer)var result=customizer(objValue,srcValue,key,object,source,stack);if(!(result===undefined?baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG,customizer,stack):result))return!1}}return!0}function baseIsNative(value){if(!isObject(value)||isMasked(value))return!1;var pattern=isFunction(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function baseIsRegExp(value){return isObjectLike(value)&&baseGetTag(value)==regexpTag}function baseIsSet(value){return isObjectLike(value)&&getTag(value)==setTag}function baseIsTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[baseGetTag(value)]}function baseIteratee(value){return"function"==typeof value?value:null==value?identity:"object"==typeof value?isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value):property(value)}function baseKeys(object){if(!isPrototype(object))return nativeKeys(object);var result=[];for(var key in Object(object))hasOwnProperty.call(object,key)&&"constructor"!=key&&result.push(key);return result}function baseKeysIn(object){if(!isObject(object))return nativeKeysIn(object);var isProto=isPrototype(object),result=[];for(var key in object)("constructor"!=key||!isProto&&hasOwnProperty.call(object,key))&&result.push(key);return result}function baseLt(value,other){return value<other}function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,function(value,key,collection){result[++index]=iteratee(value,key,collection)}),result}function baseMatches(source){var matchData=getMatchData(source);return 1==matchData.length&&matchData[0][2]?matchesStrictComparable(matchData[0][0],matchData[0][1]):function(object){return object===source||baseIsMatch(object,source,matchData)}}function baseMatchesProperty(path,srcValue){return isKey(path)&&isStrictComparable(srcValue)?matchesStrictComparable(toKey(path),srcValue):function(object){var objValue=get(object,path);return objValue===undefined&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}function baseMerge(object,source,srcIndex,customizer,stack){object!==source&&baseFor(source,function(srcValue,key){if(isObject(srcValue))stack||(stack=new Stack),baseMergeDeep(object,source,key,srcIndex,baseMerge,customizer,stack);else{var newValue=customizer?customizer(object[key],srcValue,key+"",object,source,stack):undefined;newValue===undefined&&(newValue=srcValue),assignMergeValue(object,key,newValue)}},keysIn)}function baseMergeDeep(object,source,key,srcIndex,mergeFunc,customizer,stack){var objValue=object[key],srcValue=source[key],stacked=stack.get(srcValue);if(stacked)return void assignMergeValue(object,key,stacked);var newValue=customizer?customizer(objValue,srcValue,key+"",object,source,stack):undefined,isCommon=newValue===undefined;if(isCommon){var isArr=isArray(srcValue),isBuff=!isArr&&isBuffer(srcValue),isTyped=!isArr&&!isBuff&&isTypedArray(srcValue);newValue=srcValue,isArr||isBuff||isTyped?isArray(objValue)?newValue=objValue:isArrayLikeObject(objValue)?newValue=copyArray(objValue):isBuff?(isCommon=!1,newValue=cloneBuffer(srcValue,!0)):isTyped?(isCommon=!1,newValue=cloneTypedArray(srcValue,!0)):newValue=[]:isPlainObject(srcValue)||isArguments(srcValue)?(newValue=objValue,isArguments(objValue)?newValue=toPlainObject(objValue):(!isObject(objValue)||srcIndex&&isFunction(objValue))&&(newValue=initCloneObject(srcValue))):isCommon=!1}isCommon&&(stack.set(srcValue,newValue),mergeFunc(newValue,srcValue,srcIndex,customizer,stack),stack.delete(srcValue)),assignMergeValue(object,key,newValue)}function baseNth(array,n){var length=array.length;if(length)return n+=n<0?length:0,isIndex(n,length)?array[n]:undefined}function baseOrderBy(collection,iteratees,orders){var index=-1;iteratees=arrayMap(iteratees.length?iteratees:[identity],baseUnary(getIteratee()));var result=baseMap(collection,function(value,key,collection){var criteria=arrayMap(iteratees,function(iteratee){return iteratee(value)});return{criteria:criteria,index:++index,value:value}});return baseSortBy(result,function(object,other){return compareMultiple(object,other,orders)})}function basePick(object,paths){return basePickBy(object,paths,function(value,path){return hasIn(object,path)})}function basePickBy(object,paths,predicate){for(var index=-1,length=paths.length,result={};++index<length;){var path=paths[index],value=baseGet(object,path);predicate(value,path)&&baseSet(result,castPath(path,object),value)}return result}function basePropertyDeep(path){return function(object){return baseGet(object,path)}}function basePullAll(array,values,iteratee,comparator){var indexOf=comparator?baseIndexOfWith:baseIndexOf,index=-1,length=values.length,seen=array;for(array===values&&(values=copyArray(values)),iteratee&&(seen=arrayMap(array,baseUnary(iteratee)));++index<length;)for(var fromIndex=0,value=values[index],computed=iteratee?iteratee(value):value;(fromIndex=indexOf(seen,computed,fromIndex,comparator))>-1;)seen!==array&&splice.call(seen,fromIndex,1),splice.call(array,fromIndex,1);return array}function basePullAt(array,indexes){for(var length=array?indexes.length:0,lastIndex=length-1;length--;){var index=indexes[length];if(length==lastIndex||index!==previous){var previous=index;isIndex(index)?splice.call(array,index,1):baseUnset(array,index)}}return array}function baseRandom(lower,upper){return lower+nativeFloor(nativeRandom()*(upper-lower+1))}function baseRange(start,end,step,fromRight){for(var index=-1,length=nativeMax(nativeCeil((end-start)/(step||1)),0),result=Array(length);length--;)result[fromRight?length:++index]=start,start+=step;return result}function baseRepeat(string,n){var result="";if(!string||n<1||n>MAX_SAFE_INTEGER)return result;do n%2&&(result+=string),n=nativeFloor(n/2),n&&(string+=string);while(n);return result}function baseRest(func,start){return setToString(overRest(func,start,identity),func+"")}function baseSample(collection){return arraySample(values(collection))}function baseSampleSize(collection,n){var array=values(collection);return shuffleSelf(array,baseClamp(n,0,array.length))}function baseSet(object,path,value,customizer){if(!isObject(object))return object;path=castPath(path,object);for(var index=-1,length=path.length,lastIndex=length-1,nested=object;null!=nested&&++index<length;){var key=toKey(path[index]),newValue=value;if(index!=lastIndex){var objValue=nested[key];newValue=customizer?customizer(objValue,key,nested):undefined,newValue===undefined&&(newValue=isObject(objValue)?objValue:isIndex(path[index+1])?[]:{})}assignValue(nested,key,newValue),nested=nested[key]}return object}function baseShuffle(collection){return shuffleSelf(values(collection))}function baseSlice(array,start,end){var index=-1,length=array.length;start<0&&(start=-start>length?0:length+start),end=end>length?length:end,end<0&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);++index<length;)result[index]=array[index+start];return result}function baseSome(collection,predicate){var result;return baseEach(collection,function(value,index,collection){return result=predicate(value,index,collection),!result}),!!result}function baseSortedIndex(array,value,retHighest){var low=0,high=null==array?low:array.length;if("number"==typeof value&&value===value&&high<=HALF_MAX_ARRAY_LENGTH){for(;low<high;){var mid=low+high>>>1,computed=array[mid];null!==computed&&!isSymbol(computed)&&(retHighest?computed<=value:computed<value)?low=mid+1:high=mid}return high}return baseSortedIndexBy(array,value,identity,retHighest)}function baseSortedIndexBy(array,value,iteratee,retHighest){value=iteratee(value);for(var low=0,high=null==array?0:array.length,valIsNaN=value!==value,valIsNull=null===value,valIsSymbol=isSymbol(value),valIsUndefined=value===undefined;low<high;){var mid=nativeFloor((low+high)/2),computed=iteratee(array[mid]),othIsDefined=computed!==undefined,othIsNull=null===computed,othIsReflexive=computed===computed,othIsSymbol=isSymbol(computed);if(valIsNaN)var setLow=retHighest||othIsReflexive;else setLow=valIsUndefined?othIsReflexive&&(retHighest||othIsDefined):valIsNull?othIsReflexive&&othIsDefined&&(retHighest||!othIsNull):valIsSymbol?othIsReflexive&&othIsDefined&&!othIsNull&&(retHighest||!othIsSymbol):!othIsNull&&!othIsSymbol&&(retHighest?computed<=value:computed<value);setLow?low=mid+1:high=mid}return nativeMin(high,MAX_ARRAY_INDEX)}function baseSortedUniq(array,iteratee){for(var index=-1,length=array.length,resIndex=0,result=[];++index<length;){var value=array[index],computed=iteratee?iteratee(value):value;if(!index||!eq(computed,seen)){var seen=computed;result[resIndex++]=0===value?0:value}}return result}function baseToNumber(value){return"number"==typeof value?value:isSymbol(value)?NAN:+value}function baseToString(value){if("string"==typeof value)return value;if(isArray(value))return arrayMap(value,baseToString)+"";if(isSymbol(value))return symbolToString?symbolToString.call(value):"";var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function baseUniq(array,iteratee,comparator){var index=-1,includes=arrayIncludes,length=array.length,isCommon=!0,result=[],seen=result;if(comparator)isCommon=!1,includes=arrayIncludesWith;else if(length>=LARGE_ARRAY_SIZE){var set=iteratee?null:createSet(array);if(set)return setToArray(set);isCommon=!1,includes=cacheHas,seen=new SetCache}else seen=iteratee?[]:result;outer:for(;++index<length;){var value=array[index],computed=iteratee?iteratee(value):value;if(value=comparator||0!==value?value:0,isCommon&&computed===computed){for(var seenIndex=seen.length;seenIndex--;)if(seen[seenIndex]===computed)continue outer;iteratee&&seen.push(computed),result.push(value)}else includes(seen,computed,comparator)||(seen!==result&&seen.push(computed),result.push(value))}return result}function baseUnset(object,path){return path=castPath(path,object),object=parent(object,path),null==object||delete object[toKey(last(path))]}function baseUpdate(object,path,updater,customizer){return baseSet(object,path,updater(baseGet(object,path)),customizer)}function baseWhile(array,predicate,isDrop,fromRight){for(var length=array.length,index=fromRight?length:-1;(fromRight?index--:++index<length)&&predicate(array[index],index,array););return isDrop?baseSlice(array,fromRight?0:index,fromRight?index+1:length):baseSlice(array,fromRight?index+1:0,fromRight?length:index)}function baseWrapperValue(value,actions){var result=value;return result instanceof LazyWrapper&&(result=result.value()),arrayReduce(actions,function(result,action){return action.func.apply(action.thisArg,arrayPush([result],action.args))},result)}function baseXor(arrays,iteratee,comparator){var length=arrays.length;if(length<2)return length?baseUniq(arrays[0]):[];for(var index=-1,result=Array(length);++index<length;)for(var array=arrays[index],othIndex=-1;++othIndex<length;)othIndex!=index&&(result[index]=baseDifference(result[index]||array,arrays[othIndex],iteratee,comparator));return baseUniq(baseFlatten(result,1),iteratee,comparator)}function baseZipObject(props,values,assignFunc){for(var index=-1,length=props.length,valsLength=values.length,result={};++index<length;){var value=index<valsLength?values[index]:undefined;assignFunc(result,props[index],value)}return result}function castArrayLikeObject(value){return isArrayLikeObject(value)?value:[]}function castFunction(value){return"function"==typeof value?value:identity}function castPath(value,object){return isArray(value)?value:isKey(value,object)?[value]:stringToPath(toString(value))}function castSlice(array,start,end){var length=array.length;return end=end===undefined?length:end,!start&&end>=length?array:baseSlice(array,start,end)}function cloneBuffer(buffer,isDeep){if(isDeep)return buffer.slice();var length=buffer.length,result=allocUnsafe?allocUnsafe(length):new buffer.constructor(length);return buffer.copy(result),result}function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);return new Uint8Array(result).set(new Uint8Array(arrayBuffer)),result}function cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength)}function cloneMap(map,isDeep,cloneFunc){var array=isDeep?cloneFunc(mapToArray(map),CLONE_DEEP_FLAG):mapToArray(map);return arrayReduce(array,addMapEntry,new map.constructor)}function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));return result.lastIndex=regexp.lastIndex,result}function cloneSet(set,isDeep,cloneFunc){var array=isDeep?cloneFunc(setToArray(set),CLONE_DEEP_FLAG):setToArray(set);return arrayReduce(array,addSetEntry,new set.constructor)}function cloneSymbol(symbol){return symbolValueOf?Object(symbolValueOf.call(symbol)):{}}function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length)}function compareAscending(value,other){if(value!==other){var valIsDefined=value!==undefined,valIsNull=null===value,valIsReflexive=value===value,valIsSymbol=isSymbol(value),othIsDefined=other!==undefined,othIsNull=null===other,othIsReflexive=other===other,othIsSymbol=isSymbol(other);if(!othIsNull&&!othIsSymbol&&!valIsSymbol&&value>other||valIsSymbol&&othIsDefined&&othIsReflexive&&!othIsNull&&!othIsSymbol||valIsNull&&othIsDefined&&othIsReflexive||!valIsDefined&&othIsReflexive||!valIsReflexive)return 1;if(!valIsNull&&!valIsSymbol&&!othIsSymbol&&value<other||othIsSymbol&&valIsDefined&&valIsReflexive&&!valIsNull&&!valIsSymbol||othIsNull&&valIsDefined&&valIsReflexive||!othIsDefined&&valIsReflexive||!othIsReflexive)return-1}return 0}function compareMultiple(object,other,orders){for(var index=-1,objCriteria=object.criteria,othCriteria=other.criteria,length=objCriteria.length,ordersLength=orders.length;++index<length;){var result=compareAscending(objCriteria[index],othCriteria[index]);if(result){if(index>=ordersLength)return result;var order=orders[index];return result*("desc"==order?-1:1)}}return object.index-other.index}function composeArgs(args,partials,holders,isCurried){for(var argsIndex=-1,argsLength=args.length,holdersLength=holders.length,leftIndex=-1,leftLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(leftLength+rangeLength),isUncurried=!isCurried;++leftIndex<leftLength;)result[leftIndex]=partials[leftIndex];for(;++argsIndex<holdersLength;)(isUncurried||argsIndex<argsLength)&&(result[holders[argsIndex]]=args[argsIndex]);for(;rangeLength--;)result[leftIndex++]=args[argsIndex++];return result}function composeArgsRight(args,partials,holders,isCurried){for(var argsIndex=-1,argsLength=args.length,holdersIndex=-1,holdersLength=holders.length,rightIndex=-1,rightLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(rangeLength+rightLength),isUncurried=!isCurried;++argsIndex<rangeLength;)result[argsIndex]=args[argsIndex];for(var offset=argsIndex;++rightIndex<rightLength;)result[offset+rightIndex]=partials[rightIndex];for(;++holdersIndex<holdersLength;)(isUncurried||argsIndex<argsLength)&&(result[offset+holders[holdersIndex]]=args[argsIndex++]);return result}function copyArray(source,array){var index=-1,length=source.length;for(array||(array=Array(length));++index<length;)array[index]=source[index];return array}function copyObject(source,props,object,customizer){var isNew=!object;object||(object={});for(var index=-1,length=props.length;++index<length;){var key=props[index],newValue=customizer?customizer(object[key],source[key],key,object,source):undefined;newValue===undefined&&(newValue=source[key]),isNew?baseAssignValue(object,key,newValue):assignValue(object,key,newValue)}return object}function copySymbols(source,object){return copyObject(source,getSymbols(source),object)}function copySymbolsIn(source,object){return copyObject(source,getSymbolsIn(source),object)}function createAggregator(setter,initializer){return function(collection,iteratee){var func=isArray(collection)?arrayAggregator:baseAggregator,accumulator=initializer?initializer():{};return func(collection,setter,getIteratee(iteratee,2),accumulator)}}function createAssigner(assigner){return baseRest(function(object,sources){var index=-1,length=sources.length,customizer=length>1?sources[length-1]:undefined,guard=length>2?sources[2]:undefined;for(customizer=assigner.length>3&&"function"==typeof customizer?(length--,customizer):undefined,guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=length<3?undefined:customizer,length=1),object=Object(object);++index<length;){var source=sources[index];source&&assigner(object,source,index,customizer)}return object})}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){if(null==collection)return collection;if(!isArrayLike(collection))return eachFunc(collection,iteratee);for(var length=collection.length,index=fromRight?length:-1,iterable=Object(collection);(fromRight?index--:++index<length)&&iteratee(iterable[index],index,iterable)!==!1;);return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){for(var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;length--;){var key=props[fromRight?length:++index];if(iteratee(iterable[key],key,iterable)===!1)break}return object}}function createBind(func,bitmask,thisArg){function wrapper(){var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return fn.apply(isBind?thisArg:this,arguments)}var isBind=bitmask&WRAP_BIND_FLAG,Ctor=createCtor(func);return wrapper}function createCaseFirst(methodName){return function(string){string=toString(string);var strSymbols=hasUnicode(string)?stringToArray(string):undefined,chr=strSymbols?strSymbols[0]:string.charAt(0),trailing=strSymbols?castSlice(strSymbols,1).join(""):string.slice(1);return chr[methodName]()+trailing}}function createCompounder(callback){return function(string){return arrayReduce(words(deburr(string).replace(reApos,"")),callback,"")}}function createCtor(Ctor){return function(){var args=arguments;switch(args.length){case 0:return new Ctor;case 1:return new Ctor(args[0]);case 2:return new Ctor(args[0],args[1]);case 3:return new Ctor(args[0],args[1],args[2]);case 4:return new Ctor(args[0],args[1],args[2],args[3]);case 5:return new Ctor(args[0],args[1],args[2],args[3],args[4]);case 6:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5]);case 7:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5],args[6])}var thisBinding=baseCreate(Ctor.prototype),result=Ctor.apply(thisBinding,args);return isObject(result)?result:thisBinding}}function createCurry(func,bitmask,arity){function wrapper(){for(var length=arguments.length,args=Array(length),index=length,placeholder=getHolder(wrapper);index--;)args[index]=arguments[index];var holders=length<3&&args[0]!==placeholder&&args[length-1]!==placeholder?[]:replaceHolders(args,placeholder);if(length-=holders.length,length<arity)return createRecurry(func,bitmask,createHybrid,wrapper.placeholder,undefined,args,holders,undefined,undefined,arity-length);var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return apply(fn,this,args)}var Ctor=createCtor(func);return wrapper}function createFind(findIndexFunc){return function(collection,predicate,fromIndex){var iterable=Object(collection);if(!isArrayLike(collection)){var iteratee=getIteratee(predicate,3);collection=keys(collection),predicate=function(key){return iteratee(iterable[key],key,iterable)}}var index=findIndexFunc(collection,predicate,fromIndex);return index>-1?iterable[iteratee?collection[index]:index]:undefined}}function createFlow(fromRight){return flatRest(function(funcs){var length=funcs.length,index=length,prereq=LodashWrapper.prototype.thru;for(fromRight&&funcs.reverse();index--;){var func=funcs[index];if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);if(prereq&&!wrapper&&"wrapper"==getFuncName(func))var wrapper=new LodashWrapper([],!0)}for(index=wrapper?index:length;++index<length;){func=funcs[index];var funcName=getFuncName(func),data="wrapper"==funcName?getData(func):undefined;wrapper=data&&isLaziable(data[0])&&data[1]==(WRAP_ARY_FLAG|WRAP_CURRY_FLAG|WRAP_PARTIAL_FLAG|WRAP_REARG_FLAG)&&!data[4].length&&1==data[9]?wrapper[getFuncName(data[0])].apply(wrapper,data[3]):1==func.length&&isLaziable(func)?wrapper[funcName]():wrapper.thru(func)}return function(){var args=arguments,value=args[0];if(wrapper&&1==args.length&&isArray(value))return wrapper.plant(value).value();for(var index=0,result=length?funcs[index].apply(this,args):value;++index<length;)result=funcs[index].call(this,result);return result}})}function createHybrid(func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity){function wrapper(){for(var length=arguments.length,args=Array(length),index=length;index--;)args[index]=arguments[index];if(isCurried)var placeholder=getHolder(wrapper),holdersCount=countHolders(args,placeholder);if(partials&&(args=composeArgs(args,partials,holders,isCurried)),partialsRight&&(args=composeArgsRight(args,partialsRight,holdersRight,isCurried)),length-=holdersCount,isCurried&&length<arity){var newHolders=replaceHolders(args,placeholder);return createRecurry(func,bitmask,createHybrid,wrapper.placeholder,thisArg,args,newHolders,argPos,ary,arity-length)}var thisBinding=isBind?thisArg:this,fn=isBindKey?thisBinding[func]:func;return length=args.length,argPos?args=reorder(args,argPos):isFlip&&length>1&&args.reverse(),isAry&&ary<length&&(args.length=ary),this&&this!==root&&this instanceof wrapper&&(fn=Ctor||createCtor(fn)),fn.apply(thisBinding,args)}var isAry=bitmask&WRAP_ARY_FLAG,isBind=bitmask&WRAP_BIND_FLAG,isBindKey=bitmask&WRAP_BIND_KEY_FLAG,isCurried=bitmask&(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG),isFlip=bitmask&WRAP_FLIP_FLAG,Ctor=isBindKey?undefined:createCtor(func);return wrapper}function createInverter(setter,toIteratee){return function(object,iteratee){return baseInverter(object,setter,toIteratee(iteratee),{})}}function createMathOperation(operator,defaultValue){return function(value,other){var result;if(value===undefined&&other===undefined)return defaultValue;if(value!==undefined&&(result=value),other!==undefined){if(result===undefined)return other;"string"==typeof value||"string"==typeof other?(value=baseToString(value),other=baseToString(other)):(value=baseToNumber(value),other=baseToNumber(other)),result=operator(value,other)}return result}}function createOver(arrayFunc){return flatRest(function(iteratees){return iteratees=arrayMap(iteratees,baseUnary(getIteratee())),baseRest(function(args){var thisArg=this;return arrayFunc(iteratees,function(iteratee){return apply(iteratee,thisArg,args)})})})}function createPadding(length,chars){chars=chars===undefined?" ":baseToString(chars);var charsLength=chars.length;if(charsLength<2)return charsLength?baseRepeat(chars,length):chars;var result=baseRepeat(chars,nativeCeil(length/stringSize(chars)));return hasUnicode(chars)?castSlice(stringToArray(result),0,length).join(""):result.slice(0,length)}function createPartial(func,bitmask,thisArg,partials){function wrapper(){for(var argsIndex=-1,argsLength=arguments.length,leftIndex=-1,leftLength=partials.length,args=Array(leftLength+argsLength),fn=this&&this!==root&&this instanceof wrapper?Ctor:func;++leftIndex<leftLength;)args[leftIndex]=partials[leftIndex];for(;argsLength--;)args[leftIndex++]=arguments[++argsIndex];return apply(fn,isBind?thisArg:this,args)}var isBind=bitmask&WRAP_BIND_FLAG,Ctor=createCtor(func);return wrapper}function createRange(fromRight){return function(start,end,step){return step&&"number"!=typeof step&&isIterateeCall(start,end,step)&&(end=step=undefined),start=toFinite(start),end===undefined?(end=start,start=0):end=toFinite(end),step=step===undefined?start<end?1:-1:toFinite(step),baseRange(start,end,step,fromRight)}}function createRelationalOperation(operator){return function(value,other){return"string"==typeof value&&"string"==typeof other||(value=toNumber(value),other=toNumber(other)),operator(value,other)}}function createRecurry(func,bitmask,wrapFunc,placeholder,thisArg,partials,holders,argPos,ary,arity){var isCurry=bitmask&WRAP_CURRY_FLAG,newHolders=isCurry?holders:undefined,newHoldersRight=isCurry?undefined:holders,newPartials=isCurry?partials:undefined,newPartialsRight=isCurry?undefined:partials;bitmask|=isCurry?WRAP_PARTIAL_FLAG:WRAP_PARTIAL_RIGHT_FLAG,bitmask&=~(isCurry?WRAP_PARTIAL_RIGHT_FLAG:WRAP_PARTIAL_FLAG),bitmask&WRAP_CURRY_BOUND_FLAG||(bitmask&=~(WRAP_BIND_FLAG|WRAP_BIND_KEY_FLAG));var newData=[func,bitmask,thisArg,newPartials,newHolders,newPartialsRight,newHoldersRight,argPos,ary,arity],result=wrapFunc.apply(undefined,newData);return isLaziable(func)&&setData(result,newData),result.placeholder=placeholder,setWrapToString(result,func,bitmask)}function createRound(methodName){var func=Math[methodName];return function(number,precision){if(number=toNumber(number),precision=null==precision?0:nativeMin(toInteger(precision),292)){var pair=(toString(number)+"e").split("e"),value=func(pair[0]+"e"+(+pair[1]+precision));return pair=(toString(value)+"e").split("e"),+(pair[0]+"e"+(+pair[1]-precision))}return func(number)}}function createToPairs(keysFunc){return function(object){var tag=getTag(object);return tag==mapTag?mapToArray(object):tag==setTag?setToPairs(object):baseToPairs(object,keysFunc(object))}}function createWrap(func,bitmask,thisArg,partials,holders,argPos,ary,arity){var isBindKey=bitmask&WRAP_BIND_KEY_FLAG;if(!isBindKey&&"function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);var length=partials?partials.length:0;if(length||(bitmask&=~(WRAP_PARTIAL_FLAG|WRAP_PARTIAL_RIGHT_FLAG),partials=holders=undefined),ary=ary===undefined?ary:nativeMax(toInteger(ary),0),arity=arity===undefined?arity:toInteger(arity),length-=holders?holders.length:0,bitmask&WRAP_PARTIAL_RIGHT_FLAG){var partialsRight=partials,holdersRight=holders;partials=holders=undefined}var data=isBindKey?undefined:getData(func),newData=[func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity];if(data&&mergeData(newData,data),func=newData[0],bitmask=newData[1],thisArg=newData[2],partials=newData[3],holders=newData[4],arity=newData[9]=newData[9]===undefined?isBindKey?0:func.length:nativeMax(newData[9]-length,0),!arity&&bitmask&(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG)&&(bitmask&=~(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG)),bitmask&&bitmask!=WRAP_BIND_FLAG)result=bitmask==WRAP_CURRY_FLAG||bitmask==WRAP_CURRY_RIGHT_FLAG?createCurry(func,bitmask,arity):bitmask!=WRAP_PARTIAL_FLAG&&bitmask!=(WRAP_BIND_FLAG|WRAP_PARTIAL_FLAG)||holders.length?createHybrid.apply(undefined,newData):createPartial(func,bitmask,thisArg,partials);else var result=createBind(func,bitmask,thisArg);var setter=data?baseSetData:setData;return setWrapToString(setter(result,newData),func,bitmask)}function customDefaultsAssignIn(objValue,srcValue,key,object){return objValue===undefined||eq(objValue,objectProto[key])&&!hasOwnProperty.call(object,key)?srcValue:objValue}function customDefaultsMerge(objValue,srcValue,key,object,source,stack){return isObject(objValue)&&isObject(srcValue)&&(stack.set(srcValue,objValue),baseMerge(objValue,srcValue,undefined,customDefaultsMerge,stack),stack.delete(srcValue)),objValue}function customOmitClone(value){return isPlainObject(value)?undefined:value}function equalArrays(array,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength))return!1;var stacked=stack.get(array);if(stacked&&stack.get(other))return stacked==other;var index=-1,result=!0,seen=bitmask&COMPARE_UNORDERED_FLAG?new SetCache:undefined;for(stack.set(array,other),stack.set(other,array);++index<arrLength;){var arrValue=array[index],othValue=other[index];if(customizer)var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack);if(compared!==undefined){if(compared)continue;result=!1;break}if(seen){if(!arraySome(other,function(othValue,othIndex){if(!cacheHas(seen,othIndex)&&(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack)))return seen.push(othIndex)})){result=!1;break}}else if(arrValue!==othValue&&!equalFunc(arrValue,othValue,bitmask,customizer,stack)){result=!1;break}}return stack.delete(array),stack.delete(other),result}function equalByTag(object,other,tag,bitmask,customizer,equalFunc,stack){switch(tag){case dataViewTag:if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset)return!1;object=object.buffer,other=other.buffer;case arrayBufferTag:return!(object.byteLength!=other.byteLength||!equalFunc(new Uint8Array(object),new Uint8Array(other)));case boolTag:case dateTag:case numberTag:return eq(+object,+other);case errorTag:return object.name==other.name&&object.message==other.message;case regexpTag:case stringTag:return object==other+"";case mapTag:var convert=mapToArray;case setTag:var isPartial=bitmask&COMPARE_PARTIAL_FLAG;if(convert||(convert=setToArray),object.size!=other.size&&!isPartial)return!1;var stacked=stack.get(object);if(stacked)return stacked==other;bitmask|=COMPARE_UNORDERED_FLAG,stack.set(object,other);var result=equalArrays(convert(object),convert(other),bitmask,customizer,equalFunc,stack);return stack.delete(object),result;case symbolTag:if(symbolValueOf)return symbolValueOf.call(object)==symbolValueOf.call(other);
|
||
}return!1}function equalObjects(object,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG,objProps=getAllKeys(object),objLength=objProps.length,othProps=getAllKeys(other),othLength=othProps.length;if(objLength!=othLength&&!isPartial)return!1;for(var index=objLength;index--;){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty.call(other,key)))return!1}var stacked=stack.get(object);if(stacked&&stack.get(other))return stacked==other;var result=!0;stack.set(object,other),stack.set(other,object);for(var skipCtor=isPartial;++index<objLength;){key=objProps[index];var objValue=object[key],othValue=other[key];if(customizer)var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack);if(!(compared===undefined?objValue===othValue||equalFunc(objValue,othValue,bitmask,customizer,stack):compared)){result=!1;break}skipCtor||(skipCtor="constructor"==key)}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;objCtor!=othCtor&&"constructor"in object&&"constructor"in other&&!("function"==typeof objCtor&&objCtor instanceof objCtor&&"function"==typeof othCtor&&othCtor instanceof othCtor)&&(result=!1)}return stack.delete(object),stack.delete(other),result}function flatRest(func){return setToString(overRest(func,undefined,flatten),func+"")}function getAllKeys(object){return baseGetAllKeys(object,keys,getSymbols)}function getAllKeysIn(object){return baseGetAllKeys(object,keysIn,getSymbolsIn)}function getFuncName(func){for(var result=func.name+"",array=realNames[result],length=hasOwnProperty.call(realNames,result)?array.length:0;length--;){var data=array[length],otherFunc=data.func;if(null==otherFunc||otherFunc==func)return data.name}return result}function getHolder(func){var object=hasOwnProperty.call(lodash,"placeholder")?lodash:func;return object.placeholder}function getIteratee(){var result=lodash.iteratee||iteratee;return result=result===iteratee?baseIteratee:result,arguments.length?result(arguments[0],arguments[1]):result}function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data["string"==typeof key?"string":"hash"]:data.map}function getMatchData(object){for(var result=keys(object),length=result.length;length--;){var key=result[length],value=object[key];result[length]=[key,value,isStrictComparable(value)]}return result}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined}function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=undefined;var unmasked=!0}catch(e){}var result=nativeObjectToString.call(value);return unmasked&&(isOwn?value[symToStringTag]=tag:delete value[symToStringTag]),result}function getView(start,end,transforms){for(var index=-1,length=transforms.length;++index<length;){var data=transforms[index],size=data.size;switch(data.type){case"drop":start+=size;break;case"dropRight":end-=size;break;case"take":end=nativeMin(end,start+size);break;case"takeRight":start=nativeMax(start,end-size)}}return{start:start,end:end}}function getWrapDetails(source){var match=source.match(reWrapDetails);return match?match[1].split(reSplitDetails):[]}function hasPath(object,path,hasFunc){path=castPath(path,object);for(var index=-1,length=path.length,result=!1;++index<length;){var key=toKey(path[index]);if(!(result=null!=object&&hasFunc(object,key)))break;object=object[key]}return result||++index!=length?result:(length=null==object?0:object.length,!!length&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object)))}function initCloneArray(array){var length=array.length,result=array.constructor(length);return length&&"string"==typeof array[0]&&hasOwnProperty.call(array,"index")&&(result.index=array.index,result.input=array.input),result}function initCloneObject(object){return"function"!=typeof object.constructor||isPrototype(object)?{}:baseCreate(getPrototype(object))}function initCloneByTag(object,tag,cloneFunc,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return cloneArrayBuffer(object);case boolTag:case dateTag:return new Ctor(+object);case dataViewTag:return cloneDataView(object,isDeep);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:return cloneTypedArray(object,isDeep);case mapTag:return cloneMap(object,isDeep,cloneFunc);case numberTag:case stringTag:return new Ctor(object);case regexpTag:return cloneRegExp(object);case setTag:return cloneSet(object,isDeep,cloneFunc);case symbolTag:return cloneSymbol(object)}}function insertWrapDetails(source,details){var length=details.length;if(!length)return source;var lastIndex=length-1;return details[lastIndex]=(length>1?"& ":"")+details[lastIndex],details=details.join(length>2?", ":" "),source.replace(reWrapComment,"{\n/* [wrapped with "+details+"] */\n")}function isFlattenable(value){return isArray(value)||isArguments(value)||!!(spreadableSymbol&&value&&value[spreadableSymbol])}function isIndex(value,length){return length=null==length?MAX_SAFE_INTEGER:length,!!length&&("number"==typeof value||reIsUint.test(value))&&value>-1&&value%1==0&&value<length}function isIterateeCall(value,index,object){if(!isObject(object))return!1;var type=typeof index;return!!("number"==type?isArrayLike(object)&&isIndex(index,object.length):"string"==type&&index in object)&&eq(object[index],value)}function isKey(value,object){if(isArray(value))return!1;var type=typeof value;return!("number"!=type&&"symbol"!=type&&"boolean"!=type&&null!=value&&!isSymbol(value))||(reIsPlainProp.test(value)||!reIsDeepProp.test(value)||null!=object&&value in Object(object))}function isKeyable(value){var type=typeof value;return"string"==type||"number"==type||"symbol"==type||"boolean"==type?"__proto__"!==value:null===value}function isLaziable(func){var funcName=getFuncName(func),other=lodash[funcName];if("function"!=typeof other||!(funcName in LazyWrapper.prototype))return!1;if(func===other)return!0;var data=getData(other);return!!data&&func===data[0]}function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}function isPrototype(value){var Ctor=value&&value.constructor,proto="function"==typeof Ctor&&Ctor.prototype||objectProto;return value===proto}function isStrictComparable(value){return value===value&&!isObject(value)}function matchesStrictComparable(key,srcValue){return function(object){return null!=object&&(object[key]===srcValue&&(srcValue!==undefined||key in Object(object)))}}function memoizeCapped(func){var result=memoize(func,function(key){return cache.size===MAX_MEMOIZE_SIZE&&cache.clear(),key}),cache=result.cache;return result}function mergeData(data,source){var bitmask=data[1],srcBitmask=source[1],newBitmask=bitmask|srcBitmask,isCommon=newBitmask<(WRAP_BIND_FLAG|WRAP_BIND_KEY_FLAG|WRAP_ARY_FLAG),isCombo=srcBitmask==WRAP_ARY_FLAG&&bitmask==WRAP_CURRY_FLAG||srcBitmask==WRAP_ARY_FLAG&&bitmask==WRAP_REARG_FLAG&&data[7].length<=source[8]||srcBitmask==(WRAP_ARY_FLAG|WRAP_REARG_FLAG)&&source[7].length<=source[8]&&bitmask==WRAP_CURRY_FLAG;if(!isCommon&&!isCombo)return data;srcBitmask&WRAP_BIND_FLAG&&(data[2]=source[2],newBitmask|=bitmask&WRAP_BIND_FLAG?0:WRAP_CURRY_BOUND_FLAG);var value=source[3];if(value){var partials=data[3];data[3]=partials?composeArgs(partials,value,source[4]):value,data[4]=partials?replaceHolders(data[3],PLACEHOLDER):source[4]}return value=source[5],value&&(partials=data[5],data[5]=partials?composeArgsRight(partials,value,source[6]):value,data[6]=partials?replaceHolders(data[5],PLACEHOLDER):source[6]),value=source[7],value&&(data[7]=value),srcBitmask&WRAP_ARY_FLAG&&(data[8]=null==data[8]?source[8]:nativeMin(data[8],source[8])),null==data[9]&&(data[9]=source[9]),data[0]=source[0],data[1]=newBitmask,data}function nativeKeysIn(object){var result=[];if(null!=object)for(var key in Object(object))result.push(key);return result}function objectToString(value){return nativeObjectToString.call(value)}function overRest(func,start,transform){return start=nativeMax(start===undefined?func.length-1:start,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start,0),array=Array(length);++index<length;)array[index]=args[start+index];index=-1;for(var otherArgs=Array(start+1);++index<start;)otherArgs[index]=args[index];return otherArgs[start]=transform(array),apply(func,this,otherArgs)}}function parent(object,path){return path.length<2?object:baseGet(object,baseSlice(path,0,-1))}function reorder(array,indexes){for(var arrLength=array.length,length=nativeMin(indexes.length,arrLength),oldArray=copyArray(array);length--;){var index=indexes[length];array[length]=isIndex(index,arrLength)?oldArray[index]:undefined}return array}function setWrapToString(wrapper,reference,bitmask){var source=reference+"";return setToString(wrapper,insertWrapDetails(source,updateWrapDetails(getWrapDetails(source),bitmask)))}function shortOut(func){var count=0,lastCalled=0;return function(){var stamp=nativeNow(),remaining=HOT_SPAN-(stamp-lastCalled);if(lastCalled=stamp,remaining>0){if(++count>=HOT_COUNT)return arguments[0]}else count=0;return func.apply(undefined,arguments)}}function shuffleSelf(array,size){var index=-1,length=array.length,lastIndex=length-1;for(size=size===undefined?length:size;++index<size;){var rand=baseRandom(index,lastIndex),value=array[rand];array[rand]=array[index],array[index]=value}return array.length=size,array}function toKey(value){if("string"==typeof value||isSymbol(value))return value;var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function toSource(func){if(null!=func){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function updateWrapDetails(details,bitmask){return arrayEach(wrapFlags,function(pair){var value="_."+pair[0];bitmask&pair[1]&&!arrayIncludes(details,value)&&details.push(value)}),details.sort()}function wrapperClone(wrapper){if(wrapper instanceof LazyWrapper)return wrapper.clone();var result=new LodashWrapper(wrapper.__wrapped__,wrapper.__chain__);return result.__actions__=copyArray(wrapper.__actions__),result.__index__=wrapper.__index__,result.__values__=wrapper.__values__,result}function chunk(array,size,guard){size=(guard?isIterateeCall(array,size,guard):size===undefined)?1:nativeMax(toInteger(size),0);var length=null==array?0:array.length;if(!length||size<1)return[];for(var index=0,resIndex=0,result=Array(nativeCeil(length/size));index<length;)result[resIndex++]=baseSlice(array,index,index+=size);return result}function compact(array){for(var index=-1,length=null==array?0:array.length,resIndex=0,result=[];++index<length;){var value=array[index];value&&(result[resIndex++]=value)}return result}function concat(){var length=arguments.length;if(!length)return[];for(var args=Array(length-1),array=arguments[0],index=length;index--;)args[index-1]=arguments[index];return arrayPush(isArray(array)?copyArray(array):[array],baseFlatten(args,1))}function drop(array,n,guard){var length=null==array?0:array.length;return length?(n=guard||n===undefined?1:toInteger(n),baseSlice(array,n<0?0:n,length)):[]}function dropRight(array,n,guard){var length=null==array?0:array.length;return length?(n=guard||n===undefined?1:toInteger(n),n=length-n,baseSlice(array,0,n<0?0:n)):[]}function dropRightWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),!0,!0):[]}function dropWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),!0):[]}function fill(array,value,start,end){var length=null==array?0:array.length;return length?(start&&"number"!=typeof start&&isIterateeCall(array,value,start)&&(start=0,end=length),baseFill(array,value,start,end)):[]}function findIndex(array,predicate,fromIndex){var length=null==array?0:array.length;if(!length)return-1;var index=null==fromIndex?0:toInteger(fromIndex);return index<0&&(index=nativeMax(length+index,0)),baseFindIndex(array,getIteratee(predicate,3),index)}function findLastIndex(array,predicate,fromIndex){var length=null==array?0:array.length;if(!length)return-1;var index=length-1;return fromIndex!==undefined&&(index=toInteger(fromIndex),index=fromIndex<0?nativeMax(length+index,0):nativeMin(index,length-1)),baseFindIndex(array,getIteratee(predicate,3),index,!0)}function flatten(array){var length=null==array?0:array.length;return length?baseFlatten(array,1):[]}function flattenDeep(array){var length=null==array?0:array.length;return length?baseFlatten(array,INFINITY):[]}function flattenDepth(array,depth){var length=null==array?0:array.length;return length?(depth=depth===undefined?1:toInteger(depth),baseFlatten(array,depth)):[]}function fromPairs(pairs){for(var index=-1,length=null==pairs?0:pairs.length,result={};++index<length;){var pair=pairs[index];result[pair[0]]=pair[1]}return result}function head(array){return array&&array.length?array[0]:undefined}function indexOf(array,value,fromIndex){var length=null==array?0:array.length;if(!length)return-1;var index=null==fromIndex?0:toInteger(fromIndex);return index<0&&(index=nativeMax(length+index,0)),baseIndexOf(array,value,index)}function initial(array){var length=null==array?0:array.length;return length?baseSlice(array,0,-1):[]}function join(array,separator){return null==array?"":nativeJoin.call(array,separator)}function last(array){var length=null==array?0:array.length;return length?array[length-1]:undefined}function lastIndexOf(array,value,fromIndex){var length=null==array?0:array.length;if(!length)return-1;var index=length;return fromIndex!==undefined&&(index=toInteger(fromIndex),index=index<0?nativeMax(length+index,0):nativeMin(index,length-1)),value===value?strictLastIndexOf(array,value,index):baseFindIndex(array,baseIsNaN,index,!0)}function nth(array,n){return array&&array.length?baseNth(array,toInteger(n)):undefined}function pullAll(array,values){return array&&array.length&&values&&values.length?basePullAll(array,values):array}function pullAllBy(array,values,iteratee){return array&&array.length&&values&&values.length?basePullAll(array,values,getIteratee(iteratee,2)):array}function pullAllWith(array,values,comparator){return array&&array.length&&values&&values.length?basePullAll(array,values,undefined,comparator):array}function remove(array,predicate){var result=[];if(!array||!array.length)return result;var index=-1,indexes=[],length=array.length;for(predicate=getIteratee(predicate,3);++index<length;){var value=array[index];predicate(value,index,array)&&(result.push(value),indexes.push(index))}return basePullAt(array,indexes),result}function reverse(array){return null==array?array:nativeReverse.call(array)}function slice(array,start,end){var length=null==array?0:array.length;return length?(end&&"number"!=typeof end&&isIterateeCall(array,start,end)?(start=0,end=length):(start=null==start?0:toInteger(start),end=end===undefined?length:toInteger(end)),baseSlice(array,start,end)):[]}function sortedIndex(array,value){return baseSortedIndex(array,value)}function sortedIndexBy(array,value,iteratee){return baseSortedIndexBy(array,value,getIteratee(iteratee,2))}function sortedIndexOf(array,value){var length=null==array?0:array.length;if(length){var index=baseSortedIndex(array,value);if(index<length&&eq(array[index],value))return index}return-1}function sortedLastIndex(array,value){return baseSortedIndex(array,value,!0)}function sortedLastIndexBy(array,value,iteratee){return baseSortedIndexBy(array,value,getIteratee(iteratee,2),!0)}function sortedLastIndexOf(array,value){var length=null==array?0:array.length;if(length){var index=baseSortedIndex(array,value,!0)-1;if(eq(array[index],value))return index}return-1}function sortedUniq(array){return array&&array.length?baseSortedUniq(array):[]}function sortedUniqBy(array,iteratee){return array&&array.length?baseSortedUniq(array,getIteratee(iteratee,2)):[]}function tail(array){var length=null==array?0:array.length;return length?baseSlice(array,1,length):[]}function take(array,n,guard){return array&&array.length?(n=guard||n===undefined?1:toInteger(n),baseSlice(array,0,n<0?0:n)):[]}function takeRight(array,n,guard){var length=null==array?0:array.length;return length?(n=guard||n===undefined?1:toInteger(n),n=length-n,baseSlice(array,n<0?0:n,length)):[]}function takeRightWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),!1,!0):[]}function takeWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3)):[]}function uniq(array){return array&&array.length?baseUniq(array):[]}function uniqBy(array,iteratee){return array&&array.length?baseUniq(array,getIteratee(iteratee,2)):[]}function uniqWith(array,comparator){return comparator="function"==typeof comparator?comparator:undefined,array&&array.length?baseUniq(array,undefined,comparator):[]}function unzip(array){if(!array||!array.length)return[];var length=0;return array=arrayFilter(array,function(group){if(isArrayLikeObject(group))return length=nativeMax(group.length,length),!0}),baseTimes(length,function(index){return arrayMap(array,baseProperty(index))})}function unzipWith(array,iteratee){if(!array||!array.length)return[];var result=unzip(array);return null==iteratee?result:arrayMap(result,function(group){return apply(iteratee,undefined,group)})}function zipObject(props,values){return baseZipObject(props||[],values||[],assignValue)}function zipObjectDeep(props,values){return baseZipObject(props||[],values||[],baseSet)}function chain(value){var result=lodash(value);return result.__chain__=!0,result}function tap(value,interceptor){return interceptor(value),value}function thru(value,interceptor){return interceptor(value)}function wrapperChain(){return chain(this)}function wrapperCommit(){return new LodashWrapper(this.value(),this.__chain__)}function wrapperNext(){this.__values__===undefined&&(this.__values__=toArray(this.value()));var done=this.__index__>=this.__values__.length,value=done?undefined:this.__values__[this.__index__++];return{done:done,value:value}}function wrapperToIterator(){return this}function wrapperPlant(value){for(var result,parent=this;parent instanceof baseLodash;){var clone=wrapperClone(parent);clone.__index__=0,clone.__values__=undefined,result?previous.__wrapped__=clone:result=clone;var previous=clone;parent=parent.__wrapped__}return previous.__wrapped__=value,result}function wrapperReverse(){var value=this.__wrapped__;if(value instanceof LazyWrapper){var wrapped=value;return this.__actions__.length&&(wrapped=new LazyWrapper(this)),wrapped=wrapped.reverse(),wrapped.__actions__.push({func:thru,args:[reverse],thisArg:undefined}),new LodashWrapper(wrapped,this.__chain__)}return this.thru(reverse)}function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__)}function every(collection,predicate,guard){var func=isArray(collection)?arrayEvery:baseEvery;return guard&&isIterateeCall(collection,predicate,guard)&&(predicate=undefined),func(collection,getIteratee(predicate,3))}function filter(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,getIteratee(predicate,3))}function flatMap(collection,iteratee){return baseFlatten(map(collection,iteratee),1)}function flatMapDeep(collection,iteratee){return baseFlatten(map(collection,iteratee),INFINITY)}function flatMapDepth(collection,iteratee,depth){return depth=depth===undefined?1:toInteger(depth),baseFlatten(map(collection,iteratee),depth)}function forEach(collection,iteratee){var func=isArray(collection)?arrayEach:baseEach;return func(collection,getIteratee(iteratee,3))}function forEachRight(collection,iteratee){var func=isArray(collection)?arrayEachRight:baseEachRight;return func(collection,getIteratee(iteratee,3))}function includes(collection,value,fromIndex,guard){collection=isArrayLike(collection)?collection:values(collection),fromIndex=fromIndex&&!guard?toInteger(fromIndex):0;var length=collection.length;return fromIndex<0&&(fromIndex=nativeMax(length+fromIndex,0)),isString(collection)?fromIndex<=length&&collection.indexOf(value,fromIndex)>-1:!!length&&baseIndexOf(collection,value,fromIndex)>-1}function map(collection,iteratee){var func=isArray(collection)?arrayMap:baseMap;return func(collection,getIteratee(iteratee,3))}function orderBy(collection,iteratees,orders,guard){return null==collection?[]:(isArray(iteratees)||(iteratees=null==iteratees?[]:[iteratees]),orders=guard?undefined:orders,isArray(orders)||(orders=null==orders?[]:[orders]),baseOrderBy(collection,iteratees,orders))}function reduce(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduce:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEach)}function reduceRight(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduceRight:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEachRight)}function reject(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,negate(getIteratee(predicate,3)))}function sample(collection){var func=isArray(collection)?arraySample:baseSample;return func(collection)}function sampleSize(collection,n,guard){n=(guard?isIterateeCall(collection,n,guard):n===undefined)?1:toInteger(n);var func=isArray(collection)?arraySampleSize:baseSampleSize;return func(collection,n)}function shuffle(collection){var func=isArray(collection)?arrayShuffle:baseShuffle;return func(collection)}function size(collection){if(null==collection)return 0;if(isArrayLike(collection))return isString(collection)?stringSize(collection):collection.length;var tag=getTag(collection);return tag==mapTag||tag==setTag?collection.size:baseKeys(collection).length}function some(collection,predicate,guard){var func=isArray(collection)?arraySome:baseSome;return guard&&isIterateeCall(collection,predicate,guard)&&(predicate=undefined),func(collection,getIteratee(predicate,3))}function after(n,func){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return n=toInteger(n),function(){if(--n<1)return func.apply(this,arguments)}}function ary(func,n,guard){return n=guard?undefined:n,n=func&&null==n?func.length:n,createWrap(func,WRAP_ARY_FLAG,undefined,undefined,undefined,undefined,n)}function before(n,func){var result;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return n=toInteger(n),function(){return--n>0&&(result=func.apply(this,arguments)),n<=1&&(func=undefined),result}}function curry(func,arity,guard){arity=guard?undefined:arity;var result=createWrap(func,WRAP_CURRY_FLAG,undefined,undefined,undefined,undefined,undefined,arity);return result.placeholder=curry.placeholder,result}function curryRight(func,arity,guard){arity=guard?undefined:arity;var result=createWrap(func,WRAP_CURRY_RIGHT_FLAG,undefined,undefined,undefined,undefined,undefined,arity);return result.placeholder=curryRight.placeholder,result}function debounce(func,wait,options){function invokeFunc(time){var args=lastArgs,thisArg=lastThis;return lastArgs=lastThis=undefined,lastInvokeTime=time,result=func.apply(thisArg,args)}function leadingEdge(time){return lastInvokeTime=time,timerId=setTimeout(timerExpired,wait),leading?invokeFunc(time):result}function remainingWait(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime,result=wait-timeSinceLastCall;return maxing?nativeMin(result,maxWait-timeSinceLastInvoke):result}function shouldInvoke(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime;return lastCallTime===undefined||timeSinceLastCall>=wait||timeSinceLastCall<0||maxing&&timeSinceLastInvoke>=maxWait}function timerExpired(){var time=now();return shouldInvoke(time)?trailingEdge(time):void(timerId=setTimeout(timerExpired,remainingWait(time)))}function trailingEdge(time){return timerId=undefined,trailing&&lastArgs?invokeFunc(time):(lastArgs=lastThis=undefined,result)}function cancel(){timerId!==undefined&&clearTimeout(timerId),lastInvokeTime=0,lastArgs=lastCallTime=lastThis=timerId=undefined}function flush(){return timerId===undefined?result:trailingEdge(now())}function debounced(){var time=now(),isInvoking=shouldInvoke(time);if(lastArgs=arguments,lastThis=this,lastCallTime=time,isInvoking){if(timerId===undefined)return leadingEdge(lastCallTime);if(maxing)return timerId=setTimeout(timerExpired,wait),invokeFunc(lastCallTime)}return timerId===undefined&&(timerId=setTimeout(timerExpired,wait)),result}var lastArgs,lastThis,maxWait,result,timerId,lastCallTime,lastInvokeTime=0,leading=!1,maxing=!1,trailing=!0;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return wait=toNumber(wait)||0,isObject(options)&&(leading=!!options.leading,maxing="maxWait"in options,maxWait=maxing?nativeMax(toNumber(options.maxWait)||0,wait):maxWait,trailing="trailing"in options?!!options.trailing:trailing),debounced.cancel=cancel,debounced.flush=flush,debounced}function flip(func){return createWrap(func,WRAP_FLIP_FLAG)}function memoize(func,resolver){if("function"!=typeof func||null!=resolver&&"function"!=typeof resolver)throw new TypeError(FUNC_ERROR_TEXT);var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key))return cache.get(key);var result=func.apply(this,args);return memoized.cache=cache.set(key,result)||cache,result};return memoized.cache=new(memoize.Cache||MapCache),memoized}function negate(predicate){if("function"!=typeof predicate)throw new TypeError(FUNC_ERROR_TEXT);return function(){var args=arguments;switch(args.length){case 0:return!predicate.call(this);case 1:return!predicate.call(this,args[0]);case 2:return!predicate.call(this,args[0],args[1]);case 3:return!predicate.call(this,args[0],args[1],args[2])}return!predicate.apply(this,args)}}function once(func){return before(2,func)}function rest(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=start===undefined?start:toInteger(start),baseRest(func,start)}function spread(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=null==start?0:nativeMax(toInteger(start),0),baseRest(function(args){var array=args[start],otherArgs=castSlice(args,0,start);return array&&arrayPush(otherArgs,array),apply(func,this,otherArgs)})}function throttle(func,wait,options){var leading=!0,trailing=!0;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return isObject(options)&&(leading="leading"in options?!!options.leading:leading,trailing="trailing"in options?!!options.trailing:trailing),debounce(func,wait,{leading:leading,maxWait:wait,trailing:trailing})}function unary(func){return ary(func,1)}function wrap(value,wrapper){return partial(castFunction(wrapper),value)}function castArray(){if(!arguments.length)return[];var value=arguments[0];return isArray(value)?value:[value]}function clone(value){return baseClone(value,CLONE_SYMBOLS_FLAG)}function cloneWith(value,customizer){return customizer="function"==typeof customizer?customizer:undefined,baseClone(value,CLONE_SYMBOLS_FLAG,customizer)}function cloneDeep(value){return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG)}function cloneDeepWith(value,customizer){return customizer="function"==typeof customizer?customizer:undefined,baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG,customizer)}function conformsTo(object,source){return null==source||baseConformsTo(object,source,keys(source))}function eq(value,other){return value===other||value!==value&&other!==other}function isArrayLike(value){return null!=value&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}function isBoolean(value){return value===!0||value===!1||isObjectLike(value)&&baseGetTag(value)==boolTag}function isElement(value){return isObjectLike(value)&&1===value.nodeType&&!isPlainObject(value)}function isEmpty(value){if(null==value)return!0;if(isArrayLike(value)&&(isArray(value)||"string"==typeof value||"function"==typeof value.splice||isBuffer(value)||isTypedArray(value)||isArguments(value)))return!value.length;var tag=getTag(value);if(tag==mapTag||tag==setTag)return!value.size;if(isPrototype(value))return!baseKeys(value).length;for(var key in value)if(hasOwnProperty.call(value,key))return!1;return!0}function isEqual(value,other){return baseIsEqual(value,other)}function isEqualWith(value,other,customizer){customizer="function"==typeof customizer?customizer:undefined;var result=customizer?customizer(value,other):undefined;return result===undefined?baseIsEqual(value,other,undefined,customizer):!!result}function isError(value){if(!isObjectLike(value))return!1;var tag=baseGetTag(value);return tag==errorTag||tag==domExcTag||"string"==typeof value.message&&"string"==typeof value.name&&!isPlainObject(value)}function isFinite(value){return"number"==typeof value&&nativeIsFinite(value)}function isFunction(value){if(!isObject(value))return!1;var tag=baseGetTag(value);return tag==funcTag||tag==genTag||tag==asyncTag||tag==proxyTag}function isInteger(value){return"number"==typeof value&&value==toInteger(value)}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return null!=value&&("object"==type||"function"==type)}function isObjectLike(value){return null!=value&&"object"==typeof value}function isMatch(object,source){return object===source||baseIsMatch(object,source,getMatchData(source))}function isMatchWith(object,source,customizer){return customizer="function"==typeof customizer?customizer:undefined,baseIsMatch(object,source,getMatchData(source),customizer)}function isNaN(value){return isNumber(value)&&value!=+value}function isNative(value){if(isMaskable(value))throw new Error(CORE_ERROR_TEXT);return baseIsNative(value)}function isNull(value){return null===value}function isNil(value){return null==value}function isNumber(value){return"number"==typeof value||isObjectLike(value)&&baseGetTag(value)==numberTag}function isPlainObject(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag)return!1;var proto=getPrototype(value);if(null===proto)return!0;var Ctor=hasOwnProperty.call(proto,"constructor")&&proto.constructor;return"function"==typeof Ctor&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString}function isSafeInteger(value){return isInteger(value)&&value>=-MAX_SAFE_INTEGER&&value<=MAX_SAFE_INTEGER}function isString(value){return"string"==typeof value||!isArray(value)&&isObjectLike(value)&&baseGetTag(value)==stringTag}function isSymbol(value){return"symbol"==typeof value||isObjectLike(value)&&baseGetTag(value)==symbolTag}function isUndefined(value){return value===undefined}function isWeakMap(value){return isObjectLike(value)&&getTag(value)==weakMapTag}function isWeakSet(value){return isObjectLike(value)&&baseGetTag(value)==weakSetTag}function toArray(value){if(!value)return[];if(isArrayLike(value))return isString(value)?stringToArray(value):copyArray(value);if(symIterator&&value[symIterator])return iteratorToArray(value[symIterator]());var tag=getTag(value),func=tag==mapTag?mapToArray:tag==setTag?setToArray:values;return func(value)}function toFinite(value){if(!value)return 0===value?value:0;if(value=toNumber(value),value===INFINITY||value===-INFINITY){var sign=value<0?-1:1;return sign*MAX_INTEGER}return value===value?value:0}function toInteger(value){var result=toFinite(value),remainder=result%1;return result===result?remainder?result-remainder:result:0}function toLength(value){return value?baseClamp(toInteger(value),0,MAX_ARRAY_LENGTH):0}function toNumber(value){if("number"==typeof value)return value;if(isSymbol(value))return NAN;if(isObject(value)){var other="function"==typeof value.valueOf?value.valueOf():value;value=isObject(other)?other+"":other}if("string"!=typeof value)return 0===value?value:+value;value=value.replace(reTrim,"");var isBinary=reIsBinary.test(value);
|
||
return isBinary||reIsOctal.test(value)?freeParseInt(value.slice(2),isBinary?2:8):reIsBadHex.test(value)?NAN:+value}function toPlainObject(value){return copyObject(value,keysIn(value))}function toSafeInteger(value){return value?baseClamp(toInteger(value),-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER):0===value?value:0}function toString(value){return null==value?"":baseToString(value)}function create(prototype,properties){var result=baseCreate(prototype);return null==properties?result:baseAssign(result,properties)}function findKey(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwn)}function findLastKey(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwnRight)}function forIn(object,iteratee){return null==object?object:baseFor(object,getIteratee(iteratee,3),keysIn)}function forInRight(object,iteratee){return null==object?object:baseForRight(object,getIteratee(iteratee,3),keysIn)}function forOwn(object,iteratee){return object&&baseForOwn(object,getIteratee(iteratee,3))}function forOwnRight(object,iteratee){return object&&baseForOwnRight(object,getIteratee(iteratee,3))}function functions(object){return null==object?[]:baseFunctions(object,keys(object))}function functionsIn(object){return null==object?[]:baseFunctions(object,keysIn(object))}function get(object,path,defaultValue){var result=null==object?undefined:baseGet(object,path);return result===undefined?defaultValue:result}function has(object,path){return null!=object&&hasPath(object,path,baseHas)}function hasIn(object,path){return null!=object&&hasPath(object,path,baseHasIn)}function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}function keysIn(object){return isArrayLike(object)?arrayLikeKeys(object,!0):baseKeysIn(object)}function mapKeys(object,iteratee){var result={};return iteratee=getIteratee(iteratee,3),baseForOwn(object,function(value,key,object){baseAssignValue(result,iteratee(value,key,object),value)}),result}function mapValues(object,iteratee){var result={};return iteratee=getIteratee(iteratee,3),baseForOwn(object,function(value,key,object){baseAssignValue(result,key,iteratee(value,key,object))}),result}function omitBy(object,predicate){return pickBy(object,negate(getIteratee(predicate)))}function pickBy(object,predicate){if(null==object)return{};var props=arrayMap(getAllKeysIn(object),function(prop){return[prop]});return predicate=getIteratee(predicate),basePickBy(object,props,function(value,path){return predicate(value,path[0])})}function result(object,path,defaultValue){path=castPath(path,object);var index=-1,length=path.length;for(length||(length=1,object=undefined);++index<length;){var value=null==object?undefined:object[toKey(path[index])];value===undefined&&(index=length,value=defaultValue),object=isFunction(value)?value.call(object):value}return object}function set(object,path,value){return null==object?object:baseSet(object,path,value)}function setWith(object,path,value,customizer){return customizer="function"==typeof customizer?customizer:undefined,null==object?object:baseSet(object,path,value,customizer)}function transform(object,iteratee,accumulator){var isArr=isArray(object),isArrLike=isArr||isBuffer(object)||isTypedArray(object);if(iteratee=getIteratee(iteratee,4),null==accumulator){var Ctor=object&&object.constructor;accumulator=isArrLike?isArr?new Ctor:[]:isObject(object)&&isFunction(Ctor)?baseCreate(getPrototype(object)):{}}return(isArrLike?arrayEach:baseForOwn)(object,function(value,index,object){return iteratee(accumulator,value,index,object)}),accumulator}function unset(object,path){return null==object||baseUnset(object,path)}function update(object,path,updater){return null==object?object:baseUpdate(object,path,castFunction(updater))}function updateWith(object,path,updater,customizer){return customizer="function"==typeof customizer?customizer:undefined,null==object?object:baseUpdate(object,path,castFunction(updater),customizer)}function values(object){return null==object?[]:baseValues(object,keys(object))}function valuesIn(object){return null==object?[]:baseValues(object,keysIn(object))}function clamp(number,lower,upper){return upper===undefined&&(upper=lower,lower=undefined),upper!==undefined&&(upper=toNumber(upper),upper=upper===upper?upper:0),lower!==undefined&&(lower=toNumber(lower),lower=lower===lower?lower:0),baseClamp(toNumber(number),lower,upper)}function inRange(number,start,end){return start=toFinite(start),end===undefined?(end=start,start=0):end=toFinite(end),number=toNumber(number),baseInRange(number,start,end)}function random(lower,upper,floating){if(floating&&"boolean"!=typeof floating&&isIterateeCall(lower,upper,floating)&&(upper=floating=undefined),floating===undefined&&("boolean"==typeof upper?(floating=upper,upper=undefined):"boolean"==typeof lower&&(floating=lower,lower=undefined)),lower===undefined&&upper===undefined?(lower=0,upper=1):(lower=toFinite(lower),upper===undefined?(upper=lower,lower=0):upper=toFinite(upper)),lower>upper){var temp=lower;lower=upper,upper=temp}if(floating||lower%1||upper%1){var rand=nativeRandom();return nativeMin(lower+rand*(upper-lower+freeParseFloat("1e-"+((rand+"").length-1))),upper)}return baseRandom(lower,upper)}function capitalize(string){return upperFirst(toString(string).toLowerCase())}function deburr(string){return string=toString(string),string&&string.replace(reLatin,deburrLetter).replace(reComboMark,"")}function endsWith(string,target,position){string=toString(string),target=baseToString(target);var length=string.length;position=position===undefined?length:baseClamp(toInteger(position),0,length);var end=position;return position-=target.length,position>=0&&string.slice(position,end)==target}function escape(string){return string=toString(string),string&&reHasUnescapedHtml.test(string)?string.replace(reUnescapedHtml,escapeHtmlChar):string}function escapeRegExp(string){return string=toString(string),string&&reHasRegExpChar.test(string)?string.replace(reRegExpChar,"\\$&"):string}function pad(string,length,chars){string=toString(string),length=toInteger(length);var strLength=length?stringSize(string):0;if(!length||strLength>=length)return string;var mid=(length-strLength)/2;return createPadding(nativeFloor(mid),chars)+string+createPadding(nativeCeil(mid),chars)}function padEnd(string,length,chars){string=toString(string),length=toInteger(length);var strLength=length?stringSize(string):0;return length&&strLength<length?string+createPadding(length-strLength,chars):string}function padStart(string,length,chars){string=toString(string),length=toInteger(length);var strLength=length?stringSize(string):0;return length&&strLength<length?createPadding(length-strLength,chars)+string:string}function parseInt(string,radix,guard){return guard||null==radix?radix=0:radix&&(radix=+radix),nativeParseInt(toString(string).replace(reTrimStart,""),radix||0)}function repeat(string,n,guard){return n=(guard?isIterateeCall(string,n,guard):n===undefined)?1:toInteger(n),baseRepeat(toString(string),n)}function replace(){var args=arguments,string=toString(args[0]);return args.length<3?string:string.replace(args[1],args[2])}function split(string,separator,limit){return limit&&"number"!=typeof limit&&isIterateeCall(string,separator,limit)&&(separator=limit=undefined),(limit=limit===undefined?MAX_ARRAY_LENGTH:limit>>>0)?(string=toString(string),string&&("string"==typeof separator||null!=separator&&!isRegExp(separator))&&(separator=baseToString(separator),!separator&&hasUnicode(string))?castSlice(stringToArray(string),0,limit):string.split(separator,limit)):[]}function startsWith(string,target,position){return string=toString(string),position=null==position?0:baseClamp(toInteger(position),0,string.length),target=baseToString(target),string.slice(position,position+target.length)==target}function template(string,options,guard){var settings=lodash.templateSettings;guard&&isIterateeCall(string,options,guard)&&(options=undefined),string=toString(string),options=assignInWith({},options,settings,customDefaultsAssignIn);var isEscaping,isEvaluating,imports=assignInWith({},options.imports,settings.imports,customDefaultsAssignIn),importsKeys=keys(imports),importsValues=baseValues(imports,importsKeys),index=0,interpolate=options.interpolate||reNoMatch,source="__p += '",reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g"),sourceURL="//# sourceURL="+("sourceURL"in options?options.sourceURL:"lodash.templateSources["+ ++templateCounter+"]")+"\n";string.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){return interpolateValue||(interpolateValue=esTemplateValue),source+=string.slice(index,offset).replace(reUnescapedString,escapeStringChar),escapeValue&&(isEscaping=!0,source+="' +\n__e("+escapeValue+") +\n'"),evaluateValue&&(isEvaluating=!0,source+="';\n"+evaluateValue+";\n__p += '"),interpolateValue&&(source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"),index=offset+match.length,match}),source+="';\n";var variable=options.variable;variable||(source="with (obj) {\n"+source+"\n}\n"),source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;"),source="function("+(variable||"obj")+") {\n"+(variable?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(isEscaping?", __e = _.escape":"")+(isEvaluating?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";var result=attempt(function(){return Function(importsKeys,sourceURL+"return "+source).apply(undefined,importsValues)});if(result.source=source,isError(result))throw result;return result}function toLower(value){return toString(value).toLowerCase()}function toUpper(value){return toString(value).toUpperCase()}function trim(string,chars,guard){if(string=toString(string),string&&(guard||chars===undefined))return string.replace(reTrim,"");if(!string||!(chars=baseToString(chars)))return string;var strSymbols=stringToArray(string),chrSymbols=stringToArray(chars),start=charsStartIndex(strSymbols,chrSymbols),end=charsEndIndex(strSymbols,chrSymbols)+1;return castSlice(strSymbols,start,end).join("")}function trimEnd(string,chars,guard){if(string=toString(string),string&&(guard||chars===undefined))return string.replace(reTrimEnd,"");if(!string||!(chars=baseToString(chars)))return string;var strSymbols=stringToArray(string),end=charsEndIndex(strSymbols,stringToArray(chars))+1;return castSlice(strSymbols,0,end).join("")}function trimStart(string,chars,guard){if(string=toString(string),string&&(guard||chars===undefined))return string.replace(reTrimStart,"");if(!string||!(chars=baseToString(chars)))return string;var strSymbols=stringToArray(string),start=charsStartIndex(strSymbols,stringToArray(chars));return castSlice(strSymbols,start).join("")}function truncate(string,options){var length=DEFAULT_TRUNC_LENGTH,omission=DEFAULT_TRUNC_OMISSION;if(isObject(options)){var separator="separator"in options?options.separator:separator;length="length"in options?toInteger(options.length):length,omission="omission"in options?baseToString(options.omission):omission}string=toString(string);var strLength=string.length;if(hasUnicode(string)){var strSymbols=stringToArray(string);strLength=strSymbols.length}if(length>=strLength)return string;var end=length-stringSize(omission);if(end<1)return omission;var result=strSymbols?castSlice(strSymbols,0,end).join(""):string.slice(0,end);if(separator===undefined)return result+omission;if(strSymbols&&(end+=result.length-end),isRegExp(separator)){if(string.slice(end).search(separator)){var match,substring=result;for(separator.global||(separator=RegExp(separator.source,toString(reFlags.exec(separator))+"g")),separator.lastIndex=0;match=separator.exec(substring);)var newEnd=match.index;result=result.slice(0,newEnd===undefined?end:newEnd)}}else if(string.indexOf(baseToString(separator),end)!=end){var index=result.lastIndexOf(separator);index>-1&&(result=result.slice(0,index))}return result+omission}function unescape(string){return string=toString(string),string&&reHasEscapedHtml.test(string)?string.replace(reEscapedHtml,unescapeHtmlChar):string}function words(string,pattern,guard){return string=toString(string),pattern=guard?undefined:pattern,pattern===undefined?hasUnicodeWord(string)?unicodeWords(string):asciiWords(string):string.match(pattern)||[]}function cond(pairs){var length=null==pairs?0:pairs.length,toIteratee=getIteratee();return pairs=length?arrayMap(pairs,function(pair){if("function"!=typeof pair[1])throw new TypeError(FUNC_ERROR_TEXT);return[toIteratee(pair[0]),pair[1]]}):[],baseRest(function(args){for(var index=-1;++index<length;){var pair=pairs[index];if(apply(pair[0],this,args))return apply(pair[1],this,args)}})}function conforms(source){return baseConforms(baseClone(source,CLONE_DEEP_FLAG))}function constant(value){return function(){return value}}function defaultTo(value,defaultValue){return null==value||value!==value?defaultValue:value}function identity(value){return value}function iteratee(func){return baseIteratee("function"==typeof func?func:baseClone(func,CLONE_DEEP_FLAG))}function matches(source){return baseMatches(baseClone(source,CLONE_DEEP_FLAG))}function matchesProperty(path,srcValue){return baseMatchesProperty(path,baseClone(srcValue,CLONE_DEEP_FLAG))}function mixin(object,source,options){var props=keys(source),methodNames=baseFunctions(source,props);null!=options||isObject(source)&&(methodNames.length||!props.length)||(options=source,source=object,object=this,methodNames=baseFunctions(source,keys(source)));var chain=!(isObject(options)&&"chain"in options&&!options.chain),isFunc=isFunction(object);return arrayEach(methodNames,function(methodName){var func=source[methodName];object[methodName]=func,isFunc&&(object.prototype[methodName]=function(){var chainAll=this.__chain__;if(chain||chainAll){var result=object(this.__wrapped__),actions=result.__actions__=copyArray(this.__actions__);return actions.push({func:func,args:arguments,thisArg:object}),result.__chain__=chainAll,result}return func.apply(object,arrayPush([this.value()],arguments))})}),object}function noConflict(){return root._===this&&(root._=oldDash),this}function noop(){}function nthArg(n){return n=toInteger(n),baseRest(function(args){return baseNth(args,n)})}function property(path){return isKey(path)?baseProperty(toKey(path)):basePropertyDeep(path)}function propertyOf(object){return function(path){return null==object?undefined:baseGet(object,path)}}function stubArray(){return[]}function stubFalse(){return!1}function stubObject(){return{}}function stubString(){return""}function stubTrue(){return!0}function times(n,iteratee){if(n=toInteger(n),n<1||n>MAX_SAFE_INTEGER)return[];var index=MAX_ARRAY_LENGTH,length=nativeMin(n,MAX_ARRAY_LENGTH);iteratee=getIteratee(iteratee),n-=MAX_ARRAY_LENGTH;for(var result=baseTimes(length,iteratee);++index<n;)iteratee(index);return result}function toPath(value){return isArray(value)?arrayMap(value,toKey):isSymbol(value)?[value]:copyArray(stringToPath(toString(value)))}function uniqueId(prefix){var id=++idCounter;return toString(prefix)+id}function max(array){return array&&array.length?baseExtremum(array,identity,baseGt):undefined}function maxBy(array,iteratee){return array&&array.length?baseExtremum(array,getIteratee(iteratee,2),baseGt):undefined}function mean(array){return baseMean(array,identity)}function meanBy(array,iteratee){return baseMean(array,getIteratee(iteratee,2))}function min(array){return array&&array.length?baseExtremum(array,identity,baseLt):undefined}function minBy(array,iteratee){return array&&array.length?baseExtremum(array,getIteratee(iteratee,2),baseLt):undefined}function sum(array){return array&&array.length?baseSum(array,identity):0}function sumBy(array,iteratee){return array&&array.length?baseSum(array,getIteratee(iteratee,2)):0}context=null==context?root:_.defaults(root.Object(),context,_.pick(root,contextProps));var Array=context.Array,Date=context.Date,Error=context.Error,Function=context.Function,Math=context.Math,Object=context.Object,RegExp=context.RegExp,String=context.String,TypeError=context.TypeError,arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=context["__core-js_shared__"],funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,idCounter=0,maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}(),nativeObjectToString=objectProto.toString,objectCtorString=funcToString.call(Object),oldDash=root._,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Buffer=moduleExports?context.Buffer:undefined,Symbol=context.Symbol,Uint8Array=context.Uint8Array,allocUnsafe=Buffer?Buffer.allocUnsafe:undefined,getPrototype=overArg(Object.getPrototypeOf,Object),objectCreate=Object.create,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice,spreadableSymbol=Symbol?Symbol.isConcatSpreadable:undefined,symIterator=Symbol?Symbol.iterator:undefined,symToStringTag=Symbol?Symbol.toStringTag:undefined,defineProperty=function(){try{var func=getNative(Object,"defineProperty");return func({},"",{}),func}catch(e){}}(),ctxClearTimeout=context.clearTimeout!==root.clearTimeout&&context.clearTimeout,ctxNow=Date&&Date.now!==root.Date.now&&Date.now,ctxSetTimeout=context.setTimeout!==root.setTimeout&&context.setTimeout,nativeCeil=Math.ceil,nativeFloor=Math.floor,nativeGetSymbols=Object.getOwnPropertySymbols,nativeIsBuffer=Buffer?Buffer.isBuffer:undefined,nativeIsFinite=context.isFinite,nativeJoin=arrayProto.join,nativeKeys=overArg(Object.keys,Object),nativeMax=Math.max,nativeMin=Math.min,nativeNow=Date.now,nativeParseInt=context.parseInt,nativeRandom=Math.random,nativeReverse=arrayProto.reverse,DataView=getNative(context,"DataView"),Map=getNative(context,"Map"),Promise=getNative(context,"Promise"),Set=getNative(context,"Set"),WeakMap=getNative(context,"WeakMap"),nativeCreate=getNative(Object,"create"),metaMap=WeakMap&&new WeakMap,realNames={},dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap),symbolProto=Symbol?Symbol.prototype:undefined,symbolValueOf=symbolProto?symbolProto.valueOf:undefined,symbolToString=symbolProto?symbolProto.toString:undefined,baseCreate=function(){function object(){}return function(proto){if(!isObject(proto))return{};if(objectCreate)return objectCreate(proto);object.prototype=proto;var result=new object;return object.prototype=undefined,result}}();lodash.templateSettings={escape:reEscape,evaluate:reEvaluate,interpolate:reInterpolate,variable:"",imports:{_:lodash}},lodash.prototype=baseLodash.prototype,lodash.prototype.constructor=lodash,LodashWrapper.prototype=baseCreate(baseLodash.prototype),LodashWrapper.prototype.constructor=LodashWrapper,LazyWrapper.prototype=baseCreate(baseLodash.prototype),LazyWrapper.prototype.constructor=LazyWrapper,Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet,ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet,MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet,SetCache.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas,Stack.prototype.clear=stackClear,Stack.prototype.delete=stackDelete,Stack.prototype.get=stackGet,Stack.prototype.has=stackHas,Stack.prototype.set=stackSet;var baseEach=createBaseEach(baseForOwn),baseEachRight=createBaseEach(baseForOwnRight,!0),baseFor=createBaseFor(),baseForRight=createBaseFor(!0),baseSetData=metaMap?function(func,data){return metaMap.set(func,data),func}:identity,baseSetToString=defineProperty?function(func,string){return defineProperty(func,"toString",{configurable:!0,enumerable:!1,value:constant(string),writable:!0})}:identity,castRest=baseRest,clearTimeout=ctxClearTimeout||function(id){return root.clearTimeout(id)},createSet=Set&&1/setToArray(new Set([,-0]))[1]==INFINITY?function(values){return new Set(values)}:noop,getData=metaMap?function(func){return metaMap.get(func)}:noop,getSymbols=nativeGetSymbols?function(object){return null==object?[]:(object=Object(object),arrayFilter(nativeGetSymbols(object),function(symbol){return propertyIsEnumerable.call(object,symbol)}))}:stubArray,getSymbolsIn=nativeGetSymbols?function(object){for(var result=[];object;)arrayPush(result,getSymbols(object)),object=getPrototype(object);return result}:stubArray,getTag=baseGetTag;(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map)!=mapTag||Promise&&getTag(Promise.resolve())!=promiseTag||Set&&getTag(new Set)!=setTag||WeakMap&&getTag(new WeakMap)!=weakMapTag)&&(getTag=function(value){var result=baseGetTag(value),Ctor=result==objectTag?value.constructor:undefined,ctorString=Ctor?toSource(Ctor):"";if(ctorString)switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag}return result});var isMaskable=coreJsData?isFunction:stubFalse,setData=shortOut(baseSetData),setTimeout=ctxSetTimeout||function(func,wait){return root.setTimeout(func,wait)},setToString=shortOut(baseSetToString),stringToPath=memoizeCapped(function(string){var result=[];return reLeadingDot.test(string)&&result.push(""),string.replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}),result}),difference=baseRest(function(array,values){return isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,!0)):[]}),differenceBy=baseRest(function(array,values){var iteratee=last(values);return isArrayLikeObject(iteratee)&&(iteratee=undefined),isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,!0),getIteratee(iteratee,2)):[]}),differenceWith=baseRest(function(array,values){var comparator=last(values);return isArrayLikeObject(comparator)&&(comparator=undefined),isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,!0),undefined,comparator):[]}),intersection=baseRest(function(arrays){var mapped=arrayMap(arrays,castArrayLikeObject);return mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped):[]}),intersectionBy=baseRest(function(arrays){var iteratee=last(arrays),mapped=arrayMap(arrays,castArrayLikeObject);return iteratee===last(mapped)?iteratee=undefined:mapped.pop(),mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped,getIteratee(iteratee,2)):[]}),intersectionWith=baseRest(function(arrays){var comparator=last(arrays),mapped=arrayMap(arrays,castArrayLikeObject);return comparator="function"==typeof comparator?comparator:undefined,comparator&&mapped.pop(),mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped,undefined,comparator):[]}),pull=baseRest(pullAll),pullAt=flatRest(function(array,indexes){var length=null==array?0:array.length,result=baseAt(array,indexes);return basePullAt(array,arrayMap(indexes,function(index){return isIndex(index,length)?+index:index}).sort(compareAscending)),result}),union=baseRest(function(arrays){return baseUniq(baseFlatten(arrays,1,isArrayLikeObject,!0))}),unionBy=baseRest(function(arrays){var iteratee=last(arrays);return isArrayLikeObject(iteratee)&&(iteratee=undefined),baseUniq(baseFlatten(arrays,1,isArrayLikeObject,!0),getIteratee(iteratee,2))}),unionWith=baseRest(function(arrays){var comparator=last(arrays);return comparator="function"==typeof comparator?comparator:undefined,baseUniq(baseFlatten(arrays,1,isArrayLikeObject,!0),undefined,comparator)}),without=baseRest(function(array,values){return isArrayLikeObject(array)?baseDifference(array,values):[]}),xor=baseRest(function(arrays){return baseXor(arrayFilter(arrays,isArrayLikeObject))}),xorBy=baseRest(function(arrays){var iteratee=last(arrays);return isArrayLikeObject(iteratee)&&(iteratee=undefined),baseXor(arrayFilter(arrays,isArrayLikeObject),getIteratee(iteratee,2))}),xorWith=baseRest(function(arrays){var comparator=last(arrays);return comparator="function"==typeof comparator?comparator:undefined,baseXor(arrayFilter(arrays,isArrayLikeObject),undefined,comparator)}),zip=baseRest(unzip),zipWith=baseRest(function(arrays){var length=arrays.length,iteratee=length>1?arrays[length-1]:undefined;return iteratee="function"==typeof iteratee?(arrays.pop(),iteratee):undefined,unzipWith(arrays,iteratee)}),wrapperAt=flatRest(function(paths){var length=paths.length,start=length?paths[0]:0,value=this.__wrapped__,interceptor=function(object){return baseAt(object,paths)};return!(length>1||this.__actions__.length)&&value instanceof LazyWrapper&&isIndex(start)?(value=value.slice(start,+start+(length?1:0)),value.__actions__.push({func:thru,args:[interceptor],thisArg:undefined}),new LodashWrapper(value,this.__chain__).thru(function(array){return length&&!array.length&&array.push(undefined),array})):this.thru(interceptor)}),countBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?++result[key]:baseAssignValue(result,key,1)}),find=createFind(findIndex),findLast=createFind(findLastIndex),groupBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?result[key].push(value):baseAssignValue(result,key,[value])}),invokeMap=baseRest(function(collection,path,args){var index=-1,isFunc="function"==typeof path,result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,function(value){result[++index]=isFunc?apply(path,value,args):baseInvoke(value,path,args)}),result}),keyBy=createAggregator(function(result,value,key){baseAssignValue(result,key,value)}),partition=createAggregator(function(result,value,key){result[key?0:1].push(value)},function(){return[[],[]]}),sortBy=baseRest(function(collection,iteratees){if(null==collection)return[];var length=iteratees.length;return length>1&&isIterateeCall(collection,iteratees[0],iteratees[1])?iteratees=[]:length>2&&isIterateeCall(iteratees[0],iteratees[1],iteratees[2])&&(iteratees=[iteratees[0]]),baseOrderBy(collection,baseFlatten(iteratees,1),[])}),now=ctxNow||function(){return root.Date.now()},bind=baseRest(function(func,thisArg,partials){var bitmask=WRAP_BIND_FLAG;if(partials.length){var holders=replaceHolders(partials,getHolder(bind));bitmask|=WRAP_PARTIAL_FLAG}return createWrap(func,bitmask,thisArg,partials,holders)}),bindKey=baseRest(function(object,key,partials){var bitmask=WRAP_BIND_FLAG|WRAP_BIND_KEY_FLAG;if(partials.length){var holders=replaceHolders(partials,getHolder(bindKey));bitmask|=WRAP_PARTIAL_FLAG}return createWrap(key,bitmask,object,partials,holders)}),defer=baseRest(function(func,args){return baseDelay(func,1,args)}),delay=baseRest(function(func,wait,args){return baseDelay(func,toNumber(wait)||0,args)});memoize.Cache=MapCache;var overArgs=castRest(function(func,transforms){transforms=1==transforms.length&&isArray(transforms[0])?arrayMap(transforms[0],baseUnary(getIteratee())):arrayMap(baseFlatten(transforms,1),baseUnary(getIteratee()));var funcsLength=transforms.length;return baseRest(function(args){for(var index=-1,length=nativeMin(args.length,funcsLength);++index<length;)args[index]=transforms[index].call(this,args[index]);return apply(func,this,args)})}),partial=baseRest(function(func,partials){var holders=replaceHolders(partials,getHolder(partial));return createWrap(func,WRAP_PARTIAL_FLAG,undefined,partials,holders)}),partialRight=baseRest(function(func,partials){var holders=replaceHolders(partials,getHolder(partialRight));return createWrap(func,WRAP_PARTIAL_RIGHT_FLAG,undefined,partials,holders)}),rearg=flatRest(function(func,indexes){return createWrap(func,WRAP_REARG_FLAG,undefined,undefined,undefined,indexes)}),gt=createRelationalOperation(baseGt),gte=createRelationalOperation(function(value,other){return value>=other}),isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(value){return isObjectLike(value)&&hasOwnProperty.call(value,"callee")&&!propertyIsEnumerable.call(value,"callee")},isArray=Array.isArray,isArrayBuffer=nodeIsArrayBuffer?baseUnary(nodeIsArrayBuffer):baseIsArrayBuffer,isBuffer=nativeIsBuffer||stubFalse,isDate=nodeIsDate?baseUnary(nodeIsDate):baseIsDate,isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap,isRegExp=nodeIsRegExp?baseUnary(nodeIsRegExp):baseIsRegExp,isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,lt=createRelationalOperation(baseLt),lte=createRelationalOperation(function(value,other){return value<=other}),assign=createAssigner(function(object,source){if(isPrototype(source)||isArrayLike(source))return void copyObject(source,keys(source),object);for(var key in source)hasOwnProperty.call(source,key)&&assignValue(object,key,source[key])}),assignIn=createAssigner(function(object,source){copyObject(source,keysIn(source),object)}),assignInWith=createAssigner(function(object,source,srcIndex,customizer){copyObject(source,keysIn(source),object,customizer)}),assignWith=createAssigner(function(object,source,srcIndex,customizer){copyObject(source,keys(source),object,customizer)}),at=flatRest(baseAt),defaults=baseRest(function(args){return args.push(undefined,customDefaultsAssignIn),apply(assignInWith,undefined,args)}),defaultsDeep=baseRest(function(args){return args.push(undefined,customDefaultsMerge),apply(mergeWith,undefined,args)}),invert=createInverter(function(result,value,key){result[value]=key},constant(identity)),invertBy=createInverter(function(result,value,key){hasOwnProperty.call(result,value)?result[value].push(key):result[value]=[key]},getIteratee),invoke=baseRest(baseInvoke),merge=createAssigner(function(object,source,srcIndex){baseMerge(object,source,srcIndex)}),mergeWith=createAssigner(function(object,source,srcIndex,customizer){baseMerge(object,source,srcIndex,customizer)}),omit=flatRest(function(object,paths){var result={};if(null==object)return result;var isDeep=!1;paths=arrayMap(paths,function(path){return path=castPath(path,object),isDeep||(isDeep=path.length>1),path}),copyObject(object,getAllKeysIn(object),result),isDeep&&(result=baseClone(result,CLONE_DEEP_FLAG|CLONE_FLAT_FLAG|CLONE_SYMBOLS_FLAG,customOmitClone));for(var length=paths.length;length--;)baseUnset(result,paths[length]);return result}),pick=flatRest(function(object,paths){return null==object?{}:basePick(object,paths)}),toPairs=createToPairs(keys),toPairsIn=createToPairs(keysIn),camelCase=createCompounder(function(result,word,index){return word=word.toLowerCase(),result+(index?capitalize(word):word)}),kebabCase=createCompounder(function(result,word,index){return result+(index?"-":"")+word.toLowerCase()}),lowerCase=createCompounder(function(result,word,index){return result+(index?" ":"")+word.toLowerCase()}),lowerFirst=createCaseFirst("toLowerCase"),snakeCase=createCompounder(function(result,word,index){return result+(index?"_":"")+word.toLowerCase()}),startCase=createCompounder(function(result,word,index){return result+(index?" ":"")+upperFirst(word)}),upperCase=createCompounder(function(result,word,index){return result+(index?" ":"")+word.toUpperCase()}),upperFirst=createCaseFirst("toUpperCase"),attempt=baseRest(function(func,args){try{return apply(func,undefined,args)}catch(e){return isError(e)?e:new Error(e)}}),bindAll=flatRest(function(object,methodNames){return arrayEach(methodNames,function(key){
|
||
key=toKey(key),baseAssignValue(object,key,bind(object[key],object))}),object}),flow=createFlow(),flowRight=createFlow(!0),method=baseRest(function(path,args){return function(object){return baseInvoke(object,path,args)}}),methodOf=baseRest(function(object,args){return function(path){return baseInvoke(object,path,args)}}),over=createOver(arrayMap),overEvery=createOver(arrayEvery),overSome=createOver(arraySome),range=createRange(),rangeRight=createRange(!0),add=createMathOperation(function(augend,addend){return augend+addend},0),ceil=createRound("ceil"),divide=createMathOperation(function(dividend,divisor){return dividend/divisor},1),floor=createRound("floor"),multiply=createMathOperation(function(multiplier,multiplicand){return multiplier*multiplicand},1),round=createRound("round"),subtract=createMathOperation(function(minuend,subtrahend){return minuend-subtrahend},0);return lodash.after=after,lodash.ary=ary,lodash.assign=assign,lodash.assignIn=assignIn,lodash.assignInWith=assignInWith,lodash.assignWith=assignWith,lodash.at=at,lodash.before=before,lodash.bind=bind,lodash.bindAll=bindAll,lodash.bindKey=bindKey,lodash.castArray=castArray,lodash.chain=chain,lodash.chunk=chunk,lodash.compact=compact,lodash.concat=concat,lodash.cond=cond,lodash.conforms=conforms,lodash.constant=constant,lodash.countBy=countBy,lodash.create=create,lodash.curry=curry,lodash.curryRight=curryRight,lodash.debounce=debounce,lodash.defaults=defaults,lodash.defaultsDeep=defaultsDeep,lodash.defer=defer,lodash.delay=delay,lodash.difference=difference,lodash.differenceBy=differenceBy,lodash.differenceWith=differenceWith,lodash.drop=drop,lodash.dropRight=dropRight,lodash.dropRightWhile=dropRightWhile,lodash.dropWhile=dropWhile,lodash.fill=fill,lodash.filter=filter,lodash.flatMap=flatMap,lodash.flatMapDeep=flatMapDeep,lodash.flatMapDepth=flatMapDepth,lodash.flatten=flatten,lodash.flattenDeep=flattenDeep,lodash.flattenDepth=flattenDepth,lodash.flip=flip,lodash.flow=flow,lodash.flowRight=flowRight,lodash.fromPairs=fromPairs,lodash.functions=functions,lodash.functionsIn=functionsIn,lodash.groupBy=groupBy,lodash.initial=initial,lodash.intersection=intersection,lodash.intersectionBy=intersectionBy,lodash.intersectionWith=intersectionWith,lodash.invert=invert,lodash.invertBy=invertBy,lodash.invokeMap=invokeMap,lodash.iteratee=iteratee,lodash.keyBy=keyBy,lodash.keys=keys,lodash.keysIn=keysIn,lodash.map=map,lodash.mapKeys=mapKeys,lodash.mapValues=mapValues,lodash.matches=matches,lodash.matchesProperty=matchesProperty,lodash.memoize=memoize,lodash.merge=merge,lodash.mergeWith=mergeWith,lodash.method=method,lodash.methodOf=methodOf,lodash.mixin=mixin,lodash.negate=negate,lodash.nthArg=nthArg,lodash.omit=omit,lodash.omitBy=omitBy,lodash.once=once,lodash.orderBy=orderBy,lodash.over=over,lodash.overArgs=overArgs,lodash.overEvery=overEvery,lodash.overSome=overSome,lodash.partial=partial,lodash.partialRight=partialRight,lodash.partition=partition,lodash.pick=pick,lodash.pickBy=pickBy,lodash.property=property,lodash.propertyOf=propertyOf,lodash.pull=pull,lodash.pullAll=pullAll,lodash.pullAllBy=pullAllBy,lodash.pullAllWith=pullAllWith,lodash.pullAt=pullAt,lodash.range=range,lodash.rangeRight=rangeRight,lodash.rearg=rearg,lodash.reject=reject,lodash.remove=remove,lodash.rest=rest,lodash.reverse=reverse,lodash.sampleSize=sampleSize,lodash.set=set,lodash.setWith=setWith,lodash.shuffle=shuffle,lodash.slice=slice,lodash.sortBy=sortBy,lodash.sortedUniq=sortedUniq,lodash.sortedUniqBy=sortedUniqBy,lodash.split=split,lodash.spread=spread,lodash.tail=tail,lodash.take=take,lodash.takeRight=takeRight,lodash.takeRightWhile=takeRightWhile,lodash.takeWhile=takeWhile,lodash.tap=tap,lodash.throttle=throttle,lodash.thru=thru,lodash.toArray=toArray,lodash.toPairs=toPairs,lodash.toPairsIn=toPairsIn,lodash.toPath=toPath,lodash.toPlainObject=toPlainObject,lodash.transform=transform,lodash.unary=unary,lodash.union=union,lodash.unionBy=unionBy,lodash.unionWith=unionWith,lodash.uniq=uniq,lodash.uniqBy=uniqBy,lodash.uniqWith=uniqWith,lodash.unset=unset,lodash.unzip=unzip,lodash.unzipWith=unzipWith,lodash.update=update,lodash.updateWith=updateWith,lodash.values=values,lodash.valuesIn=valuesIn,lodash.without=without,lodash.words=words,lodash.wrap=wrap,lodash.xor=xor,lodash.xorBy=xorBy,lodash.xorWith=xorWith,lodash.zip=zip,lodash.zipObject=zipObject,lodash.zipObjectDeep=zipObjectDeep,lodash.zipWith=zipWith,lodash.entries=toPairs,lodash.entriesIn=toPairsIn,lodash.extend=assignIn,lodash.extendWith=assignInWith,mixin(lodash,lodash),lodash.add=add,lodash.attempt=attempt,lodash.camelCase=camelCase,lodash.capitalize=capitalize,lodash.ceil=ceil,lodash.clamp=clamp,lodash.clone=clone,lodash.cloneDeep=cloneDeep,lodash.cloneDeepWith=cloneDeepWith,lodash.cloneWith=cloneWith,lodash.conformsTo=conformsTo,lodash.deburr=deburr,lodash.defaultTo=defaultTo,lodash.divide=divide,lodash.endsWith=endsWith,lodash.eq=eq,lodash.escape=escape,lodash.escapeRegExp=escapeRegExp,lodash.every=every,lodash.find=find,lodash.findIndex=findIndex,lodash.findKey=findKey,lodash.findLast=findLast,lodash.findLastIndex=findLastIndex,lodash.findLastKey=findLastKey,lodash.floor=floor,lodash.forEach=forEach,lodash.forEachRight=forEachRight,lodash.forIn=forIn,lodash.forInRight=forInRight,lodash.forOwn=forOwn,lodash.forOwnRight=forOwnRight,lodash.get=get,lodash.gt=gt,lodash.gte=gte,lodash.has=has,lodash.hasIn=hasIn,lodash.head=head,lodash.identity=identity,lodash.includes=includes,lodash.indexOf=indexOf,lodash.inRange=inRange,lodash.invoke=invoke,lodash.isArguments=isArguments,lodash.isArray=isArray,lodash.isArrayBuffer=isArrayBuffer,lodash.isArrayLike=isArrayLike,lodash.isArrayLikeObject=isArrayLikeObject,lodash.isBoolean=isBoolean,lodash.isBuffer=isBuffer,lodash.isDate=isDate,lodash.isElement=isElement,lodash.isEmpty=isEmpty,lodash.isEqual=isEqual,lodash.isEqualWith=isEqualWith,lodash.isError=isError,lodash.isFinite=isFinite,lodash.isFunction=isFunction,lodash.isInteger=isInteger,lodash.isLength=isLength,lodash.isMap=isMap,lodash.isMatch=isMatch,lodash.isMatchWith=isMatchWith,lodash.isNaN=isNaN,lodash.isNative=isNative,lodash.isNil=isNil,lodash.isNull=isNull,lodash.isNumber=isNumber,lodash.isObject=isObject,lodash.isObjectLike=isObjectLike,lodash.isPlainObject=isPlainObject,lodash.isRegExp=isRegExp,lodash.isSafeInteger=isSafeInteger,lodash.isSet=isSet,lodash.isString=isString,lodash.isSymbol=isSymbol,lodash.isTypedArray=isTypedArray,lodash.isUndefined=isUndefined,lodash.isWeakMap=isWeakMap,lodash.isWeakSet=isWeakSet,lodash.join=join,lodash.kebabCase=kebabCase,lodash.last=last,lodash.lastIndexOf=lastIndexOf,lodash.lowerCase=lowerCase,lodash.lowerFirst=lowerFirst,lodash.lt=lt,lodash.lte=lte,lodash.max=max,lodash.maxBy=maxBy,lodash.mean=mean,lodash.meanBy=meanBy,lodash.min=min,lodash.minBy=minBy,lodash.stubArray=stubArray,lodash.stubFalse=stubFalse,lodash.stubObject=stubObject,lodash.stubString=stubString,lodash.stubTrue=stubTrue,lodash.multiply=multiply,lodash.nth=nth,lodash.noConflict=noConflict,lodash.noop=noop,lodash.now=now,lodash.pad=pad,lodash.padEnd=padEnd,lodash.padStart=padStart,lodash.parseInt=parseInt,lodash.random=random,lodash.reduce=reduce,lodash.reduceRight=reduceRight,lodash.repeat=repeat,lodash.replace=replace,lodash.result=result,lodash.round=round,lodash.runInContext=runInContext,lodash.sample=sample,lodash.size=size,lodash.snakeCase=snakeCase,lodash.some=some,lodash.sortedIndex=sortedIndex,lodash.sortedIndexBy=sortedIndexBy,lodash.sortedIndexOf=sortedIndexOf,lodash.sortedLastIndex=sortedLastIndex,lodash.sortedLastIndexBy=sortedLastIndexBy,lodash.sortedLastIndexOf=sortedLastIndexOf,lodash.startCase=startCase,lodash.startsWith=startsWith,lodash.subtract=subtract,lodash.sum=sum,lodash.sumBy=sumBy,lodash.template=template,lodash.times=times,lodash.toFinite=toFinite,lodash.toInteger=toInteger,lodash.toLength=toLength,lodash.toLower=toLower,lodash.toNumber=toNumber,lodash.toSafeInteger=toSafeInteger,lodash.toString=toString,lodash.toUpper=toUpper,lodash.trim=trim,lodash.trimEnd=trimEnd,lodash.trimStart=trimStart,lodash.truncate=truncate,lodash.unescape=unescape,lodash.uniqueId=uniqueId,lodash.upperCase=upperCase,lodash.upperFirst=upperFirst,lodash.each=forEach,lodash.eachRight=forEachRight,lodash.first=head,mixin(lodash,function(){var source={};return baseForOwn(lodash,function(func,methodName){hasOwnProperty.call(lodash.prototype,methodName)||(source[methodName]=func)}),source}(),{chain:!1}),lodash.VERSION=VERSION,arrayEach(["bind","bindKey","curry","curryRight","partial","partialRight"],function(methodName){lodash[methodName].placeholder=lodash}),arrayEach(["drop","take"],function(methodName,index){LazyWrapper.prototype[methodName]=function(n){n=n===undefined?1:nativeMax(toInteger(n),0);var result=this.__filtered__&&!index?new LazyWrapper(this):this.clone();return result.__filtered__?result.__takeCount__=nativeMin(n,result.__takeCount__):result.__views__.push({size:nativeMin(n,MAX_ARRAY_LENGTH),type:methodName+(result.__dir__<0?"Right":"")}),result},LazyWrapper.prototype[methodName+"Right"]=function(n){return this.reverse()[methodName](n).reverse()}}),arrayEach(["filter","map","takeWhile"],function(methodName,index){var type=index+1,isFilter=type==LAZY_FILTER_FLAG||type==LAZY_WHILE_FLAG;LazyWrapper.prototype[methodName]=function(iteratee){var result=this.clone();return result.__iteratees__.push({iteratee:getIteratee(iteratee,3),type:type}),result.__filtered__=result.__filtered__||isFilter,result}}),arrayEach(["head","last"],function(methodName,index){var takeName="take"+(index?"Right":"");LazyWrapper.prototype[methodName]=function(){return this[takeName](1).value()[0]}}),arrayEach(["initial","tail"],function(methodName,index){var dropName="drop"+(index?"":"Right");LazyWrapper.prototype[methodName]=function(){return this.__filtered__?new LazyWrapper(this):this[dropName](1)}}),LazyWrapper.prototype.compact=function(){return this.filter(identity)},LazyWrapper.prototype.find=function(predicate){return this.filter(predicate).head()},LazyWrapper.prototype.findLast=function(predicate){return this.reverse().find(predicate)},LazyWrapper.prototype.invokeMap=baseRest(function(path,args){return"function"==typeof path?new LazyWrapper(this):this.map(function(value){return baseInvoke(value,path,args)})}),LazyWrapper.prototype.reject=function(predicate){return this.filter(negate(getIteratee(predicate)))},LazyWrapper.prototype.slice=function(start,end){start=toInteger(start);var result=this;return result.__filtered__&&(start>0||end<0)?new LazyWrapper(result):(start<0?result=result.takeRight(-start):start&&(result=result.drop(start)),end!==undefined&&(end=toInteger(end),result=end<0?result.dropRight(-end):result.take(end-start)),result)},LazyWrapper.prototype.takeRightWhile=function(predicate){return this.reverse().takeWhile(predicate).reverse()},LazyWrapper.prototype.toArray=function(){return this.take(MAX_ARRAY_LENGTH)},baseForOwn(LazyWrapper.prototype,function(func,methodName){var checkIteratee=/^(?:filter|find|map|reject)|While$/.test(methodName),isTaker=/^(?:head|last)$/.test(methodName),lodashFunc=lodash[isTaker?"take"+("last"==methodName?"Right":""):methodName],retUnwrapped=isTaker||/^find/.test(methodName);lodashFunc&&(lodash.prototype[methodName]=function(){var value=this.__wrapped__,args=isTaker?[1]:arguments,isLazy=value instanceof LazyWrapper,iteratee=args[0],useLazy=isLazy||isArray(value),interceptor=function(value){var result=lodashFunc.apply(lodash,arrayPush([value],args));return isTaker&&chainAll?result[0]:result};useLazy&&checkIteratee&&"function"==typeof iteratee&&1!=iteratee.length&&(isLazy=useLazy=!1);var chainAll=this.__chain__,isHybrid=!!this.__actions__.length,isUnwrapped=retUnwrapped&&!chainAll,onlyLazy=isLazy&&!isHybrid;if(!retUnwrapped&&useLazy){value=onlyLazy?value:new LazyWrapper(this);var result=func.apply(value,args);return result.__actions__.push({func:thru,args:[interceptor],thisArg:undefined}),new LodashWrapper(result,chainAll)}return isUnwrapped&&onlyLazy?func.apply(this,args):(result=this.thru(interceptor),isUnwrapped?isTaker?result.value()[0]:result.value():result)})}),arrayEach(["pop","push","shift","sort","splice","unshift"],function(methodName){var func=arrayProto[methodName],chainName=/^(?:push|sort|unshift)$/.test(methodName)?"tap":"thru",retUnwrapped=/^(?:pop|shift)$/.test(methodName);lodash.prototype[methodName]=function(){var args=arguments;if(retUnwrapped&&!this.__chain__){var value=this.value();return func.apply(isArray(value)?value:[],args)}return this[chainName](function(value){return func.apply(isArray(value)?value:[],args)})}}),baseForOwn(LazyWrapper.prototype,function(func,methodName){var lodashFunc=lodash[methodName];if(lodashFunc){var key=lodashFunc.name+"",names=realNames[key]||(realNames[key]=[]);names.push({name:methodName,func:lodashFunc})}}),realNames[createHybrid(undefined,WRAP_BIND_KEY_FLAG).name]=[{name:"wrapper",func:undefined}],LazyWrapper.prototype.clone=lazyClone,LazyWrapper.prototype.reverse=lazyReverse,LazyWrapper.prototype.value=lazyValue,lodash.prototype.at=wrapperAt,lodash.prototype.chain=wrapperChain,lodash.prototype.commit=wrapperCommit,lodash.prototype.next=wrapperNext,lodash.prototype.plant=wrapperPlant,lodash.prototype.reverse=wrapperReverse,lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=wrapperValue,lodash.prototype.first=lodash.prototype.head,symIterator&&(lodash.prototype[symIterator]=wrapperToIterator),lodash},_=runInContext();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(root._=_,define(function(){return _})):freeModule?((freeModule.exports=_)._=_,freeExports._=_):root._=_}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){for(var up=0,i=parts.length-1;i>=0;i--){var last=parts[i];"."===last?parts.splice(i,1):".."===last?(parts.splice(i,1),up++):up&&(parts.splice(i,1),up--)}if(allowAboveRoot)for(;up--;up)parts.unshift("..");return parts}function filter(xs,f){if(xs.filter)return xs.filter(f);for(var res=[],i=0;i<xs.length;i++)f(xs[i],i,xs)&&res.push(xs[i]);return res}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){for(var resolvedPath="",resolvedAbsolute=!1,i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if("string"!=typeof path)throw new TypeError("Arguments to path.resolve must be strings");path&&(resolvedPath=path+"/"+resolvedPath,resolvedAbsolute="/"===path.charAt(0))}return resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/"),(resolvedAbsolute?"/":"")+resolvedPath||"."},exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash="/"===substr(path,-1);return path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/"),path||isAbsolute||(path="."),path&&trailingSlash&&(path+="/"),(isAbsolute?"/":"")+path},exports.isAbsolute=function(path){return"/"===path.charAt(0)},exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if("string"!=typeof p)throw new TypeError("Arguments to path.join must be strings");return p}).join("/"))},exports.relative=function(from,to){function trim(arr){for(var start=0;start<arr.length&&""===arr[start];start++);for(var end=arr.length-1;end>=0&&""===arr[end];end--);return start>end?[]:arr.slice(start,end-start+1)}from=exports.resolve(from).substr(1),to=exports.resolve(to).substr(1);for(var fromParts=trim(from.split("/")),toParts=trim(to.split("/")),length=Math.min(fromParts.length,toParts.length),samePartsLength=length,i=0;i<length;i++)if(fromParts[i]!==toParts[i]){samePartsLength=i;break}for(var outputParts=[],i=samePartsLength;i<fromParts.length;i++)outputParts.push("..");return outputParts=outputParts.concat(toParts.slice(samePartsLength)),outputParts.join("/")},exports.sep="/",exports.delimiter=":",exports.dirname=function(path){var result=splitPath(path),root=result[0],dir=result[1];return root||dir?(dir&&(dir=dir.substr(0,dir.length-1)),root+dir):"."},exports.basename=function(path,ext){var f=splitPath(path)[2];return ext&&f.substr(-1*ext.length)===ext&&(f=f.substr(0,f.length-ext.length)),f},exports.extname=function(path){return splitPath(path)[3]};var substr="b"==="ab".substr(-1)?function(str,start,len){return str.substr(start,len)}:function(str,start,len){return start<0&&(start=str.length+start),str.substr(start,len)}}).call(this,require("_process"))},{_process:4}],4:[function(require,module,exports){function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,runClearTimeout(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}var cachedSetTimeout,cachedClearTimeout,process=module.exports={};!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.binding=function(name){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(dir){throw new Error("process.chdir is not supported")},process.umask=function(){return 0}},{}],5:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _line=require("./line");Object.defineProperty(exports,"Line",{enumerable:!0,get:function(){return _line.Line}});var _matrix=require("./matrix");Object.defineProperty(exports,"Matrix",{enumerable:!0,get:function(){return _matrix.Matrix}});var _plane=require("./plane");Object.defineProperty(exports,"Plane",{enumerable:!0,get:function(){return _plane.Plane}});var _sylvester=require("./sylvester");Object.defineProperty(exports,"Sylvester",{enumerable:!0,get:function(){return _sylvester.Sylvester}});var _vector=require("./vector");Object.defineProperty(exports,"Vector",{enumerable:!0,get:function(){return _vector.Vector}})},{"./line":6,"./matrix":7,"./plane":8,"./sylvester":9,"./vector":10}],6:[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Segment=exports.Line=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_vector=require("./vector"),_matrix=require("./matrix"),_plane=require("./plane"),_sylvester=require("./sylvester"),Line=exports.Line=function(){function Line(){_classCallCheck(this,Line)}return _createClass(Line,[{key:"eql",value:function(line){return this.isParallelTo(line)&&this.contains(line.anchor)}},{key:"dup",value:function(){return Line.create(this.anchor,this.direction)}},{key:"translate",value:function(vector){var V=vector.elements||vector;return Line.create([this.anchor.elements[0]+V[0],this.anchor.elements[1]+V[1],this.anchor.elements[2]+(V[2]||0)],this.direction)}},{key:"isParallelTo",value:function(obj){if(obj.normal||obj.start&&obj.end)return obj.isParallelTo(this);var theta=this.direction.angleFrom(obj.direction);return Math.abs(theta)<=_sylvester.Sylvester.precision||Math.abs(theta-Math.PI)<=_sylvester.Sylvester.precision}},{key:"distanceFrom",value:function(obj){if(obj.normal||obj.start&&obj.end)return obj.distanceFrom(this);if(obj.direction){if(this.isParallelTo(obj))return this.distanceFrom(obj.anchor);var N=this.direction.cross(obj.direction).toUnitVector().elements,_A=this.anchor.elements,B=obj.anchor.elements;return Math.abs((_A[0]-B[0])*N[0]+(_A[1]-B[1])*N[1]+(_A[2]-B[2])*N[2])}var P=obj.elements||obj,A=this.anchor.elements,D=this.direction.elements,PA1=P[0]-A[0],PA2=P[1]-A[1],PA3=(P[2]||0)-A[2],modPA=Math.sqrt(PA1*PA1+PA2*PA2+PA3*PA3);if(0===modPA)return 0;var cosTheta=(PA1*D[0]+PA2*D[1]+PA3*D[2])/modPA,sin2=1-cosTheta*cosTheta;return Math.abs(modPA*Math.sqrt(sin2<0?0:sin2))}},{key:"contains",value:function(obj){if(obj.start&&obj.end)return this.contains(obj.start)&&this.contains(obj.end);var dist=this.distanceFrom(obj);return null!==dist&&dist<=_sylvester.Sylvester.precision}},{key:"positionOf",value:function(point){if(!this.contains(point))return null;var P=point.elements||point,A=this.anchor.elements,D=this.direction.elements;return(P[0]-A[0])*D[0]+(P[1]-A[1])*D[1]+((P[2]||0)-A[2])*D[2]}},{key:"liesIn",value:function(plane){return plane.contains(this)}},{key:"intersects",value:function(obj){return obj.normal?obj.intersects(this):!this.isParallelTo(obj)&&this.distanceFrom(obj)<=_sylvester.Sylvester.precision}},{key:"intersectionWith",value:function(obj){if(obj.normal||obj.start&&obj.end)return obj.intersectionWith(this);if(!this.intersects(obj))return null;var P=this.anchor.elements,X=this.direction.elements,Q=obj.anchor.elements,Y=obj.direction.elements,X1=X[0],X2=X[1],X3=X[2],Y1=Y[0],Y2=Y[1],Y3=Y[2],PsubQ1=P[0]-Q[0],PsubQ2=P[1]-Q[1],PsubQ3=P[2]-Q[2],XdotQsubP=-X1*PsubQ1-X2*PsubQ2-X3*PsubQ3,YdotPsubQ=Y1*PsubQ1+Y2*PsubQ2+Y3*PsubQ3,XdotX=X1*X1+X2*X2+X3*X3,YdotY=Y1*Y1+Y2*Y2+Y3*Y3,XdotY=X1*Y1+X2*Y2+X3*Y3,k=(XdotQsubP*YdotY/XdotX+XdotY*YdotPsubQ)/(YdotY-XdotY*XdotY);return _vector.Vector.create([P[0]+k*X1,P[1]+k*X2,P[2]+k*X3])}},{key:"pointClosestTo",value:function(obj){if(obj.start&&obj.end){var _P=obj.pointClosestTo(this);return null===_P?null:this.pointClosestTo(_P)}if(obj.direction){if(this.intersects(obj))return this.intersectionWith(obj);if(this.isParallelTo(obj))return null;var _D=this.direction.elements,E=obj.direction.elements,_D2=_D[0],_D3=_D[1],_D4=_D[2],E1=E[0],E2=E[1],E3=E[2],_x=_D4*E1-_D2*E3,_y=_D2*E2-_D3*E1,_z=_D3*E3-_D4*E2,N=[_x*E3-_y*E2,_y*E1-_z*E3,_z*E2-_x*E1],_P2=_plane.Plane.create(obj.anchor,N);return _P2.intersectionWith(this)}var P=obj.elements||obj;if(this.contains(P))return _vector.Vector.create(P);var A=this.anchor.elements,D=this.direction.elements,D1=D[0],D2=D[1],D3=D[2],A1=A[0],A2=A[1],A3=A[2],x=D1*(P[1]-A2)-D2*(P[0]-A1),y=D2*((P[2]||0)-A3)-D3*(P[1]-A2),z=D3*(P[0]-A1)-D1*((P[2]||0)-A3),V=_vector.Vector.create([D2*x-D3*z,D3*y-D1*x,D1*z-D2*y]),k=this.distanceFrom(P)/V.modulus();return _vector.Vector.create([P[0]+V.elements[0]*k,P[1]+V.elements[1]*k,(P[2]||0)+V.elements[2]*k])}},{key:"rotate",value:function(t,line){"undefined"==typeof line.direction&&(line=Line.create(line.to3D(),_vector.Vector.k));var R=_matrix.Matrix.Rotation(t,line.direction).elements,C=line.pointClosestTo(this.anchor).elements,A=this.anchor.elements,D=this.direction.elements,C1=C[0],C2=C[1],C3=C[2],A1=A[0],A2=A[1],A3=A[2],x=A1-C1,y=A2-C2,z=A3-C3;return Line.create([C1+R[0][0]*x+R[0][1]*y+R[0][2]*z,C2+R[1][0]*x+R[1][1]*y+R[1][2]*z,C3+R[2][0]*x+R[2][1]*y+R[2][2]*z],[R[0][0]*D[0]+R[0][1]*D[1]+R[0][2]*D[2],R[1][0]*D[0]+R[1][1]*D[1]+R[1][2]*D[2],R[2][0]*D[0]+R[2][1]*D[1]+R[2][2]*D[2]])}},{key:"reverse",value:function(){return Line.create(this.anchor,this.direction.x(-1))}},{key:"reflectionIn",value:function(obj){if(obj.normal){var A=this.anchor.elements,D=this.direction.elements,A1=A[0],A2=A[1],A3=A[2],D1=D[0],D2=D[1],D3=D[2],newA=this.anchor.reflectionIn(obj).elements,AD1=A1+D1,AD2=A2+D2,AD3=A3+D3,Q=obj.pointClosestTo([AD1,AD2,AD3]).elements,newD=[Q[0]+(Q[0]-AD1)-newA[0],Q[1]+(Q[1]-AD2)-newA[1],Q[2]+(Q[2]-AD3)-newA[2]];return Line.create(newA,newD)}if(obj.direction)return this.rotate(Math.PI,obj);var P=obj.elements||obj;return Line.create(this.anchor.reflectionIn([P[0],P[1],P[2]||0]),this.direction)}},{key:"setVectors",value:function(anchor,direction){if(anchor=_vector.Vector.create(anchor),direction=_vector.Vector.create(direction),2===anchor.elements.length&&anchor.elements.push(0),2===direction.elements.length&&direction.elements.push(0),anchor.elements.length>3||direction.elements.length>3)return null;var mod=direction.modulus();return 0===mod?null:(this.anchor=anchor,this.direction=_vector.Vector.create([direction.elements[0]/mod,direction.elements[1]/mod,direction.elements[2]/mod]),this)}}],[{key:"create",value:function(anchor,direction){var L=new Line;return L.setVectors(anchor,direction)}}]),Line}(),Segment=exports.Segment=function(){function Segment(){_classCallCheck(this,Segment)}return _createClass(Segment,[{key:"eql",value:function(segment){return this.start.eql(segment.start)&&this.end.eql(segment.end)||this.start.eql(segment.end)&&this.end.eql(segment.start)}},{key:"dup",value:function(){return Segment.create(this.start,this.end)}},{key:"length",value:function(){var A=this.start.elements,B=this.end.elements,C1=B[0]-A[0],C2=B[1]-A[1],C3=B[2]-A[2];return Math.sqrt(C1*C1+C2*C2+C3*C3)}},{key:"toVector",value:function(){var A=this.start.elements,B=this.end.elements;return _vector.Vector.create([B[0]-A[0],B[1]-A[1],B[2]-A[2]])}},{key:"midpoint",value:function(){var A=this.start.elements,B=this.end.elements;return _vector.Vector.create([(B[0]+A[0])/2,(B[1]+A[1])/2,(B[2]+A[2])/2])}},{key:"bisectingPlane",value:function(){return _plane.Plane.create(this.midpoint(),this.toVector())}},{key:"translate",value:function(vector){var V=vector.elements||vector,S=this.start.elements,E=this.end.elements;return Segment.create([S[0]+V[0],S[1]+V[1],S[2]+(V[2]||0)],[E[0]+V[0],E[1]+V[1],E[2]+(V[2]||0)])}},{key:"isParallelTo",value:function(obj){return this.line.isParallelTo(obj)}},{key:"distanceFrom",value:function(obj){var P=this.pointClosestTo(obj);return null===P?null:P.distanceFrom(obj)}},{key:"contains",value:function(obj){if(obj.start&&obj.end)return this.contains(obj.start)&&this.contains(obj.end);var P=(obj.elements||obj).slice();if(2===P.length&&P.push(0),this.start.eql(P))return!0;var S=this.start.elements,V=_vector.Vector.create([S[0]-P[0],S[1]-P[1],S[2]-(P[2]||0)]),vect=this.toVector();return V.isAntiparallelTo(vect)&&V.modulus()<=vect.modulus()}},{key:"intersects",value:function(obj){return null!==this.intersectionWith(obj)}},{key:"intersectionWith",value:function(obj){if(!this.line.intersects(obj))return null;var P=this.line.intersectionWith(obj);return this.contains(P)?P:null}},{key:"pointClosestTo",value:function(obj){if(obj.normal){var V=this.line.intersectionWith(obj);return null===V?null:this.pointClosestTo(V)}var P=this.line.pointClosestTo(obj);return null===P?null:this.contains(P)?P:(this.line.positionOf(P)<0?this.start:this.end).dup()}},{key:"setPoints",value:function(startPoint,endPoint){return startPoint=_vector.Vector.create(startPoint).to3D(),endPoint=_vector.Vector.create(endPoint).to3D(),null===startPoint||null===endPoint?null:(this.line=Line.create(startPoint,endPoint.subtract(startPoint)),this.start=startPoint,this.end=endPoint,this)}}],[{key:"create",value:function(v1,v2){var S=new Segment;return S.setPoints(v1,v2)}}]),Segment}();Line.X=Line.create(_vector.Vector.Zero(3),_vector.Vector.i),Line.Y=Line.create(_vector.Vector.Zero(3),_vector.Vector.j),Line.Z=Line.create(_vector.Vector.Zero(3),_vector.Vector.k),Line.Segment=Segment},{"./matrix":7,"./plane":8,"./sylvester":9,"./vector":10}],7:[function(require,module,exports){"use strict";function _interopRequireWildcard(obj){if(obj&&obj.__esModule)return obj;var newObj={};if(null!=obj)for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(newObj[key]=obj[key]);return newObj.default=obj,newObj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function sign(x){return x<0?-1:1}function identSize(M,m,n,k){for(var e=M.elements,i=k-1;i--;){for(var row=[],j=0;j<n;j++)row.push(j===i?1:0);e.unshift(row)}for(var _i=k-1;_i<m;_i++)for(;e[_i].length<n;)e[_i].unshift(0);return Matrix.create(e)}function pca(X){var Sigma=X.transpose().x(X).x(1/X.rows()),svd=Sigma.svd();return{U:svd.U,S:svd.S}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Matrix=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_fs=require("fs"),fs=_interopRequireWildcard(_fs),_sylvester=require("./sylvester"),_vector=require("./vector"),lapack=function(){try{return require("lapack")}catch(err){return null}}(),Matrix=exports.Matrix=function(){function Matrix(){_classCallCheck(this,Matrix)}return _createClass(Matrix,[{key:"solve",value:function(b){var lu=this.lu();b=lu.P.x(b);var y=lu.L.forwardSubstitute(b),x=lu.U.backSubstitute(y);return lu.P.x(x)}},{key:"pcaProject",value:function(k){var U=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pca(this).U,Ureduce=U.slice(1,U.rows(),1,k);return{Z:this.x(Ureduce),U:U}}},{key:"pcaRecover",value:function(U){var k=this.cols(),Ureduce=U.slice(1,U.rows(),1,k);return this.x(Ureduce.transpose())}},{key:"triu",value:function(k){return k||(k=0),this.map(function(x,i,j){return j-i>=k?x:0})}},{key:"unroll",value:function(){for(var v=[],i=1;i<=this.cols();i++)for(var j=1;j<=this.rows();j++)v.push(this.e(j,i));return _vector.Vector.create(v)}},{key:"slice",value:function(startRow,endRow,startCol,endCol){var x=[];0===endRow&&(endRow=this.rows()),0===endCol&&(endCol=this.cols());for(var i=startRow;i<=endRow;i++){for(var row=[],j=startCol;j<=endCol;j++)row.push(this.e(i,j));
|
||
x.push(row)}return Matrix.create(x)}},{key:"e",value:function(i,j){return i<1||i>this.elements.length||j<1||j>this.elements[0].length?null:this.elements[i-1][j-1]}},{key:"row",value:function(i){return i>this.elements.length?null:_vector.Vector.create(this.elements[i-1])}},{key:"col",value:function col(j){if(j>this.elements[0].length)return null;for(var col=[],n=this.elements.length,i=0;i<n;i++)col.push(this.elements[i][j-1]);return _vector.Vector.create(col)}},{key:"dimensions",value:function(){return{rows:this.elements.length,cols:this.elements[0].length}}},{key:"rows",value:function(){return this.elements.length}},{key:"cols",value:function(){return this.elements[0].length}},{key:"approxEql",value:function(matrix){return this.eql(matrix,_sylvester.Sylvester.approxPrecision)}},{key:"eql",value:function(matrix,precision){var M=matrix.elements||matrix;if("undefined"==typeof M[0][0]&&(M=Matrix.create(M).elements),this.elements.length!==M.length||this.elements[0].length!==M[0].length)return!1;for(var i=this.elements.length,nj=this.elements[0].length,j=void 0;i--;)for(j=nj;j--;)if(Math.abs(this.elements[i][j]-M[i][j])>(precision||_sylvester.Sylvester.precision))return!1;return!0}},{key:"dup",value:function(){return Matrix.create(this.elements)}},{key:"map",value:function(fn){for(var els=[],i=this.elements.length,nj=this.elements[0].length,j=void 0;i--;)for(j=nj,els[i]=[];j--;)els[i][j]=fn(this.elements[i][j],i+1,j+1);return Matrix.create(els)}},{key:"isSameSizeAs",value:function(matrix){var M=matrix.elements||matrix;return"undefined"==typeof M[0][0]&&(M=Matrix.create(M).elements),this.elements.length===M.length&&this.elements[0].length===M[0].length}},{key:"add",value:function(matrix){if("number"==typeof matrix)return this.map(function(x){return x+matrix});var M=matrix.elements||matrix;return"undefined"==typeof M[0][0]&&(M=Matrix.create(M).elements),this.isSameSizeAs(M)?this.map(function(x,i,j){return x+M[i-1][j-1]}):null}},{key:"subtract",value:function(matrix){if("number"==typeof matrix)return this.map(function(x){return x-matrix});var M=matrix.elements||matrix;return"undefined"==typeof M[0][0]&&(M=Matrix.create(M).elements),this.isSameSizeAs(M)?this.map(function(x,i,j){return x-M[i-1][j-1]}):null}},{key:"canMultiplyFromLeft",value:function(matrix){var M=matrix.elements||matrix;return"undefined"==typeof M[0][0]&&(M=Matrix.create(M).elements),this.elements[0].length===M.length}},{key:"mulOp",value:function(matrix,op){if(!matrix.elements)return this.map(function(x){return op(x,matrix)});var returnVector=Boolean(matrix.modulus),M=matrix.elements||matrix;if("undefined"==typeof M[0][0]&&(M=Matrix.create(M).elements),!this.canMultiplyFromLeft(M))return null;for(var e=this.elements,rowThis=void 0,rowElem=void 0,elements=[],sum=void 0,m=e.length,n=M[0].length,o=e[0].length,i=m,j=void 0,k=void 0;i--;){for(rowElem=[],rowThis=e[i],j=n;j--;){for(sum=0,k=o;k--;)sum+=op(rowThis[k],M[k][j]);rowElem[j]=sum}elements[i]=rowElem}var output=Matrix.create(elements);return returnVector?output.col(1):output}},{key:"div",value:function(matrix){return this.mulOp(matrix,function(x,y){return x/y})}},{key:"multiply",value:function(matrix){return this.mulOp(matrix,function(x,y){return x*y})}},{key:"x",value:function(matrix){return this.multiply(matrix)}},{key:"elementMultiply",value:function(v){return this.map(function(k,i,j){return v.e(i,j)*k})}},{key:"sum",value:function sum(){var sum=0;return this.map(function(x){sum+=x}),sum}},{key:"mean",value:function(){for(var dim=this.dimensions(),r=[],i=1;i<=dim.cols;i++)r.push(this.col(i).sum()/dim.rows);return _vector.Vector.create(r)}},{key:"std",value:function(){for(var dim=this.dimensions(),mMean=this.mean(),r=[],i=1;i<=dim.cols;i++){var meanDiff=this.col(i).subtract(mMean.e(i));meanDiff=meanDiff.multiply(meanDiff),r.push(Math.sqrt(meanDiff.sum()/dim.rows))}return _vector.Vector.create(r)}},{key:"column",value:function(n){return this.col(n)}},{key:"log",value:function(){return this.map(function(x){return Math.log(x)})}},{key:"minor",value:function(a,b,c,d){for(var elements=[],ni=c,i=void 0,nj=void 0,j=void 0,rows=this.elements.length,cols=this.elements[0].length;ni--;)for(i=c-ni-1,elements[i]=[],nj=d;nj--;)j=d-nj-1,elements[i][j]=this.elements[(a+i-1)%rows][(b+j-1)%cols];return Matrix.create(elements)}},{key:"transpose",value:function(){for(var rows=this.elements.length,cols=this.elements[0].length,elements=[],i=cols,j=void 0;i--;)for(j=rows,elements[i]=[];j--;)elements[i][j]=this.elements[j][i];return Matrix.create(elements)}},{key:"isSquare",value:function(){return this.elements.length===this.elements[0].length}},{key:"max",value:function(){for(var m=0,i=this.elements.length,nj=this.elements[0].length,j=void 0;i--;)for(j=nj;j--;)Math.abs(this.elements[i][j])>Math.abs(m)&&(m=this.elements[i][j]);return m}},{key:"indexOf",value:function(x){var ni=this.elements.length,i=void 0,nj=this.elements[0].length,j=void 0;for(i=0;i<ni;i++)for(j=0;j<nj;j++)if(this.elements[i][j]===x)return{i:i+1,j:j+1};return null}},{key:"diagonal",value:function(){if(!this.isSquare)return null;for(var els=[],n=this.elements.length,i=0;i<n;i++)els.push(this.elements[i][i]);return _vector.Vector.create(els)}},{key:"toRightTriangular",value:function(){var M=this.dup(),els=void 0,n=this.elements.length,i=void 0,j=void 0,np=this.elements[0].length,p=void 0;for(i=0;i<n;i++){if(0===M.elements[i][i])for(j=i+1;j<n;j++)if(0!==M.elements[j][i]){for(els=[],p=0;p<np;p++)els.push(M.elements[i][p]+M.elements[j][p]);M.elements[i]=els;break}if(0!==M.elements[i][i])for(j=i+1;j<n;j++){var multiplier=M.elements[j][i]/M.elements[i][i];for(els=[],p=0;p<np;p++)els.push(p<=i?0:M.elements[j][p]-M.elements[i][p]*multiplier);M.elements[j]=els}}return M}},{key:"toUpperTriangular",value:function(){return this.toRightTriangular()}},{key:"determinant",value:function(){if(!this.isSquare())return null;if(1===this.cols&&1===this.rows)return this.row(1);if(0===this.cols&&0===this.rows)return 1;for(var M=this.toRightTriangular(),det=M.elements[0][0],n=M.elements.length,i=1;i<n;i++)det*=M.elements[i][i];return det}},{key:"det",value:function(){return this.determinant()}},{key:"isSingular",value:function(){return this.isSquare()&&0===this.determinant()}},{key:"trace",value:function(){if(!this.isSquare())return null;for(var tr=this.elements[0][0],n=this.elements.length,i=1;i<n;i++)tr+=this.elements[i][i];return tr}},{key:"tr",value:function(){return this.trace()}},{key:"rank",value:function rank(){for(var M=this.toRightTriangular(),rank=0,i=this.elements.length,nj=this.elements[0].length,j=void 0;i--;)for(j=nj;j--;)if(Math.abs(M.elements[i][j])>_sylvester.Sylvester.precision){rank++;break}return rank}},{key:"rk",value:function(){return this.rank()}},{key:"augment",value:function(matrix){var M=matrix.elements||matrix;"undefined"==typeof M[0][0]&&(M=Matrix.create(M).elements);var T=this.dup(),cols=T.elements[0].length,i=T.elements.length,nj=M[0].length,j=void 0;if(i!==M.length)return null;for(;i--;)for(j=nj;j--;)T.elements[i][cols+j]=M[i][j];return T}},{key:"inverse",value:function(){if(!this.isSquare()||this.isSingular())return null;for(var n=this.elements.length,i=n,j=void 0,M=this.augment(Matrix.I(n)).toRightTriangular(),np=M.elements[0].length,p=void 0,els=void 0,divisor=void 0,inverseElements=[],newElement=void 0;i--;){for(els=[],inverseElements[i]=[],divisor=M.elements[i][i],p=0;p<np;p++)newElement=M.elements[i][p]/divisor,els.push(newElement),p>=n&&inverseElements[i].push(newElement);for(M.elements[i]=els,j=i;j--;){for(els=[],p=0;p<np;p++)els.push(M.elements[j][p]-M.elements[i][p]*M.elements[j][i]);M.elements[j]=els}}return Matrix.create(inverseElements)}},{key:"inv",value:function(){return this.inverse()}},{key:"round",value:function(){return this.map(function(x){return Math.round(x)})}},{key:"snapTo",value:function(x){return this.map(function(p){return Math.abs(p-x)<=_sylvester.Sylvester.precision?x:p})}},{key:"inspect",value:function(){for(var matrixRows=[],n=this.elements.length,i=0;i<n;i++)matrixRows.push(_vector.Vector.create(this.elements[i]).inspect());return matrixRows.join("\n")}},{key:"toArray",value:function(){for(var matrixRows=[],n=this.elements.length,i=0;i<n;i++)matrixRows.push(this.elements[i]);return matrixRows}},{key:"setElements",value:function(els){var i=void 0,j=void 0,elements=els.elements||els;if("undefined"!=typeof elements[0][0]){for(i=elements.length,this.elements=[];i--;)for(j=elements[i].length,this.elements[i]=[];j--;)this.elements[i][j]=elements[i][j];return this}var n=elements.length;for(this.elements=[],i=0;i<n;i++)this.elements.push([elements[i]]);return this}},{key:"maxColumnIndexes",value:function(){for(var maxes=[],i=1;i<=this.rows();i++){for(var max=null,maxIndex=-1,j=1;j<=this.cols();j++)(null===max||this.e(i,j)>max)&&(max=this.e(i,j),maxIndex=j);maxes.push(maxIndex)}return _vector.Vector.create(maxes)}},{key:"maxColumns",value:function(){for(var maxes=[],i=1;i<=this.rows();i++){for(var max=null,j=1;j<=this.cols();j++)(null===max||this.e(i,j)>max)&&(max=this.e(i,j));maxes.push(max)}return _vector.Vector.create(maxes)}},{key:"minColumnIndexes",value:function(){for(var mins=[],i=1;i<=this.rows();i++){for(var min=null,minIndex=-1,j=1;j<=this.cols();j++)(null===min||this.e(i,j)<min)&&(min=this.e(i,j),minIndex=j);mins.push(minIndex)}return _vector.Vector.create(mins)}},{key:"minColumns",value:function(){for(var mins=[],i=1;i<=this.rows();i++){for(var min=null,j=1;j<=this.cols();j++)(null===min||this.e(i,j)<min)&&(min=this.e(i,j));mins.push(min)}return _vector.Vector.create(mins)}},{key:"partialPivot",value:function(k,j,P,A){for(var maxIndex=0,maxValue=0,i=k;i<=A.rows();i++)Math.abs(A.e(i,j))>maxValue&&(maxValue=Math.abs(A.e(k,j)),maxIndex=i);if(maxIndex!==k){var tmp=A.elements[k-1];A.elements[k-1]=A.elements[maxIndex-1],A.elements[maxIndex-1]=tmp,P.elements[k-1][k-1]=0,P.elements[k-1][maxIndex-1]=1,P.elements[maxIndex-1][maxIndex-1]=0,P.elements[maxIndex-1][k-1]=1}return P}},{key:"forwardSubstitute",value:function(b){for(var xa=[],i=1;i<=this.rows();i++){for(var w=0,j=1;j<i;j++)w+=this.e(i,j)*xa[j-1];xa.push((b.e(i)-w)/this.e(i,i))}return _vector.Vector.create(xa)}},{key:"backSubstitute",value:function(b){for(var xa=[],i=this.rows();i>0;i--){for(var w=0,j=this.cols();j>i;j--)w+=this.e(i,j)*xa[this.rows()-j];xa.push((b.e(i)-w)/this.e(i,i))}return _vector.Vector.create(xa.reverse())}},{key:"svdJs",value:function(){for(var A=this,V=Matrix.I(A.rows()),S=A.transpose(),U=Matrix.I(A.cols()),err=Number.MAX_VALUE,i=0,maxLoop=100;err>2.2737e-13&&i<maxLoop;){var qr=S.transpose().qrJs();S=qr.R,V=V.x(qr.Q),qr=S.transpose().qrJs(),U=U.x(qr.Q),S=qr.R;var e=S.triu(1).unroll().norm(),f=S.diagonal().norm();0===f&&(f=1),err=e/f,i++}for(var ss=S.diagonal(),s=[],_i2=1;_i2<=ss.cols();_i2++){var ssn=ss.e(_i2);if(s.push(Math.abs(ssn)),ssn<0)for(var j=0;j<U.rows();j++)V.elements[j][_i2-1]=-V.elements[j][_i2-1]}return{U:U,S:_vector.Vector.create(s).toDiagonalMatrix(),V:V}}},{key:"svdPack",value:function(){var result=lapack.sgesvd("A","A",this.elements);return{U:Matrix.create(result.U),S:Matrix.create(result.S).column(1).toDiagonalMatrix(),V:Matrix.create(result.VT).transpose()}}},{key:"qrJs",value:function(){for(var m=this.rows(),n=this.cols(),Q=Matrix.I(m),A=this,k=1;k<Math.min(m,n);k++){for(var ak=A.slice(k,0,k,k).col(1),oneZero=[1];oneZero.length<=m-k;)oneZero.push(0);oneZero=_vector.Vector.create(oneZero);var vk=ak.add(oneZero.x(ak.norm()*sign(ak.e(1)))),Vk=Matrix.create(vk),Hk=Matrix.I(m-k+1).subtract(Vk.x(2).x(Vk.transpose()).div(Vk.transpose().x(Vk).e(1,1))),Qk=identSize(Hk,m,n,k);A=Qk.x(A),Q=Q.x(Qk)}return{Q:Q,R:A}}},{key:"qrPack",value:function(){var qr=lapack.qr(this.elements);return{Q:Matrix.create(qr.Q),R:Matrix.create(qr.R)}}},{key:"luPack",value:function(){var lu=lapack.lu(this.elements);return{L:Matrix.create(lu.L),U:Matrix.create(lu.U),P:Matrix.create(lu.P)}}},{key:"luJs",value:function(){for(var A=this.dup(),L=Matrix.I(A.rows()),P=Matrix.I(A.rows()),U=Matrix.Zeros(A.rows(),A.cols()),p=1,k=1;k<=Math.min(A.cols(),A.rows());k++){P=A.partialPivot(k,p,P,A,L);for(var i=k+1;i<=A.rows();i++){var l=A.e(i,p)/A.e(k,p);L.elements[i-1][k-1]=l;for(var j=k+1;j<=A.cols();j++)A.elements[i-1][j-1]-=A.e(k,j)*l}for(var _j=k;_j<=A.cols();_j++)U.elements[k-1][_j-1]=A.e(k,_j);p<A.cols()&&p++}return{L:L,U:U,P:P}}}],[{key:"create",value:function(aElements){var M=(new Matrix).setElements(aElements);return M}},{key:"I",value:function(n){for(var els=[],i=n,j=void 0;i--;)for(j=n,els[i]=[];j--;)els[i][j]=i===j?1:0;return Matrix.create(els)}},{key:"loadFile",value:function(file){for(var contents=fs.readFileSync(file,"utf-8"),matrix=[],rowArray=contents.split("\n"),i=0;i<rowArray.length;i++){var d=rowArray[i].split(",");d.length>1&&matrix.push(d)}var M=new Matrix;return M.setElements(matrix)}},{key:"Diagonal",value:function(elements){for(var i=elements.length,M=Matrix.I(i);i--;)M.elements[i][i]=elements[i];return M}},{key:"Rotation",value:function(theta,a){if(!a)return Matrix.create([[Math.cos(theta),-Math.sin(theta)],[Math.sin(theta),Math.cos(theta)]]);var axis=a.dup();if(3!==axis.elements.length)return null;var mod=axis.modulus(),x=axis.elements[0]/mod,y=axis.elements[1]/mod,z=axis.elements[2]/mod,s=Math.sin(theta),c=Math.cos(theta),t=1-c;return Matrix.create([[t*x*x+c,t*x*y-s*z,t*x*z+s*y],[t*x*y+s*z,t*y*y+c,t*y*z-s*x],[t*x*z-s*y,t*y*z+s*x,t*z*z+c]])}},{key:"RotationX",value:function(t){var c=Math.cos(t),s=Math.sin(t);return Matrix.create([[1,0,0],[0,c,-s],[0,s,c]])}},{key:"RotationY",value:function(t){var c=Math.cos(t),s=Math.sin(t);return Matrix.create([[c,0,s],[0,1,0],[-s,0,c]])}},{key:"RotationZ",value:function(t){var c=Math.cos(t),s=Math.sin(t);return Matrix.create([[c,-s,0],[s,c,0],[0,0,1]])}},{key:"Random",value:function(n,m){return 1===arguments.length&&(m=n),Matrix.Zero(n,m).map(function(){return Math.random()})}},{key:"Fill",value:function(n,m,v){2===arguments.length&&(v=m,m=n);for(var els=[],i=n,j=void 0;i--;)for(j=m,els[i]=[];j--;)els[i][j]=v;return Matrix.create(els)}},{key:"Zero",value:function(n,m){return Matrix.Fill(n,m,0)}},{key:"Zeros",value:function(n,m){return Matrix.Zero(n,m)}},{key:"One",value:function(n,m){return Matrix.Fill(n,m,1)}},{key:"Ones",value:function(n,m){return Matrix.One(n,m)}}]),Matrix}();lapack?(Matrix.prototype.svd=Matrix.prototype.svdPack,Matrix.prototype.qr=Matrix.prototype.qrPack,Matrix.prototype.lu=Matrix.prototype.luPack):(Matrix.prototype.svd=Matrix.prototype.svdJs,Matrix.prototype.qr=Matrix.prototype.qrJs,Matrix.prototype.lu=Matrix.prototype.luJs)},{"./sylvester":9,"./vector":10,fs:1,lapack:1}],8:[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Plane=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_line=require("./line"),_matrix=require("./matrix"),_sylvester=require("./sylvester"),_vector=require("./vector"),Plane=exports.Plane=function(){function Plane(){_classCallCheck(this,Plane)}return _createClass(Plane,[{key:"eql",value:function(plane){return this.contains(plane.anchor)&&this.isParallelTo(plane)}},{key:"dup",value:function(){return Plane.create(this.anchor,this.normal)}},{key:"translate",value:function(vector){var V=vector.elements||vector;return Plane.create([this.anchor.elements[0]+V[0],this.anchor.elements[1]+V[1],this.anchor.elements[2]+(V[2]||0)],this.normal)}},{key:"isParallelTo",value:function(obj){var theta=void 0;return obj.normal?(theta=this.normal.angleFrom(obj.normal),Math.abs(theta)<=_sylvester.Sylvester.precision||Math.abs(Math.PI-theta)<=_sylvester.Sylvester.precision):obj.direction?this.normal.isPerpendicularTo(obj.direction):null}},{key:"isPerpendicularTo",value:function(plane){var theta=this.normal.angleFrom(plane.normal);return Math.abs(Math.PI/2-theta)<=_sylvester.Sylvester.precision}},{key:"distanceFrom",value:function(obj){if(this.intersects(obj)||this.contains(obj))return 0;if(obj.anchor){var _A=this.anchor.elements,B=obj.anchor.elements,_N=this.normal.elements;return Math.abs((_A[0]-B[0])*_N[0]+(_A[1]-B[1])*_N[1]+(_A[2]-B[2])*_N[2])}var P=obj.elements||obj,A=this.anchor.elements,N=this.normal.elements;return Math.abs((A[0]-P[0])*N[0]+(A[1]-P[1])*N[1]+(A[2]-(P[2]||0))*N[2])}},{key:"contains",value:function(obj){if(obj.normal)return null;if(obj.direction)return this.contains(obj.anchor)&&this.contains(obj.anchor.add(obj.direction));var P=obj.elements||obj,A=this.anchor.elements,N=this.normal.elements,diff=Math.abs(N[0]*(A[0]-P[0])+N[1]*(A[1]-P[1])+N[2]*(A[2]-(P[2]||0)));return diff<=_sylvester.Sylvester.precision}},{key:"intersects",value:function(obj){return"undefined"==typeof obj.direction&&"undefined"==typeof obj.normal?null:!this.isParallelTo(obj)}},{key:"intersectionWith",value:function(obj){if(!this.intersects(obj))return null;if(obj.direction){var A=obj.anchor.elements,D=obj.direction.elements,P=this.anchor.elements,N=this.normal.elements,multiplier=(N[0]*(P[0]-A[0])+N[1]*(P[1]-A[1])+N[2]*(P[2]-A[2]))/(N[0]*D[0]+N[1]*D[1]+N[2]*D[2]);return _vector.Vector.create([A[0]+D[0]*multiplier,A[1]+D[1]*multiplier,A[2]+D[2]*multiplier])}if(obj.normal){for(var direction=this.normal.cross(obj.normal).toUnitVector(),_N2=this.normal.elements,_A2=this.anchor.elements,O=obj.normal.elements,B=obj.anchor.elements,solver=_matrix.Matrix.Zero(2,2),i=0;solver.isSingular();)i++,solver=_matrix.Matrix.create([[_N2[i%3],_N2[(i+1)%3]],[O[i%3],O[(i+1)%3]]]);for(var inverse=solver.inverse().elements,x=_N2[0]*_A2[0]+_N2[1]*_A2[1]+_N2[2]*_A2[2],y=O[0]*B[0]+O[1]*B[1]+O[2]*B[2],intersection=[inverse[0][0]*x+inverse[0][1]*y,inverse[1][0]*x+inverse[1][1]*y],anchor=[],j=1;j<=3;j++)anchor.push(i===j?0:intersection[(j+(5-i)%3)%3]);return _line.Line.create(anchor,direction)}return null}},{key:"pointClosestTo",value:function(point){var P=point.elements||point,A=this.anchor.elements,N=this.normal.elements,dot=(A[0]-P[0])*N[0]+(A[1]-P[1])*N[1]+(A[2]-(P[2]||0))*N[2];return _vector.Vector.create([P[0]+N[0]*dot,P[1]+N[1]*dot,(P[2]||0)+N[2]*dot])}},{key:"rotate",value:function(t,line){var R=t.determinant?t.elements:_matrix.Matrix.Rotation(t,line.direction).elements,C=line.pointClosestTo(this.anchor).elements,A=this.anchor.elements,N=this.normal.elements,C1=C[0],C2=C[1],C3=C[2],A1=A[0],A2=A[1],A3=A[2],x=A1-C1,y=A2-C2,z=A3-C3;return Plane.create([C1+R[0][0]*x+R[0][1]*y+R[0][2]*z,C2+R[1][0]*x+R[1][1]*y+R[1][2]*z,C3+R[2][0]*x+R[2][1]*y+R[2][2]*z],[R[0][0]*N[0]+R[0][1]*N[1]+R[0][2]*N[2],R[1][0]*N[0]+R[1][1]*N[1]+R[1][2]*N[2],R[2][0]*N[0]+R[2][1]*N[1]+R[2][2]*N[2]])}},{key:"reflectionIn",value:function(obj){if(obj.normal){var A=this.anchor.elements,N=this.normal.elements,A1=A[0],A2=A[1],A3=A[2],N1=N[0],N2=N[1],N3=N[2],newA=this.anchor.reflectionIn(obj).elements,AN1=A1+N1,AN2=A2+N2,AN3=A3+N3,Q=obj.pointClosestTo([AN1,AN2,AN3]).elements,newN=[Q[0]+(Q[0]-AN1)-newA[0],Q[1]+(Q[1]-AN2)-newA[1],Q[2]+(Q[2]-AN3)-newA[2]];return Plane.create(newA,newN)}if(obj.direction)return this.rotate(Math.PI,obj);var P=obj.elements||obj;return Plane.create(this.anchor.reflectionIn([P[0],P[1],P[2]||0]),this.normal)}},{key:"setVectors",value:function(anchor,v1,v2){if(anchor=_vector.Vector.create(anchor),anchor=anchor.to3D(),null===anchor)return null;if(v1=_vector.Vector.create(v1),v1=v1.to3D(),null===v1)return null;if("undefined"==typeof v2)v2=null;else if(v2=_vector.Vector.create(v2),v2=v2.to3D(),null===v2)return null;var A1=anchor.elements[0],A2=anchor.elements[1],A3=anchor.elements[2],v11=v1.elements[0],v12=v1.elements[1],v13=v1.elements[2],normal=void 0,mod=void 0;if(null===v2){if(mod=Math.sqrt(v11*v11+v12*v12+v13*v13),0===mod)return null;normal=_vector.Vector.create([v1.elements[0]/mod,v1.elements[1]/mod,v1.elements[2]/mod])}else{var v21=v2.elements[0],v22=v2.elements[1],v23=v2.elements[2];if(normal=_vector.Vector.create([(v12-A2)*(v23-A3)-(v13-A3)*(v22-A2),(v13-A3)*(v21-A1)-(v11-A1)*(v23-A3),(v11-A1)*(v22-A2)-(v12-A2)*(v21-A1)]),mod=normal.modulus(),0===mod)return null;normal=_vector.Vector.create([normal.elements[0]/mod,normal.elements[1]/mod,normal.elements[2]/mod])}return this.anchor=anchor,this.normal=normal,this}}],[{key:"create",value:function(anchor,v1,v2){var P=new Plane;return P.setVectors(anchor,v1,v2)}},{key:"fromPoints",value:function(points){var np=points.length,list=[],i=void 0,P=void 0,n=void 0,N=void 0,A=void 0,B=void 0,C=void 0,theta=void 0,prevN=void 0,totalN=_vector.Vector.Zero(3);for(i=0;i<np;i++){if(P=_vector.Vector.create(points[i]).to3D(),null===P)return null;if(list.push(P),n=list.length,n>2){if(A=list[n-1].elements,B=list[n-2].elements,C=list[n-3].elements,N=_vector.Vector.create([(A[1]-B[1])*(C[2]-B[2])-(A[2]-B[2])*(C[1]-B[1]),(A[2]-B[2])*(C[0]-B[0])-(A[0]-B[0])*(C[2]-B[2]),(A[0]-B[0])*(C[1]-B[1])-(A[1]-B[1])*(C[0]-B[0])]).toUnitVector(),n>3&&(theta=N.angleFrom(prevN),null!==theta&&!(Math.abs(theta)<=_sylvester.Sylvester.precision||Math.abs(theta-Math.PI)<=_sylvester.Sylvester.precision)))return null;totalN=totalN.add(N),prevN=N}}A=list[1].elements,B=list[0].elements,C=list[n-1].elements;var D=list[n-2].elements;return totalN=totalN.add(_vector.Vector.create([(A[1]-B[1])*(C[2]-B[2])-(A[2]-B[2])*(C[1]-B[1]),(A[2]-B[2])*(C[0]-B[0])-(A[0]-B[0])*(C[2]-B[2]),(A[0]-B[0])*(C[1]-B[1])-(A[1]-B[1])*(C[0]-B[0])]).toUnitVector()).add(_vector.Vector.create([(B[1]-C[1])*(D[2]-C[2])-(B[2]-C[2])*(D[1]-C[1]),(B[2]-C[2])*(D[0]-C[0])-(B[0]-C[0])*(D[2]-C[2]),(B[0]-C[0])*(D[1]-C[1])-(B[1]-C[1])*(D[0]-C[0])]).toUnitVector()),Plane.create(list[0],totalN)}}]),Plane}();Plane.XY=Plane.YX=Plane.create(_vector.Vector.Zero(3),_vector.Vector.k),Plane.YZ=Plane.ZY=Plane.create(_vector.Vector.Zero(3),_vector.Vector.i),Plane.ZX=Plane.XZ=Plane.create(_vector.Vector.Zero(3),_vector.Vector.j)},{"./line":6,"./matrix":7,"./sylvester":9,"./vector":10}],9:[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});exports.Sylvester={precision:1e-6,approxPrecision:1e-5},exports.DimensionalityMismatchError=function(_Error){function DimensionalityMismatchError(){return _classCallCheck(this,DimensionalityMismatchError),_possibleConstructorReturn(this,(DimensionalityMismatchError.__proto__||Object.getPrototypeOf(DimensionalityMismatchError)).apply(this,arguments))}return _inherits(DimensionalityMismatchError,_Error),DimensionalityMismatchError}(Error)},{}],10:[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Vector=void 0;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_sylvester=require("./sylvester"),_matrix=require("./matrix"),Vector=exports.Vector=function(){function Vector(elements){_classCallCheck(this,Vector),this.elements=elements}return _createClass(Vector,[{key:"magnitude",value:function(){for(var sum=0,i=0;i<this.elements.length;i++)sum+=this.elements[i]*this.elements[i];return Math.sqrt(sum)}},{key:"e",value:function(i){return i<1||i>this.elements.length?null:this.elements[i-1]}},{key:"dimensions",value:function(){return{rows:1,cols:this.elements.length}}},{key:"rows",value:function(){return 1}},{key:"cols",value:function(){return this.elements.length}},{key:"eql",value:function(vector){var n=this.elements.length,V=vector.elements||vector;if(n!==V.length)return!1;for(;n--;)if(Math.abs(this.elements[n]-V[n])>_sylvester.Sylvester.precision)return!1;return!0}},{key:"map",value:function(fn){for(var n=this.elements.length,elements=new Array(n),i=0;i<n;i++)elements[i]=fn(this.elements[i],i+1);return new Vector(elements)}},{key:"each",value:function(fn){for(var n=this.elements.length,i=0;i<n;i++)fn(this.elements[i],i+1)}},{key:"toUnitVector",value:function(){var r=this.modulus();return 0===r?this.dup():this.map(function(x){return x/r})}},{key:"angleFrom",value:function(vector){var V=vector.elements||vector,n=this.elements.length;if(n!==V.length)throw new _sylvester.DimensionalityMismatchError("Cannot compute the angle between vectors with different dimensionality");var dot=0,mod1=0,mod2=0;if(this.each(function(x,i){dot+=x*V[i-1],mod1+=x*x,mod2+=V[i-1]*V[i-1]}),mod1=Math.sqrt(mod1),mod2=Math.sqrt(mod2),mod1*mod2===0)return NaN;var theta=dot/(mod1*mod2);return theta<-1&&(theta=-1),theta>1&&(theta=1),Math.acos(theta)}},{key:"isParallelTo",value:function(vector){var angle=this.angleFrom(vector);return null!==angle&&angle<=_sylvester.Sylvester.precision}},{key:"isAntiparallelTo",value:function(vector){var angle=this.angleFrom(vector);return null!==angle&&Math.abs(angle-Math.PI)<=_sylvester.Sylvester.precision}},{key:"isPerpendicularTo",value:function(vector){return Math.abs(this.dot(vector))<=_sylvester.Sylvester.precision}},{key:"_runBinaryOp",value:function(value,operator){if("number"==typeof value)return this.map(function(v){return operator(v,value)});var values=value.elements||value;if(this.elements.length!==values.length)throw new _sylvester.DimensionalityMismatchError("Cannot add vectors with different dimensions.");return this.map(function(x,i){return operator(x,values[i-1])})}},{key:"add",value:function(value){return this._runBinaryOp(value,function(a,b){return a+b})}},{key:"subtract",value:function(value){return this._runBinaryOp(value,function(a,b){return a-b})}},{key:"multiply",value:function(value){return this._runBinaryOp(value,function(a,b){return a*b})}},{key:"sum",value:function sum(){var sum=0;return this.each(function(x){sum+=x}),sum}},{key:"chomp",value:function(n){for(var elements=[],i=n;i<this.elements.length;i++)elements.push(this.elements[i]);return Vector.create(elements)}},{key:"top",value:function(n){for(var elements=[],i=0;i<n;i++)elements.push(this.elements[i]);return Vector.create(elements)}},{key:"augment",value:function(elements){return Vector.create(this.elements.concat(elements.elements||elements))}},{key:"x",value:function(k){return this.multiply(k)}},{key:"log",value:function(){return Vector.log(this)}},{key:"product",value:function(){var p=1;return this.each(function(v){p*=v}),p}},{key:"dot",value:function(vector){var V=vector.elements||vector,n=this.elements.length;if(n!==V.length)throw new _sylvester.DimensionalityMismatchError("Cannot compute the dot product of vectors with different dimensionality");for(var product=0;n--;)product+=this.elements[n]*V[n];return product}},{key:"cross",value:function(vector){var B=vector.elements||vector;if(3!==this.elements.length||3!==B.length)return null;var A=this.elements;return Vector.create([A[1]*B[2]-A[2]*B[1],A[2]*B[0]-A[0]*B[2],A[0]*B[1]-A[1]*B[0]])}},{key:"max",value:function(){for(var m=0,i=this.elements.length;i--;)Math.abs(this.elements[i])>Math.abs(m)&&(m=this.elements[i]);return m}},{key:"maxIndex",value:function maxIndex(){for(var m=0,i=this.elements.length,maxIndex=-1;i--;)Math.abs(this.elements[i])>Math.abs(m)&&(m=this.elements[i],maxIndex=i+1);return maxIndex}},{key:"indexOf",value:function(x){for(var index=null,n=this.elements.length,i=0;i<n;i++)null===index&&this.elements[i]===x&&(index=i+1);return index}},{key:"toDiagonalMatrix",value:function(){return _matrix.Matrix.Diagonal(this.elements)}},{key:"round",value:function(){return this.map(function(x){return Math.round(x)})}},{key:"transpose",value:function(){for(var rows=this.elements.length,elements=[],i=0;i<rows;i++)elements.push([this.elements[i]]);return _matrix.Matrix.create(elements)}},{key:"snapTo",value:function(x){return this.map(function(y){return Math.abs(y-x)<=_sylvester.Sylvester.precision?x:y})}},{key:"distanceFrom",value:function(obj){if(obj.anchor||obj.start&&obj.end)return obj.distanceFrom(this);var V=obj.elements||obj;if(V.length!==this.elements.length)return null;var sum=0,part=void 0;return this.each(function(x,i){part=x-V[i-1],sum+=part*part}),Math.sqrt(sum)}},{key:"liesOn",value:function(line){return line.contains(this)}},{key:"liesIn",value:function(plane){return plane.contains(this)}},{key:"rotate",value:function(t,obj){var V=void 0,R=null,x=void 0,y=void 0,z=void 0,C=void 0;switch(t.determinant&&(R=t.elements),this.elements.length){case 2:return V=obj.elements||obj,2!==V.length?null:(R||(R=_matrix.Matrix.Rotation(t).elements),x=this.elements[0]-V[0],y=this.elements[1]-V[1],Vector.create([V[0]+R[0][0]*x+R[0][1]*y,V[1]+R[1][0]*x+R[1][1]*y]));case 3:return obj.direction?(C=obj.pointClosestTo(this).elements,R||(R=_matrix.Matrix.Rotation(t,obj.direction).elements),x=this.elements[0]-C[0],y=this.elements[1]-C[1],z=this.elements[2]-C[2],Vector.create([C[0]+R[0][0]*x+R[0][1]*y+R[0][2]*z,C[1]+R[1][0]*x+R[1][1]*y+R[1][2]*z,C[2]+R[2][0]*x+R[2][1]*y+R[2][2]*z])):null;default:return null}}},{key:"reflectionIn",value:function(obj){if(obj.anchor){var P=this.elements.slice(),C=obj.pointClosestTo(P).elements;return Vector.create([C[0]+(C[0]-P[0]),C[1]+(C[1]-P[1]),C[2]+(C[2]-(P[2]||0))])}var Q=obj.elements||obj;return this.elements.length!==Q.length?null:this.map(function(x,i){return Q[i-1]+(Q[i-1]-x)})}},{key:"to3D",value:function(){var V=this.dup();switch(V.elements.length){case 3:break;case 2:V.elements.push(0);break;default:return null}return V}},{key:"inspect",value:function(){return"Vector<["+this.elements.join(", ")+"]>"}},{key:"setElements",value:function(els){return this.elements=(els.elements||els).slice(),this}},{key:"toJSON",value:function(){return this.elements}}],[{key:"create",value:function(elements){var V=new Vector;return V.setElements(elements)}},{key:"Random",value:function(n){for(var elements=[];n--;)elements.push(Math.random());return Vector.create(elements)}},{key:"Fill",value:function(n,v){for(var elements=[];n--;)elements.push(v);return Vector.create(elements)}},{key:"Zero",value:function(n){return Vector.Fill(n,0)}},{key:"One",value:function(n){return Vector.Fill(n,1)}},{key:"log",value:function(v){return v.map(function(x){return Math.log(x)})}}]),Vector}();Vector.i=Vector.create([1,0,0]),Vector.j=Vector.create([0,1,0]),Vector.k=Vector.create([0,0,1]),Vector.prototype.modulus=Vector.prototype.magnitude,Vector.prototype.norm=Vector.prototype.magnitude,Vector.prototype.dup=function(){return this.map(function(x){return x})}},{"./matrix":7,"./sylvester":9}],11:[function(require,module,exports){module.exports=function(){this.argname,this.argexpr}},{}],12:[function(require,module,exports){
|
||
module.exports=function(){this.argnames=[],this.argexpr=[]}},{}],13:[function(require,module,exports){function CSGModule(factory,csgOperation){this.csgOperation=csgOperation,this.factory=factory}var Context=require("./Context"),_=(require("./Globals"),require("lodash"));CSGModule.prototype.evaluate=function(parentContext,inst){for(var context=new Context(parentContext),childModules=[],i=0;i<inst.children.length;i++){var childInst=inst.children[i];childInst.argvalues=[],_.each(childInst.argexpr,function(expr,index,list){childInst.argvalues.push(expr.evaluate(context))});var childAdaptor=this.factory.getAdaptor(childInst),evaluatedChild=childAdaptor.evaluate(parentContext,childInst);void 0!==evaluatedChild&&childModules.push(evaluatedChild)}return childModules.length<=1?childModules[0]:childModules[0]+"."+this.csgOperation+"(["+childModules.slice(1).join(",\n")+"])"},module.exports=CSGModule},{"./Context":15,"./Globals":19,lodash:2}],14:[function(require,module,exports){function Child(factory){this.factory=factory}var _=require("lodash"),Context=require("./Context"),Globals=require("./Globals");Child.prototype.evaluate=function(parentContext,inst){inst.argvalues=[],_.each(inst.argexpr,function(expr,index,list){inst.argvalues.push(expr.evaluate(parentContext))});var childIndex=(Context.newContext(parentContext,[],[],inst),0);void 0!==inst.argvalues[0]&&(childIndex=inst.argvalues[0]);for(var evaluatedChildren=[],i=Globals.context_stack.length-1;i>=0;i--){var ctx=Globals.context_stack[i];if(void 0!==ctx.inst_p){if(childIndex<ctx.inst_p.children.length){var childInst=ctx.inst_p.children[childIndex];_.each(childInst.argexpr,function(expr,index,list){childInst.argvalues.push(expr.evaluate(ctx.inst_p.ctx))});var childAdaptor=this.factory.getAdaptor(childInst);evaluatedChildren.push(childAdaptor.evaluate(ctx.inst_p.ctx,childInst))}return evaluatedChildren}ctx=ctx.parentContext}},module.exports=Child},{"./Context":15,"./Globals":19,lodash:2}],15:[function(require,module,exports){function Context(parentContext){this.vars=parentContext?{}:{$fn:Globals.FN_DEFAULT,$fs:Globals.FS_DEFAULT,$fa:Globals.FA_DEFAULT},this.parentContext=parentContext,this.inst_p,this.functions_p={},this.modules_p={},Globals.context_stack.push(this)}function rad2deg(rad){return rad*(180/Math.PI)}function deg2rad(deg){return deg*Math.PI/180}var _=require("lodash"),Globals=require("./Globals");Context.prototype.setVariable=function(name,value){void 0!==value&&(this.vars[name]=value)},Context.prototype.args=function(argnames,argexpr,call_argnames,call_argvalues){for(var i=0;i<argnames.length;i++)i<argexpr.length&&void 0!==argexpr[i]?this.setVariable(argnames[i],argexpr[i].evaluate(this.parentContext)):this.setVariable(argnames[i],void 0);for(var posarg=0,i=0;i<call_argnames.length;i++)void 0===call_argnames[i]?posarg<argnames.length&&this.setVariable(argnames[posarg++],call_argvalues[i]):this.setVariable(call_argnames[i],call_argvalues[i])},Context.prototype.lookupVariable=function(name){return _.has(this.vars,name)?this.vars[name]:void 0!==this.parentContext?this.parentContext.lookupVariable(name):void 0},Context.prototype.evaluateFunction=function(name,argnames,argvalues){return _.has(this.functions_p,name)?this.functions_p[name].evaluate(this,argnames,argvalues):_.has(functionNameLookup,name)?functionNameLookup[name].apply(this,argvalues):void 0!==this.parentContext?this.parentContext.evaluateFunction(name,argnames,argvalues):void console.log("WARNING: Ignoring unknown function '"+name+"'.")},Context.prototype.evaluateModule=function(inst,factory){var customModule=_.find(this.modules_p,function(x){return x.name==inst.name});if(void 0!==customModule)return customModule.evaluate(this,inst);if(void 0===inst.isSubmodule||!inst.isSubmodule){var adaptor=factory.getAdaptor(inst);if(void 0!==adaptor)return adaptor.evaluate(this,inst)}return this.parentContext?this.parentContext.evaluateModule(inst,factory):void console.log("WARNING: Ignoring unknown module: "+inst.name)},Context.newContext=function(parentContext,argnames,argexpr,inst){var context=new Context(parentContext);return context.args(argnames,argexpr,inst.argnames,inst.argvalues),context},Context.contextVariableLookup=function(context,name,defaultValue){var val=context.lookupVariable(name);return void 0===val&&(val=defaultValue),val},Context.printContext=function(c){console.log(c.vars),c.parentContext&&Context.printContext(c.parentContext)},Context.get_fragments_from_r=function(r,context){var fn=Context.contextVariableLookup(context,"$fn",Globals.FN_DEFAULT),fs=Context.contextVariableLookup(context,"$fs",Globals.FS_DEFAULT),fa=Context.contextVariableLookup(context,"$fa",Globals.FA_DEFAULT),GRID_FINE=1e-6;return r<GRID_FINE?0:fn>0?parseInt(fn):parseInt(Math.ceil(Math.max(Math.min(360/fa,2*r*Math.PI/fs),5)))};var functionNameLookup={cos:function(degree){if(!_.isUndefined(degree)&&!_.isNaN(degree))return Math.cos(deg2rad(degree))},sin:function(degree){if(!_.isUndefined(degree)&&!_.isNaN(degree))return Math.sin(deg2rad(degree))},acos:function(degree){if(!_.isUndefined(degree)&&!_.isNaN(degree))return rad2deg(Math.acos(degree))},asin:function(degree){if(!_.isUndefined(degree)&&!_.isNaN(degree))return rad2deg(Math.asin(degree))},atan:function(degree){if(!_.isUndefined(degree)&&!_.isNaN(degree))return rad2deg(Math.atan(degree))},atan2:function(x,y){if(!(_.isUndefined(x)||_.isNaN(x)||_.isUndefined(y)||_.isNaN(y)))return rad2deg(Math.atan2(x,y))},tan:function(degree){if(!_.isUndefined(degree)&&!_.isNaN(degree))return Math.tan(deg2rad(degree))},rands:function(min_value,max_value,value_count,seed_value){var values=[];void 0!==seed_value&&Math.seedrandom(seed_value);for(var i=0;i<value_count;i++){var random_value=min_value+Math.random()*(max_value-min_value);values[i]=random_value}return values},round:function(x){if(!_.isUndefined(x)&&!_.isNaN(x))return x<0?-Math.round(Math.abs(x)):Math.round(x)},exp:function(x){if(!_.isUndefined(x)&&!_.isNaN(x))return Math.exp(x)},abs:function(x){if(!_.isUndefined(x)&&!_.isNaN(x))return Math.abs(x)},max:function(){return Math.max.apply(null,_.map(arguments,function(num){return num?num:-(1/0)}))},min:function(){return Math.min.apply(null,_.map(arguments,function(num){return num?num:1/0}))},pow:function(x){if(!_.isUndefined(x)&&!_.isNaN(x))return Math.pow(x)},ln:function(x){if(!_.isUndefined(x)&&!_.isNaN(x))return Math.log(x)},ceil:function(x){if(!_.isUndefined(x)&&!_.isNaN(x))return Math.ceil(x)},floor:function(x){if(!_.isUndefined(x)&&!_.isNaN(x))return Math.floor(x)},sqrt:function(x){if(!_.isUndefined(x)&&!_.isNaN(x))return Math.sqrt(x)},len:function(x){if(!_.isUndefined(x)&&!_.isNaN(x)){var y=_.isString(x)?Globals.stripString(x):x;return y.length}},log:function(){if(2==arguments.length){if(_.isUndefined(arguments[0])||_.isNaN(arguments[0])||_.isUndefined(arguments[1])||_.isNaN(arguments[1]))return;return Math.log(arguments[1])/Math.log(arguments[0])}if(1==arguments.length){if(_.isUndefined(arguments[0])||_.isNaN(arguments[0]))return;return Math.log(arguments[0])/Math.log(10)}},str:function(){var vals=[];return _.each(arguments,function(x){vals.push(Globals.convertForStrFunction(x))}),vals.join("")},sign:function(x){if(!_.isUndefined(x)&&!_.isNaN(x))return x>0?1:x<0?-1:0},lookup:function(){var low_p,low_v,high_p,high_v;if(arguments.length<2)return void console.log("Lookup arguments are invalid. Incorrect parameter count. "+arguments);var p=arguments[0],vector=arguments[1];if(!_.isNumber(p)||!_.isArray(vector)||vector.length<2||vector.length>=2&&!_.isArray(vector[0]))return void console.log("Lookup arguments are invalid. Incorrect parameters. "+arguments);if(2!=vector[0].length)return void console.log("Lookup arguments are invalid. First vector has incorrect number of values. "+p+", "+vector);if(low_p=vector[0][0],low_v=vector[0][1],high_p=low_p,high_v=low_v,_.each(vector.slice(1),function(v){if(2==v.length){var this_p=v[0],this_v=v[1];this_p<=p&&(this_p>low_p||low_p>p)&&(low_p=this_p,low_v=this_v),this_p>=p&&(this_p<high_p||high_p<p)&&(high_p=this_p,high_v=this_v)}}),p<=low_p)return low_v;if(p>=high_p)return high_v;var f=(p-low_p)/(high_p-low_p);return high_v*f+low_v*(1-f)}};module.exports=Context},{"./Globals":19,lodash:2}],16:[function(require,module,exports){function ControlModule(factory){this.factory=factory}function IfStatement(a){ControlModule.call(this,a)}function ForLoopStatement(factory,args){ControlModule.call(this,factory),this.csgOp=args.csgOp,this.evaluatedChildren=[],this.forEval=function(parentEvaluatedChildren,inst,recurs_length,call_argnames,call_argvalues,arg_context){if(this.evaluatedChildren=parentEvaluatedChildren,call_argnames.length>recurs_length){var it_name=call_argnames[recurs_length],it_values=call_argvalues[recurs_length],context=new Context(arg_context);if(it_values instanceof Range){var range=it_values;if(range.end<range.begin){var t=range.begin;range.begin=range.end,range.end=t}if(range.step>0&&(range.begin-range.end)/range.step<1e4)for(var i=range.begin;i<=range.end;i+=range.step)context.setVariable(it_name,i),this.forEval(this.evaluatedChildren,inst,recurs_length+1,call_argnames,call_argvalues,context)}else if(_.isArray(it_values))for(var i=0;i<it_values.length;i++)context.setVariable(it_name,it_values[i]),this.forEval(this.evaluatedChildren,inst,recurs_length+1,call_argnames,call_argvalues,context)}else if(recurs_length>0){var evaluatedInstanceChildren=inst.evaluateChildren(arg_context);_.isArray(evaluatedInstanceChildren)?this.evaluatedChildren=this.evaluatedChildren.concat(evaluatedInstanceChildren):this.evaluatedChildren.push(evaluatedInstanceChildren)}if(_.isArray(this.evaluatedChildren)&&(this.evaluatedChildren=_.reject(this.evaluatedChildren,function(x){return _.isEmpty(x)})),_.isArray(this.evaluatedChildren)&&this.evaluatedChildren.length>1){var unionedEvaluatedChildren=_.first(this.evaluatedChildren)+"."+this.csgOp+"(["+_.tail(this.evaluatedChildren)+"])";this.evaluatedChildren=[unionedEvaluatedChildren]}return this.evaluatedChildren}}function Echo(a){ControlModule.call(this,a)}var _=require("lodash"),Context=require("./Context"),Globals=require("./Globals"),Range=require("./Range");IfStatement.prototype.evaluate=function(parentContext,inst){inst.argvalues=[],_.each(inst.argexpr,function(expr,index,list){inst.argvalues.push(expr.evaluate(parentContext))});for(var context=Context.newContext(parentContext,[],[],inst),childrenToEvaluate=inst.argvalues.length>0&&inst.argvalues[0]?inst.children:inst.else_children,childModules=[],i=0;i<childrenToEvaluate.length;i++){var childInst=childrenToEvaluate[i];childInst.argvalues=[],_.each(childInst.argexpr,function(expr,index,list){childInst.argvalues.push(expr.evaluate(context))});var childAdaptor=this.factory.getAdaptor(childInst);childModules.push(childAdaptor.evaluate(context,childInst))}return _.isEmpty(childModules)?void 0:childModules.length>1?_.first(childModules)+".union(["+_.tail(childModules)+"])":childModules[0]},ForLoopStatement.prototype.evaluate=function(context,inst){return void 0===inst.context&&(inst.context=context),this.forEval([],inst,0,inst.argnames,inst.argvalues,inst.context)},Echo.prototype.evaluate=function(parentContext,inst){var context=new Context(parentContext),argvalues=[];_.each(inst.argexpr,function(expr,index,list){argvalues.push(Globals.convertForStrFunction(expr.evaluate(context)))}),console.log(_.template("ECHO: <%=argvalues%>")({argvalues:argvalues}))},module.exports={Echo:Echo,ForLoopStatement:ForLoopStatement,IfStatement:IfStatement}},{"./Context":15,"./Globals":19,"./Range":28,lodash:2}],17:[function(require,module,exports){function Expression(value){this.children=[],this.const_value=value,this.var_name,this.call_funcname,this.call_argnames=[],this.type="C"}function isMatrix(x){return _.isArray(x)&&_.isArray(x[0])}function isVector(x){return _.isArray(x)&&!_.isArray(x[0])}function getValueObject(x){return isMatrix(x)?Sylvester.$M(x):isVector(x)?Sylvester.$V(x):x}var Range=require("./Range"),Sylvester=require("sylvester"),_=require("lodash");Sylvester.Matrix.prototype.toString=function(){var x=_.map(this.elements,function(y){return"["+y.join(",")+"]"});return"["+x.join(",")+"]"},Sylvester.Vector.prototype.toString=function(){return"["+this.elements.join(",")+"]"},Expression.prototype.evaluate=function(context){switch(this.type){case"!":return!this.children[0].evaluate(context);case"&&":var c1=this.children[0].evaluate(context),c2=this.children[1].evaluate(context);return!(_.isUndefined(c1)||_.isUndefined(c2)||_.isNaN(c1)||_.isNaN(c2))&&(!(!_.isArray(c1)&&!_.isArray(c2))||c1&&c2);case"||":var c1=this.children[0].evaluate(context),c2=this.children[1].evaluate(context);return!!(_.isUndefined(c1)||_.isUndefined(c2)||_.isNaN(c1)||_.isNaN(c2))||(!(!_.isArray(c1)&&!_.isArray(c2))||(c1||c2));case"*":var c1=this.children[0].evaluate(context),c2=this.children[1].evaluate(context);if(_.isUndefined(c1)||_.isUndefined(c2)||_.isNaN(c1)||_.isNaN(c2))return;if(_.isArray(c1)||_.isArray(c2)){var v1=getValueObject(c1),v2=getValueObject(c2);return isVector(c1)&&isVector(c2)?v1.dot(v2):isVector(c1)&&isMatrix(c2)?[v1.dot(v2.col(1)),v1.dot(v2.col(2)),v1.dot(v2.col(3))]:_.isNumber(c1)?v2.multiply(v1):v1.multiply(v2)}return c1*c2;case"/":var c1=this.children[0].evaluate(context),c2=this.children[1].evaluate(context);if(_.isUndefined(c1)||_.isUndefined(c2)||_.isNaN(c1)||_.isNaN(c2))return;if(_.isArray(c1)||_.isArray(c2)){var v1=getValueObject(c1),v2=getValueObject(c2);if(_.isArray(c1)&&_.isArray(c2))return;if(isMatrix(c1)&&_.isNumber(c2))return v1.multiply(1/v2);if(_.isNumber(c1)&&isMatrix(c2)){for(var result=[],i=0;i<c2.length;i++){for(var a1=[],j=0;j<c2[i].length;j++)a1[j]=c1/c2[i][j];result.push(a1)}return result}if(isVector(c1)&&_.isNumber(c2))return v1.multiply(1/v2);if(_.isNumber(c1)&&isVector(c2))return v2.multiply(1/v1)}return c1/c2;case"%":var c1=this.children[0].evaluate(context),c2=this.children[1].evaluate(context);if(_.isUndefined(c1)||_.isUndefined(c2)||_.isNaN(c1)||_.isNaN(c2))return;if(_.isArray(c1)||_.isArray(c2))return;return c1%c2;case"+":var c1=this.children[0].evaluate(context),c2=this.children[1].evaluate(context);if(_.isUndefined(c1)||_.isUndefined(c2)||_.isNaN(c1)||_.isNaN(c2))return;if(_.isArray(c1)&&_.isArray(c2)){if(isMatrix(c1)&&isMatrix(c2)){for(var minLength=Math.min(c1.length,c2.length),result=[],i=0;i<minLength;i++){for(var a1=[],j=0;j<c1[i].length;j++)a1[j]=c1[i][j]+c2[i][j];result.push(a1)}return result}if(isMatrix(c1)||isMatrix(c2))return;return[c1[0]+c2[0],c1[1]+c2[1],c1[2]+c2[2]]}return _.isArray(c1)||_.isArray(c2)?void 0:c1+c2;case"-":var c1=this.children[0].evaluate(context),c2=this.children[1].evaluate(context);if(_.isUndefined(c1)||_.isUndefined(c2)||_.isNaN(c1)||_.isNaN(c2))return;if(_.isArray(c1)&&_.isArray(c2)){if(_.isArray(c1[0])&&_.isArray(c2[0])){for(var minLength=Math.min(c1.length,c2.length),result=[],i=0;i<minLength;i++){for(var a1=[],j=0;j<c1[i].length;j++)a1[j]=c1[i][j]-c2[i][j];result.push(a1)}return result}return[c1[0]-c2[0],c1[1]-c2[1],c1[2]-c2[2]]}return _.isArray(c1)||_.isArray(c2)?void 0:c1-c2;case"<":var c1=this.children[0].evaluate(context),c2=this.children[1].evaluate(context);return!(_.isUndefined(c1)||_.isUndefined(c2)||_.isNaN(c1)||_.isNaN(c2))&&(!_.isArray(c1)&&!_.isArray(c2)&&c1<c2);case"<=":var c1=this.children[0].evaluate(context),c2=this.children[1].evaluate(context);return!!(_.isUndefined(c1)||_.isUndefined(c2)||_.isNaN(c1)||_.isNaN(c2))||(!(!_.isArray(c1)&&!_.isArray(c2))||c1<=c2);case"==":var c1=this.children[0].evaluate(context),c2=this.children[1].evaluate(context);if(_.isUndefined(c1)||_.isUndefined(c2)||_.isNaN(c1)||_.isNaN(c2))return!1;if(isVector(c1)&&isVector(c2)||isMatrix(c1)&&isMatrix(c2)){var v1=getValueObject(c1),v2=getValueObject(c2);return v1.eql(v2)}return!_.isArray(c1)&&!_.isArray(c2)&&c1==c2;case"!=":var c1=this.children[0].evaluate(context),c2=this.children[1].evaluate(context);if(_.isUndefined(c1)||_.isUndefined(c2)||_.isNaN(c1)||_.isNaN(c2))return!1;if(isVector(c1)&&isVector(c2)||isMatrix(c1)&&isMatrix(c2)){var v1=getValueObject(c1),v2=getValueObject(c2);return!v1.eql(v2)}return!(!_.isArray(c1)&&!_.isArray(c2))||c1!=c2;case">=":var c1=this.children[0].evaluate(context),c2=this.children[1].evaluate(context);return!!(_.isUndefined(c1)||_.isUndefined(c2)||_.isNaN(c1)||_.isNaN(c2))||(!(!_.isArray(c1)&&!_.isArray(c2))||c1>=c2);case">":var c1=this.children[0].evaluate(context),c2=this.children[1].evaluate(context);return!(_.isUndefined(c1)||_.isUndefined(c2)||_.isNaN(c1)||_.isNaN(c2))&&(!_.isArray(c1)&&!_.isArray(c2)&&c1>c2);case"?:":var v=this.children[0].evaluate(context);return this.children[v?1:2].evaluate(context);case"I":var c1=this.children[0].evaluate(context);return _.isArray(c1)?_.map(c1,function(x){return-x}):-c1;case"C":return this.const_value;case"R":var v1=this.children[0].evaluate(context),v2=this.children[1].evaluate(context),v3=this.children[2].evaluate(context);if(_.isNumber(v1)&&_.isNumber(v2)&&_.isNumber(v3))return new Range(v1,v2,v3);return;case"V":for(var vec=[],i=0;i<this.children.length;i++)vec.push(this.children[i].evaluate(context));return vec;case"L":return context.lookupVariable(this.var_name);case"[]":return this.children[0].evaluate(context)[this.children[1].evaluate(context)];case"F":for(var argvalues=[],i=0;i<this.children.length;i++)argvalues.push(this.children[i].evaluate(context));return context.evaluateFunction(this.call_funcname,this.call_argnames,argvalues);default:console.log("todo - evaluate expression",this)}},module.exports=Expression},{"./Range":28,lodash:2,sylvester:5}],18:[function(require,module,exports){function FunctionDef(){this.argnames=[],this.argexpr=[],this.expr}var Context=require("./Context");FunctionDef.prototype.evaluate=function(parentContext,call_argnames,call_argvalues){var context=new Context(parentContext);if(context.args(this.argnames,this.argexpr,call_argnames,call_argvalues),void 0!==this.expr)return this.expr.evaluate(context)},module.exports=FunctionDef},{"./Context":15}],19:[function(require,module,exports){function stripString(s){return/^\".*\"$/.test(s)?s.match(/^\"(.*)\"$/)[1]:s}function convertForStrFunction(val){if(_.isString(val))return stripString(val);if(_.isArray(val)){var mapped=_.map(val,function(value,key,list){return convertForStrFunction(value)});return"["+mapped.join(",")+"]"}return val}function preParse(text){return text.replace(multiLineCommentRegex,"").replace(singleLineModuleRegex,singleLineModuleReplacement)}var _=require("lodash"),singleLineModuleRegex=/(module\s*\w*\([^\)]*\)[\w\n]*)([^{};]*);/gm,singleLineModuleReplacement="$1 {$2;};",multiLineCommentRegex=/((?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)|(?:\/\/.*))/gm;module.exports={DEFAULT_RESOLUTION:16,DEFAULT_2D_RESOLUTION:16,FN_DEFAULT:0,FS_DEFAULT:2,FA_DEFAULT:12,module_stack:[],context_stack:[],stripString:stripString,convertForStrFunction:convertForStrFunction,preParse:preParse,importedObjectRegex:/import\([^\"]*\"([^\)]*)\"[,]?.*\);?/gm,usedLibraryRegex:/use <([^>]*)>;?/gm,includedLibraryRegex:/include <([^>]*)>;?/gm}},{lodash:2}],20:[function(require,module,exports){function IfElseModuleInstantiation(){ModuleInstantiation.call(this),this.name="if",this.else_children=[]}var ModuleInstantiation=require("./ModuleInstantiation");IfElseModuleInstantiation.prototype=new ModuleInstantiation,IfElseModuleInstantiation.prototype.constructor=IfElseModuleInstantiation,module.exports=IfElseModuleInstantiation},{"./ModuleInstantiation":24}],21:[function(require,module,exports){function Import(factory){this.factory=factory}var Context=require("./Context"),StlDecoder=(require("./Globals"),require("./StlDecoder"));Import.prototype.evaluate=function(parentContext,inst){var context=new Context(parentContext),argnames=["file","filename","convexity"],argexpr=[];context.args(argnames,argexpr,inst.argnames,inst.argvalues);var filename=Context.contextVariableLookup(context,"file",null)||Context.contextVariableLookup(context,"filename",null),importCache=(Context.contextVariableLookup(context,"convexity",5),Context.contextVariableLookup(context,"importCache",{})),fileContents=importCache[filename];if(void 0!==fileContents){var stlDecoder=new StlDecoder(atob(fileContents));return stlDecoder.decode(),stlDecoder.getCSGString()}},module.Exports=Import},{"./Context":15,"./Globals":19,"./StlDecoder":29}],22:[function(require,module,exports){function Module(name){this.name=name,this.children=[],this.assignments_var={},this.functions={},this.modules=[],this.argnames=[],this.argexpr=[]}var _=require("lodash"),Context=require("./Context"),Globals=require("./Globals");Module.prototype.evaluate=function(parentContext,inst){var lines=[],context=new Context(parentContext);void 0===parentContext&&(context.setVariable("$fn",Globals.DEFAULT_RESOLUTION),context.setVariable("$fs",2),context.setVariable("$fa",12)),void 0!==inst&&(context.args(this.argnames,this.argexpr,inst.argnames,inst.argvalues),context.setVariable("$children",inst.children.length)),context.inst_p=inst,context.functions_p=this.functions,context.modules_p=this.modules,_.each(this.assignments_var,function(value,key,list){context.setVariable(key,value.evaluate(context))});var controlChildren=_.filter(this.children,function(child){return child&&"echo"==child.name});_.each(controlChildren,function(child,index,list){child.evaluate(context)});var nonControlChildren=_.reject(this.children,function(child){return!child||"echo"==child.name}),evaluatedLines=[];_.each(nonControlChildren,function(child,index,list){var evaluatedChild=child.evaluate(context);void 0==evaluatedChild||_.isArray(evaluatedChild)&&_.isEmpty(evaluatedChild)||evaluatedLines.push(evaluatedChild)});var cleanedLines=_.compact(evaluatedLines);return 1==cleanedLines.length?lines.push(cleanedLines[0]):cleanedLines.length>1&&lines.push(_.head(cleanedLines)+".union(["+_.tail(cleanedLines)+"])"),lines},module.exports=Module},{"./Context":15,"./Globals":19,lodash:2}],23:[function(require,module,exports){function ModuleAdaptor(){}ModuleAdaptor.prototype.evaluate=function(parentContext,inst){return inst.isSubmodule=!0,parentContext.evaluateModule(inst)},module.exports=ModuleAdaptor},{}],24:[function(require,module,exports){function ModuleInstantiation(){this.name,this.argnames=[],this.argvalues=[],this.argexpr=[],this.children=[],this.isSubmodule=!1,this.context}var _=require("lodash"),OpenjscadSolidFactorySingleton=require("./OpenjscadSolidFactorySingleton");ModuleInstantiation.prototype.evaluate=function(context){var evaluatedModule,that=this;return this.argvalues=[],_.each(this.argexpr,function(expr,index,list){that.argvalues.push(expr.evaluate(context))}),that.context=context,evaluatedModule=context.evaluateModule(that,OpenjscadSolidFactorySingleton.getInstance()),that.context=null,that.argvalues=[],evaluatedModule},ModuleInstantiation.prototype.evaluateChildren=function(context){for(var childModules=[],i=0;i<this.children.length;i++){var childInst=this.children[i],evaluatedChild=childInst.evaluate(context);void 0!==evaluatedChild&&childModules.push(evaluatedChild)}return childModules},module.exports=ModuleInstantiation},{"./OpenjscadSolidFactorySingleton":26,lodash:2}],25:[function(require,module,exports){function OpenjscadSolidFactory(){}var PrimitiveModules=(require("./Context"),require("./Globals"),require("./PrimitiveModules")),TransformModules=require("./TransformModules"),ControlModules=require("./ControlModules"),CSGModule=require("./CSGModule"),ChildModule=require("./ChildModule"),ModuleAdaptor=require("./ModuleAdaptor"),ImportModule=require("./ImportModule");OpenjscadSolidFactory.prototype.getAdaptor=function(args){switch(args.name){case"cube":return new PrimitiveModules.Cube;case"sphere":return new PrimitiveModules.Sphere;case"cylinder":return new PrimitiveModules.Cylinder;case"polyhedron":return new PrimitiveModules.Polyhedron;case"circle":return new PrimitiveModules.Circle;case"square":return new PrimitiveModules.Square;case"polygon":return new PrimitiveModules.Polygon;case"union":return new CSGModule(this,"union");case"difference":return new CSGModule(this,"subtract");case"intersect":case"intersection":return new CSGModule(this,"intersect");case"translate":return new TransformModules.Translate(this);case"scale":return new TransformModules.Scale(this);case"rotate":return new TransformModules.Rotate(this);case"mirror":return new TransformModules.Mirror(this);case"linear_extrude":return new TransformModules.Extrude(this);case"color":return new TransformModules.Color(this);case"multmatrix":return new TransformModules.Multimatrix(this);case"render":case"assign":return new TransformModules.Render(this);case"echo":return new ControlModules.Echo(this);case"for":return new ControlModules.ForLoopStatement(this,{csgOp:"union"});case"intersection_for":return new ControlModules.ForLoopStatement(this,{csgOp:"intersect"});case"if":return new ControlModules.IfStatement(this);case"import":return new ImportModule(this);case"child":return new ChildModule(this);default:return new ModuleAdaptor}},module.exports=OpenjscadSolidFactory},{"./CSGModule":13,"./ChildModule":14,"./Context":15,"./ControlModules":16,"./Globals":19,"./ImportModule":21,"./ModuleAdaptor":23,"./PrimitiveModules":27,"./TransformModules":30}],26:[function(require,module,exports){var OpenjscadSolidFactory=require("./OpenjscadSolidFactory"),factory=new OpenjscadSolidFactory;module.exports={getInstance:function(){return factory}}},{"./OpenjscadSolidFactory":25}],27:[function(require,module,exports){function PrimitiveModule(){}function Sphere(a){PrimitiveModule.call(this,a)}function Cylinder(a){PrimitiveModule.call(this,a)}function Cube(a){PrimitiveModule.call(this,a)}function Circle(a){PrimitiveModule.call(this,a)}function Square(a){PrimitiveModule.call(this,a)}function Polygon(a){PrimitiveModule.call(this,a)}function Polyhedron(a){PrimitiveModule.call(this,a)}var _=require("lodash"),Context=require("./Context"),Globals=require("./Globals");Sphere.prototype.evaluate=function(parentContext,inst){var context=new Context(parentContext),argnames=["r","$fn"],argexpr=[];context.args(argnames,argexpr,inst.argnames,inst.argvalues);var r=Context.contextVariableLookup(context,"r",1),resolution=Context.get_fragments_from_r(r,context),openjscadParameters={center:[0,0,0],resolution:resolution,radius:r};return _.template("CSG.sphere({center: [<%=String(center)%>], radius: <%= radius %>, resolution: <%= resolution%>})")(openjscadParameters)},Cylinder.prototype.evaluate=function(parentContext,inst){var context=new Context(parentContext),argnames=["h","r1","r2","center","$fn","$fa","$fs"],argexpr=[];context.args(argnames,argexpr,inst.argnames,inst.argvalues);var openjscadArgs={start:[0,0,0],end:[0,0,1],radiusStart:1,radiusEnd:1,resolution:Globals.DEFAULT_RESOLUTION},isCentered=Context.contextVariableLookup(context,"center",!1),h=Context.contextVariableLookup(context,"h",1),r=Context.contextVariableLookup(context,"r",1),r1=Context.contextVariableLookup(context,"r1",void 0),r2=Context.contextVariableLookup(context,"r2",void 0),startZ=isCentered?-(h/2):0,endZ=isCentered?h/2:h;if(openjscadArgs.start=[0,0,startZ],openjscadArgs.end=[0,0,endZ],_.has(context.vars,"r")&&(openjscadArgs.radiusStart=r,openjscadArgs.radiusEnd=r),_.has(context.vars,"r1")&&(openjscadArgs.radiusStart=r1),_.has(context.vars,"r2")&&(openjscadArgs.radiusEnd=r2),openjscadArgs.resolution=Context.get_fragments_from_r(Math.max(openjscadArgs.radiusStart,openjscadArgs.radiusEnd),context),0!=openjscadArgs.radiusStart||0!=openjscadArgs.radiusEnd)return _.template("CSG.cylinder({start: [<%=start%>], end: [<%=end%>],radiusStart: <%=radiusStart%>, radiusEnd: <%=radiusEnd%>, resolution: <%=resolution%>})")(openjscadArgs)},Cube.prototype.evaluate=function(parentContext,inst){var context=Context.newContext(parentContext,["size","center"],[],inst),openjscadArgs={resolution:Globals.DEFAULT_RESOLUTION},isCentered=Context.contextVariableLookup(context,"center",!1),size=Context.contextVariableLookup(context,"size",1);return size instanceof Array?openjscadArgs.radius=[size[0]/2,size[1]/2,size[2]/2]:openjscadArgs.radius=[size/2,size/2,size/2],isCentered?openjscadArgs.centerVector=[0,0,0]:openjscadArgs.centerVector=[openjscadArgs.radius[0],openjscadArgs.radius[1],openjscadArgs.radius[2]],_.template("CSG.cube({center: [<%=String(centerVector)%>],radius: [<%= radius %>], resolution: <%= resolution%>})")(openjscadArgs)},Circle.prototype.evaluate=function(parentContext,inst){var context=Context.newContext(parentContext,["r","$fn"],[],inst),r=Context.contextVariableLookup(context,"r",1),resolution=Context.get_fragments_from_r(r,context);return _.template("CAG.circle({center: [0,0], radius: <%=r%>, resolution: <%=resolution%>})")({r:r,resolution:resolution})},Square.prototype.evaluate=function(parentContext,inst){var context=Context.newContext(parentContext,["size","center"],[],inst),size=Context.contextVariableLookup(context,"size",[.5,.5]),center=Context.contextVariableLookup(context,"center",!1),radius=_.isArray(size)?radius=[size[0]/2,size[1]/2]:[size/2,size/2],centerPoint=[0,0];return center||(centerPoint=[size[0]/2,size[1]/2]),_.template("CAG.rectangle({center: [<%=centerPoint%>], radius: [<%=radius%>]})")({centerPoint:centerPoint,radius:radius})},Polygon.prototype.evaluate=function(parentContext,inst){function formatPoints(points){return _.map(points,function(x){return _.template("[<%=x%>]")({x:x})})}var context=Context.newContext(parentContext,["points","paths","convexity"],[],inst),points=Context.contextVariableLookup(context,"points",[]),paths=Context.contextVariableLookup(context,"paths",[]),pointsMap=[];if(_.isEmpty(paths))return _.template("CAG.fromPoints([<%=points%>])")({points:formatPoints(points)});if(paths.length>1){var lines="";_.each(_.first(paths),function(x){pointsMap.push(points[x])}),lines+=_.template("(new CSG.Path2D([<%=points%>],true)).innerToCAG().subtract([")({points:formatPoints(pointsMap)});var holes=[];return _.each(_.tail(paths),function(shape){pointsMap=[],_.each(shape,function(x){pointsMap.push(points[x])}),holes.push(_.template("(new CSG.Path2D([<%=points%>],true)).innerToCAG()")({points:formatPoints(pointsMap)}))}),lines+=holes.join(",")+"])"}return _.each(paths[0],function(x){pointsMap.push(points[x])}),_.template("(new CSG.Path2D([<%=points%>],true)).innerToCAG()")({points:formatPoints(pointsMap)})},Polyhedron.prototype.evaluate=function(parentContext,inst){var context=Context.newContext(parentContext,["points","triangles","convexity"],[],inst),points=Context.contextVariableLookup(context,"points",[]),triangles=Context.contextVariableLookup(context,"triangles",[]),polygons=[];return _.each(triangles,function(triangle){polygons.push(_.template("new CSG.Polygon([new CSG.Vertex(new CSG.Vector3D([<%=vec1%>])),new CSG.Vertex(new CSG.Vector3D([<%=vec2%>])),new CSG.Vertex(new CSG.Vector3D([<%=vec3%>]))])")({vec1:points[triangle[2]],vec2:points[triangle[1]],vec3:points[triangle[0]]}))}),_.template("CSG.fromPolygons([<%=polygons%>])")({polygons:polygons})},module.exports={Sphere:Sphere,Cube:Cube,Cylinder:Cylinder,Circle:Circle,Square:Square,Polygon:Polygon,Polyhedron:Polyhedron}},{"./Context":15,"./Globals":19,lodash:2}],28:[function(require,module,exports){function Range(begin,step,end){this.begin=begin,this.step=step,this.end=end}module.exports=Range},{}],29:[function(require,module,exports){function STL(data){var buf=new ArrayBuffer(data.length);this.data=new Uint8Array(buf);for(var i=0,dataLen=data.length;i<dataLen;i++)this.data[i]=data.charCodeAt(i);if(this.TYPE_ASCII="ascii",this.TYPE_BINARY="binary",this.dataType="",this.ASCII_TITLE="solid",this.TYPE_VERTEX="vertex",this.TYPE_NORMAL="normal",this.TYPE_END="end",this.NOT_ASCII=-1,this.listVertex=null,this.listNormal=null,this.pos=0,this.data.length<HDR_LEN+4)throw"STL file too small: "+this.data.length}var HDR_LEN=80;STL.prototype.findEndPos=function(stt){for(var i=stt;i<this.data.length-1;){if(10==this.data[i])return i;i++}return this.data.length-1},STL.prototype.bin2String=function(sttPos,endPos){
|
||
for(var buf="",i=sttPos;i<endPos;i++){var char=this.data[i].toString();buf+=String.fromCharCode(char)}return buf.replace("\r","")},STL.prototype.readUInt16=function(){var b1,b2;return b1=this.data[this.pos++],b2=this.data[this.pos++]<<8,b1|b2},STL.prototype.readUInt32=function(){var b1,b2,b3,b4;b1=this.data[this.pos++],b2=this.data[this.pos++]<<8,b3=this.data[this.pos++]<<16,b4=this.data[this.pos++]<<24;var num=b1|b2|b3|b4;return num},STL.prototype.readReal32=function(){if(this.data.length<=this.pos+4)return 0;var byteArray=[0,0,0,0];byteArray[3]=this.data[this.pos++],byteArray[2]=this.data[this.pos++],byteArray[1]=this.data[this.pos++],byteArray[0]=this.data[this.pos++];var sign=this.parseSign(byteArray),exponent=this.parseExponent(byteArray),mantissa=this.parseSignificand(byteArray),num=sign*exponent*mantissa;return num},STL.prototype.parseSign=function(byteArray){return 128&byteArray[0]?-1:1},STL.prototype.parseExponent=function(byteArray){var ex=127&byteArray[0];return ex<<=1,0!=(128&byteArray[1])&&(ex+=1),ex=Math.pow(2,ex-127)},STL.prototype.parseSignificand=function(byteArray){for(var num=0,mask=64,i=1;i<8;i++)0!=(byteArray[1]&mask)&&(num+=1/Math.pow(2,i)),mask>>=1;mask=128;for(var j=0;j<8;j++)0!=(byteArray[2]&mask)&&(num+=1/Math.pow(2,j+8)),mask>>=1;mask=128;for(var k=0;k<8;k++)0!=(byteArray[2]&mask)&&(num+=1/Math.pow(2,k+16)),mask>>=1;return num+1},STL.prototype.readNormal=function(index){var sttPos=this.listNormal[index],endPos=this.findEndPos(sttPos),vString=this.bin2String(sttPos,endPos),pos=vString.indexOf(this.TYPE_NORMAL);vString=vString.substring(pos+this.TYPE_NORMAL.length+1,vString.length);for(var list=vString.split(" "),normal=new Array,i=0;i<list.length;i++)list[i].length&&normal.push(Number(list[i]));return list.length<3?null:normal},STL.prototype.readVertex=function(index){var sttPos=this.listVertex[index],endPos=this.findEndPos(sttPos),vString=this.bin2String(sttPos,endPos),pos=vString.indexOf(this.TYPE_VERTEX);vString=vString.substring(pos+this.TYPE_VERTEX.length+1,vString.length);for(var list=vString.split(" "),vertex=new Array,i=0;i<list.length;i++)list[i].length&&vertex.push(Number(list[i]));return 3!=vertex.length?null:vertex},STL.prototype.decode=function(){if(this.dataType.length)return this.dataType;var str=this.bin2String(0,10).toLocaleLowerCase(),endPos=0,sttPos=0;if(str.indexOf(this.ASCII_TITLE)>=0)for(this.dataType=this.TYPE_ASCII,this.listVertex=new Array,this.listNormal=new Array;endPos<this.data.length-1;)endPos=this.findEndPos(sttPos),str=this.bin2String(sttPos,endPos),str.indexOf(this.TYPE_VERTEX)>=0?this.listVertex.push(sttPos):str.indexOf(this.TYPE_NORMAL)>=0&&this.listNormal.push(sttPos),sttPos=endPos+1;else this.dataType=this.TYPE_BINARY;return this.dataType},STL.prototype.getCSG=function(){var numTriangles,csgPolygons=[];if(this.dataType==this.TYPE_BINARY?(this.pos=HDR_LEN,numTriangles=this.readUInt32()):(this.pos=0,numTriangles=this.listVertex.length/3),this.dataType==this.TYPE_BINARY)for(i=0;i<numTriangles;i++){for(var csgVertices=[],normal=[0,0,0],j=0;j<3;j++)normal[j]=this.readReal32();for(var csgNormal=new CSG.Vector3D(normal),csgPlane=new CSG.Plane(csgNormal,1),j=0;j<3;j++){var x=this.readReal32(),y=this.readReal32(),z=this.readReal32();csgVertices.push(new CSG.Vertex(new CSG.Vector3D(x,y,z)))}this.pos+=2,csgPolygons.push(new CSG.Polygon(csgVertices,null,csgPlane))}else for(i=0;i<numTriangles;i++){for(var csgVertices=[],j=0;j<3;j++){var vtx=this.readVertex(3*i+j);csgVertices.push(new CSG.Vertex(new CSG.Vector3D(vtx)))}csgPolygons.push(new CSG.Polygon(csgVertices,null))}return CSG.fromPolygons(csgPolygons)},STL.prototype.getCSGString=function(){var numTriangles,csgPolygons=[];if(this.dataType==this.TYPE_BINARY?(this.pos=HDR_LEN,numTriangles=this.readUInt32()):(this.pos=0,numTriangles=this.listVertex.length/3),this.dataType==this.TYPE_BINARY)for(i=0;i<numTriangles;i++){for(var csgVertices=[],normal=[0,0,0],j=0;j<3;j++)normal[j]=this.readReal32();for(var j=(_.template("new CSG.Plane(new CSG.Vector3D([<%=normal%>]), 1)")({normal:normal}),0);j<3;j++){var x=this.readReal32(),y=this.readReal32(),z=this.readReal32();csgVertices.push(_.template("new CSG.Vertex(new CSG.Vector3D([<%=vertex%>]))")({vertex:[x,y,z]}))}this.pos+=2,csgPolygons.push(_.template("new CSG.Polygon([<%=vertices%>], null)")({vertices:csgVertices}))}else for(i=0;i<numTriangles;i++){for(var csgVertices=[],j=0;j<3;j++){var vertex=this.readVertex(3*i+j);csgVertices.push(_.template("new CSG.Vertex(new CSG.Vector3D([<%=vertex%>]))")({vertex:vertex}))}csgPolygons.push(_.template("new CSG.Polygon([<%=vertices%>], null)")({vertices:csgVertices}))}return _.template("CSG.fromPolygons([<%=polygons%>])")({polygons:csgPolygons})},STL.prototype.drawWireFrame=function(context,w,h,mag,rX,rY,rZ){var numTriangles,i;if(this.dataType==this.TYPE_BINARY?(this.pos=HDR_LEN,numTriangles=this.readUInt32()):numTriangles=this.listVertex.length/3,this.dataType==this.TYPE_BINARY)for(i=0;i<numTriangles;i++){for(var normal=[0,0,0],j=0;j<3;j++)normal[j]=this.readReal32();this.drawTriangles(context,w,h,mag,rX,rY,rZ),this.pos+=2}else for(i=0;i<numTriangles;i++)this.triangleIndex=i,this.drawTriangles(context,w,h,mag,rX,rY,rZ)},STL.prototype.drawTriangles=function(context,w,h,mag,rX,rY,rZ){var vtx0=[0,0,0],vtx1=[0,0,0],offX=w/2,offY=h/2;context.beginPath();for(var radX=Math.PI/180*rX,radY=Math.PI/180*rY,j=(Math.PI/180*rZ,0);j<3;j++){this.dataType==this.TYPE_ASCII?vtx1=this.readVertex(3*this.triangleIndex+j):(vtx1[0]=this.readReal32(),vtx1[1]=this.readReal32(),vtx1[2]=this.readReal32());var y=vtx1[1],z=vtx1[2];vtx1[1]=Math.cos(radX)*y-Math.sin(radX)*z,vtx1[2]=Math.sin(radX)*y+Math.cos(radX)*z;var x=vtx1[0];z=vtx1[2],vtx1[0]=Math.cos(radY)*x+Math.sin(radY)*z,vtx1[2]=-Math.sin(radY)*x+Math.cos(radY)*z,0==j?(context.moveTo(vtx1[0]*mag+offX,vtx1[1]*mag+offY),vtx0[0]=vtx1[0],vtx0[1]=vtx1[1],vtx0[2]=vtx1[2]):context.lineTo(vtx1[0]*mag+offX,vtx1[1]*mag+offY)}context.lineTo(vtx0[0]*mag+offX,vtx0[1]*mag+offY),context.stroke(),context.closePath()},module.exports=STL},{}],30:[function(require,module,exports){function TransformModule(factory){var factory=factory;this.transformChildren=function(children,context,cb){for(var childModules=[],i=0;i<children.length;i++){var childInst=children[i];childInst.argvalues=[],_.each(childInst.argexpr,function(expr,index,list){childInst.argvalues.push(expr.evaluate(context))});var childAdaptor=factory.getAdaptor(childInst),transformedChild=childAdaptor.evaluate(context,childInst);transformedChild&&(transformedChild+=cb(),childModules.push(transformedChild))}return 1==childModules.length?childModules[0]:childModules.length>1?_.first(childModules)+".union(["+_.tail(childModules)+"])":void 0}}function ColorTransform(a){TransformModule.call(this,a)}function MirrorTransform(a){TransformModule.call(this,a)}function RotateTransform(a){TransformModule.call(this,a)}function ScaleTransform(a){TransformModule.call(this,a)}function TranslateTransform(a){TransformModule.call(this,a)}function RenderModule(a){TransformModule.call(this,a)}function MultimatrixTransform(a){TransformModule.call(this,a),this.transposeMatrix=function(m){var t=[],ti=0;for(var j in _.range(4))for(var i in _.range(4))t[ti++]=m[i][j];return t}}function ExtrudeTransform(a){TransformModule.call(this,a)}var _=require("lodash"),Context=require("./Context"),Globals=require("./Globals");ColorTransform.prototype.evaluate=function(parentContext,inst){inst.argvalues=[],_.each(inst.argexpr,function(expr,index,list){inst.argvalues.push(expr.evaluate(parentContext))});var context=Context.newContext(parentContext,["c","alpha"],[],inst),c=Context.contextVariableLookup(context,"c",void 0),color="white";void 0!==c&&(color=_.isString(c)?colorNameLookup[Globals.stripString(c.toLowerCase())]:c);var alpha=Context.contextVariableLookup(context,"alpha",void 0);return void 0!==alpha&&(color[3]=alpha),this.transformChildren(inst.children,context,function(){return _.template(".setColor(<%=color%>)")({color:color})})},MirrorTransform.prototype.evaluate=function(parentContext,inst){inst.argvalues=[],_.each(inst.argexpr,function(expr,index,list){inst.argvalues.push(expr.evaluate(parentContext))});var context=Context.newContext(parentContext,["v"],[],inst),v=Context.contextVariableLookup(context,"v",[0,0,0]);if(!(v instanceof Array)){var val=v;v=[val,val,val]}return this.transformChildren(inst.children,context,function(){return _.template(".mirrored(CSG.Plane.fromNormalAndPoint([<%=v%>], [0,0,0]))")({v:v})})},RotateTransform.prototype.evaluate=function(parentContext,inst){inst.argvalues=[],_.each(inst.argexpr,function(expr,index,list){inst.argvalues.push(expr.evaluate(parentContext))});var context=Context.newContext(parentContext,["a","v"],[],inst),a=Context.contextVariableLookup(context,"a",void 0);if(_.isArray(a))return this.transformChildren(inst.children,context,function(){return _.template(".rotateX(<%=degreeX%>).rotateY(<%=degreeY%>).rotateZ(<%=degreeZ%>)")({degreeX:a[0],degreeY:a[1],degreeZ:a[2]})});var v=Context.contextVariableLookup(context,"v",void 0);return this.transformChildren(inst.children,context,function(){return void 0!==v&&"0,0,0"!=v.toString()||(v=[0,0,1]),_.template(".transform(CSG.Matrix4x4.rotation([0,0,0], [<%=vector%>], <%=degree%>))")({degree:a,vector:v})})},ScaleTransform.prototype.evaluate=function(parentContext,inst){inst.argvalues=[],_.each(inst.argexpr,function(expr,index,list){inst.argvalues.push(expr.evaluate(parentContext))});var context=Context.newContext(parentContext,["v"],[],inst),v=Context.contextVariableLookup(context,"v",[0,0,0]);if(!(v instanceof Array)){var val=v;v=[val,val,val]}return this.transformChildren(inst.children,context,function(){return _.template(".scale([<%=v%>])")({v:v})})},TranslateTransform.prototype.evaluate=function(parentContext,inst){inst.argvalues=[],_.each(inst.argexpr,function(expr,index,list){inst.argvalues.push(expr.evaluate(parentContext))});var context=Context.newContext(parentContext,["v"],[],inst),v=Context.contextVariableLookup(context,"v",[0,0,0]);return this.transformChildren(inst.children,context,function(){return _.template(".translate([<%=v%>])")({v:v})})},RenderModule.prototype.evaluate=function(parentContext,inst){inst.argvalues=[],_.each(inst.argexpr,function(expr,index,list){inst.argvalues.push(expr.evaluate(parentContext))});var context=Context.newContext(parentContext,[],[],inst),childIndex=0;return void 0!==inst.argvalues[0]&&(childIndex=inst.argvalues[0]),this.transformChildren(inst.children,context,function(){return""})},MultimatrixTransform.prototype.evaluate=function(parentContext,inst){inst.argvalues=[],_.each(inst.argexpr,function(expr,index,list){inst.argvalues.push(expr.evaluate(parentContext))});var matrix,context=Context.newContext(parentContext,["m"],[],inst),m=Context.contextVariableLookup(context,"m",void 0);return void 0!==m&&(matrix=this.transposeMatrix(m)),this.transformChildren(inst.children,context,function(){return _.template(".transform(new CSG.Matrix4x4( [<%= matrix %>] ))")({matrix:matrix})})},ExtrudeTransform.prototype.evaluate=function(parentContext,inst){inst.argvalues=[],_.each(inst.argexpr,function(expr,index,list){inst.argvalues.push(expr.evaluate(parentContext))});var context=Context.newContext(parentContext,["file","layer","height","origin","scale","center","twist","slices","$fn","$fs","$fa"],[],inst),height=Context.contextVariableLookup(context,"height",100),center=Context.contextVariableLookup(context,"center",!1),twist=Number(Context.contextVariableLookup(context,"twist",0))/-1,slices=Context.contextVariableLookup(context,"slices",void 0);Context.contextVariableLookup(context,"$fn",Globals.FN_DEFAULT),Context.contextVariableLookup(context,"$fs",Globals.FS_DEFAULT),Context.contextVariableLookup(context,"$fa",Globals.FA_DEFAULT);return void 0===slices&&(slices=parseInt(Math.max(2,Math.abs(Context.get_fragments_from_r(height,context)*twist/360)))),this.transformChildren(inst.children,context,function(){var template=_.template(".extrude({offset: [0, 0, <%=height%>], twistangle: <%=twist%>,twiststeps: <%=slices%>})")({height:height,twist:twist,slices:slices});if(center){var offset=-height/2;template+=_.template(".translate([0,0,<%=offset%>])")({offset:offset})}return template})};var colorNameLookup={indianred:[.804,.361,.361],lightcoral:[.941,.502,.502],salmon:[.98,.502,.447],darksalmon:[.914,.588,.478],lightsalmon:[1,.627,.478],red:[1,0,0],crimson:[.863,.078,.235],firebrick:[.698,.133,.133],darkred:[.545,0,0],pink:[1,.753,.796],lightpink:[1,.714,.757],hotpink:[1,.412,.706],deeppink:[1,.078,.576],mediumvioletred:[.78,.082,.522],palevioletred:[.859,.439,.576],lightsalmon:[1,.627,.478],coral:[1,.498,.314],tomato:[1,.388,.278],orangered:[1,.271,0],darkorange:[1,.549,0],orange:[1,.647,0],gold:[1,.843,0],yellow:[1,1,0],lightyellow:[1,1,.878],lemonchiffon:[1,.98,.804],lightgoldenrodyellow:[.98,.98,.824],papayawhip:[1,.937,.835],moccasin:[1,.894,.71],peachpuff:[1,.855,.725],palegoldenrod:[.933,.91,.667],khaki:[.941,.902,.549],darkkhaki:[.741,.718,.42],lavender:[.902,.902,.98],thistle:[.847,.749,.847],plum:[.867,.627,.867],violet:[.933,.51,.933],orchid:[.855,.439,.839],fuchsia:[1,0,1],magenta:[1,0,1],mediumorchid:[.729,.333,.827],mediumpurple:[.576,.439,.859],blueviolet:[.541,.169,.886],darkviolet:[.58,0,.827],darkorchid:[.6,.196,.8],darkmagenta:[.545,0,.545],purple:[.502,0,.502],indigo:[.294,0,.51],darkslateblue:[.282,.239,.545],slateblue:[.416,.353,.804],mediumslateblue:[.482,.408,.933],greenyellow:[.678,1,.184],chartreuse:[.498,1,0],lawngreen:[.486,.988,0],lime:[0,1,0],limegreen:[.196,.804,.196],palegreen:[.596,.984,.596],lightgreen:[.565,.933,.565],mediumspringgreen:[0,.98,.604],springgreen:[0,1,.498],mediumseagreen:[.235,.702,.443],seagreen:[.18,.545,.341],forestgreen:[.133,.545,.133],green:[0,.502,0],darkgreen:[0,.392,0],yellowgreen:[.604,.804,.196],olivedrab:[.42,.557,.137],olive:[.502,.502,0],darkolivegreen:[.333,.42,.184],mediumaquamarine:[.4,.804,.667],darkseagreen:[.561,.737,.561],lightseagreen:[.125,.698,.667],darkcyan:[0,.545,.545],teal:[0,.502,.502],aqua:[0,1,1],cyan:[0,1,1],lightcyan:[.878,1,1],paleturquoise:[.686,.933,.933],aquamarine:[.498,1,.831],turquoise:[.251,.878,.816],mediumturquoise:[.282,.82,.8],darkturquoise:[0,.808,.82],cadetblue:[.373,.62,.627],steelblue:[.275,.51,.706],lightsteelblue:[.69,.769,.871],powderblue:[.69,.878,.902],lightblue:[.678,.847,.902],skyblue:[.529,.808,.922],lightskyblue:[.529,.808,.98],deepskyblue:[0,.749,1],dodgerblue:[.118,.565,1],cornflowerblue:[.392,.584,.929],royalblue:[.255,.412,.882],blue:[0,0,1],mediumblue:[0,0,.804],darkblue:[0,0,.545],navy:[0,0,.502],midnightblue:[.098,.098,.439],cornsilk:[1,.973,.863],blanchedalmond:[1,.922,.804],bisque:[1,.894,.769],navajowhite:[1,.871,.678],wheat:[.961,.871,.702],burlywood:[.871,.722,.529],tan:[.824,.706,.549],rosybrown:[.737,.561,.561],sandybrown:[.957,.643,.376],goldenrod:[.855,.647,.125],darkgoldenrod:[.722,.525,.043],peru:[.804,.522,.247],chocolate:[.824,.412,.118],saddlebrown:[.545,.271,.075],sienna:[.627,.322,.176],brown:[.647,.165,.165],maroon:[.502,0,0],white:[1,1,1],snow:[1,.98,.98],honeydew:[.941,1,.941],mintcream:[.961,1,.98],azure:[.941,1,1],aliceblue:[.941,.973,1],ghostwhite:[.973,.973,1],whitesmoke:[.961,.961,.961],seashell:[1,.961,.933],beige:[.961,.961,.863],oldlace:[.992,.961,.902],floralwhite:[1,.98,.941],ivory:[1,1,.941],antiquewhite:[.98,.922,.843],linen:[.98,.941,.902],lavenderblush:[1,.941,.961],mistyrose:[1,.894,.882],gainsboro:[.863,.863,.863],lightgrey:[.827,.827,.827],silver:[.753,.753,.753],darkgray:[.663,.663,.663],gray:[.502,.502,.502],dimgray:[.412,.412,.412],lightslategray:[.467,.533,.6],slategray:[.439,.502,.565],darkslategray:[.184,.31,.31],black:[0,0,0]};module.exports={Translate:TranslateTransform,Scale:ScaleTransform,Rotate:RotateTransform,Mirror:MirrorTransform,Color:ColorTransform,Render:RenderModule,Multimatrix:MultimatrixTransform,Extrude:ExtrudeTransform}},{"./Context":15,"./Globals":19,lodash:2}],31:[function(require,module,exports){function resetModule(){currmodule=new Module("root"),Globals.context_stack=[],Globals.module_stack=[]}function processModule(yy){var lines=[];lines.push("function main(){"),lines.push("\n");var context=void 0;context=void 0!==yy.context?yy.context:new Context,void 0!==yy.importCache&&context.setVariable("importCache",yy.importCache);var res=currmodule.evaluate(context),evaluatedLines=_.flatten(res);1==evaluatedLines.length?lines.push("return "+evaluatedLines[0]+";"):evaluatedLines.length>1&&(lines.push("return "+_.first(evaluatedLines)+".union(["),lines.push(_.tail(evaluatedLines)),lines.push("]);")),lines.push("};");var x={lines:lines,context:Globals.context_stack[Globals.context_stack.length-1]};return resetModule(),x}function stashModule(newName,newArgNames,newArgExpr){var p_currmodule=currmodule;Globals.module_stack.push(currmodule),currmodule=new Module(newName),p_currmodule.modules.push(currmodule),currmodule.argnames=newArgNames,currmodule.argexpr=newArgExpr}function popModule(){Globals.module_stack.length>0&&(currmodule=Globals.module_stack.pop())}function addModuleChild(child){currmodule.children.push(child)}function addModuleAssignmentVar(name,value){currmodule.assignments_var[name]=value}function addModuleFunction(name,expr,argnames,argexpr){var func=new FunctionDef;func.argnames=argnames,func.argexpr=argexpr,func.expr=expr,currmodule.functions[name]=func}var _=require("lodash"),Module=require("./Module"),Context=require("./Context"),Globals=require("./Globals"),FunctionDef=require("./FunctionDef"),currmodule=(require("./openscad-parser-support"),new Module("root"));module.exports={processModule:processModule,stashModule:stashModule,popModule:popModule,addModuleChild:addModuleChild,addModuleAssignmentVar:addModuleAssignmentVar,addModuleFunction:addModuleFunction}},{"./Context":15,"./FunctionDef":18,"./Globals":19,"./Module":22,"./openscad-parser-support":32,lodash:2}],32:[function(require,module,exports){!function(pool,math,width,chunks,significance,overflow,startdenom){function ARC4(key){var t,u,me=this,keylen=key.length,i=0,j=me.i=me.j=me.m=0;for(me.S=[],me.c=[],keylen||(key=[keylen++]);i<width;)me.S[i]=i++;for(i=0;i<width;i++)t=me.S[i],j=lowbits(j+t+key[i%keylen]),u=me.S[j],me.S[i]=u,me.S[j]=t;me.g=function(count){var s=me.S,i=lowbits(me.i+1),t=s[i],j=lowbits(me.j+t),u=s[j];s[i]=u,s[j]=t;for(var r=s[lowbits(t+u)];--count;)i=lowbits(i+1),t=s[i],j=lowbits(j+t),u=s[j],s[i]=u,s[j]=t,r=r*width+s[lowbits(t+u)];return me.i=i,me.j=j,r},me.g(width)}function flatten(obj,depth,result,prop,typ){if(result=[],typ=typeof obj,depth&&"object"==typ)for(prop in obj)if(prop.indexOf("S")<5)try{result.push(flatten(obj[prop],depth-1))}catch(e){}return result.length?result:obj+("string"!=typ?"\0":"")}function mixkey(seed,key,smear,j){for(seed+="",smear=0,j=0;j<seed.length;j++)key[lowbits(j)]=lowbits((smear^=19*key[lowbits(j)])+seed.charCodeAt(j));seed="";for(j in key)seed+=String.fromCharCode(key[j]);return seed}function lowbits(n){return n&width-1}math.seedrandom=function(seed,use_entropy){var arc4,key=[];return seed=mixkey(flatten(use_entropy?[seed,pool]:arguments.length?seed:[(new Date).getTime(),pool,window],3),key),arc4=new ARC4(key),mixkey(arc4.S,pool),math.random=function(){for(var n=arc4.g(chunks),d=startdenom,x=0;n<significance;)n=(n+x)*width,d*=width,x=arc4.g(1);for(;n>=overflow;)n/=2,d/=2,x>>>=1;return(n+x)/d},seed},startdenom=math.pow(width,chunks),significance=math.pow(2,significance),overflow=2*significance,mixkey(math.random(),pool)}([],Math,256,6,52)},{}],33:[function(require,module,exports){(function(process){const ext=require("./openscad-parser-ext"),ArgContainer=require("./ArgContainer"),ArgsContainer=require("./ArgsContainer"),Expression=require("./Expression"),ModuleInstantiation=require("./ModuleInstantiation"),IfElseModuleInstantiation=require("./IfElseModuleInstantiation");var parser=function(){function Parser(){this.yy={}}var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,9,10,15,16,21,22,26,31,32,33,34],$V1=[10,15,16,21,22,26,31,32,33,34],$V2=[2,7],$V3=[1,5],$V4=[1,20],$V5=[1,15],$V6=[1,16],$V7=[1,17],$V8=[1,18],$V9=[1,9,10,15,16,17,21,22,26,31,32,33,34],$Va=[9,10,15,16,17,21,22,26,31,32,33,34],$Vb=[1,24],$Vc=[1,30],$Vd=[1,29],$Ve=[1,9,10,15,16,17,21,22,26,28,31,32,33,34],$Vf=[1,44],$Vg=[1,51],$Vh=[1,50],$Vi=[1,41],$Vj=[1,42],$Vk=[1,43],$Vl=[1,45],$Vm=[1,46],$Vn=[1,47],$Vo=[1,48],$Vp=[1,49],$Vq=[14,57],$Vr=[2,70],$Vs=[1,55],$Vt=[10,17,26,31,32,33,34],$Vu=[10,15,16,26,31,32,33,34],$Vv=[2,65],$Vw=[1,62],$Vx=[1,67],$Vy=[1,65],$Vz=[1,64],$VA=[1,79],$VB=[1,66],$VC=[1,68],$VD=[1,69],$VE=[1,70],$VF=[1,71],$VG=[1,72],$VH=[1,73],$VI=[1,74],$VJ=[1,75],$VK=[1,76],$VL=[1,77],$VM=[1,78],$VN=[14,15,33,34,38,41,42,43,45,46,47,48,49,50,51,52,53,54,55,56,57],$VO=[2,33],$VP=[1,80],$VQ=[2,62],$VR=[1,84],$VS=[1,90],$VT=[1,97],$VU=[43,57],$VV=[10,11,14,31,35,36,37,39,40,41,43,46,47],$VW=[14,15,42,43,46,47,48,49,50,51,52,53,54,55,56,57],$VX=[14,15,33,34,42,43,45,46,47,48,49,50,51,52,53,54,55,56,57],$VY=[14,15,42,43,48,49,52,53,54,55,56,57],$VZ=[14,15,42,43,48,49,50,51,52,53,54,55,56,57],$V_=[2,61],parser={trace:function(){},yy:{},symbols_:{error:2,program:3,input:4,statement:5,inner_input:6,statement_begin:7,statement_end:8,TOK_MODULE:9,TOK_ID:10,"(":11,arguments_decl:12,optional_commas:13,")":14,";":15,"{":16,"}":17,module_instantiation:18,"=":19,expr:20,TOK_FUNCTION:21,BR:22,children_instantiation:23,module_instantiation_list:24,if_statement:25,TOK_IF:26,ifelse_statement:27,TOK_ELSE:28,single_module_instantiation:29,arguments_call:30,"!":31,"#":32,"%":33,"*":34,TOK_TRUE:35,TOK_FALSE:36,TOK_UNDEF:37,".":38,TOK_STRING:39,TOK_NUMBER:40,"[":41,":":42,"]":43,vector_expr:44,"/":45,"+":46,"-":47,"<":48,LE:49,EQ:50,NE:51,GE:52,">":53,AND:54,OR:55,"?":56,",":57,argument_decl:58,argument_call:59,$accept:0,$end:1},terminals_:{2:"error",9:"TOK_MODULE",10:"TOK_ID",11:"(",14:")",15:";",16:"{",17:"}",19:"=",21:"TOK_FUNCTION",22:"BR",26:"TOK_IF",28:"TOK_ELSE",31:"!",32:"#",33:"%",34:"*",35:"TOK_TRUE",36:"TOK_FALSE",37:"TOK_UNDEF",38:".",39:"TOK_STRING",40:"TOK_NUMBER",41:"[",42:":",43:"]",45:"/",46:"+",47:"-",48:"<",49:"LE",50:"EQ",51:"NE",52:"GE",53:">",54:"AND",55:"OR",56:"?",57:","},productions_:[0,[3,1],[4,0],[4,2],[6,0],[6,2],[5,2],[7,0],[7,6],[8,1],[8,3],[8,1],[8,4],[8,9],[8,1],[23,1],[23,3],[25,5],[27,1],[27,3],[18,2],[18,2],[18,1],[24,0],[24,2],[29,4],[29,2],[29,2],[29,2],[29,2],[20,1],[20,1],[20,1],[20,1],[20,3],[20,1],[20,1],[20,5],[20,7],[20,3],[20,4],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,3],[20,2],[20,2],[20,2],[20,3],[20,5],[20,4],[20,4],[13,2],[13,0],[44,1],[44,4],[12,0],[12,1],[12,4],[58,1],[58,3],[30,0],[30,1],[30,4],[59,1],[59,3]],performAction:function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return ext.processModule(yy);case 8:ext.stashModule($$[$0-4],$$[$0-2].argnames,$$[$0-2].argexpr),delete $$[$0-2];break;case 9:break;case 10:ext.popModule();break;case 11:ext.addModuleChild($$[$0]);break;case 12:ext.addModuleAssignmentVar($$[$0-3],$$[$0-1]);break;case 13:ext.addModuleFunction($$[$0-7],$$[$0-1],$$[$0-5].argnames,$$[$0-5].argexpr),delete $$[$0-5];break;case 15:this.$=new ModuleInstantiation,$$[$0]&&this.$.children.push($$[$0]);break;case 16:case 20:this.$=$$[$0-1];break;case 17:if(this.$=new IfElseModuleInstantiation,this.$.argnames.push(""),this.$.argexpr.push($$[$0-2]),this.$)this.$.children=$$[$0].children;else for(var i=0;i<$$[$0].children.size();i++)delete $$[$0].children[i];delete $$[$0];break;case 18:case 22:case 54:this.$=$$[$0];break;case 19:if(this.$=$$[$0-2],this.$)this.$.else_children=$$[$0].children;else for(var i=0;i<$$[$0].children.size();i++)delete $$[$0].children[i];delete $$[$0];break;case 21:if(this.$=$$[$0-1],this.$)this.$.children=$$[$0].children;else for(var i=0;i<$$[$0].children.length;i++)delete $$[$0].children[i];delete $$[$0];break;case 23:this.$=new ModuleInstantiation;break;case 24:this.$=$$[$0-1],this.$?$$[$0]&&this.$.children.push($$[$0]):delete $$[$0];break;case 25:this.$=new ModuleInstantiation,this.$.name=$$[$0-3],this.$.argnames=$$[$0-1].argnames,this.$.argexpr=$$[$0-1].argexpr,delete $$[$0-1];break;case 26:this.$=$$[$0],this.$&&(this.$.tag_root=!0);break;case 27:this.$=$$[$0],this.$&&(this.$.tag_highlight=!0);break;case 28:delete $$[$0],this.$=void 0;break;case 29:delete $$[$0],this.$=void 0;break;case 30:this.$=new Expression(!0);break;case 31:this.$=new Expression(!1);break;case 32:this.$=new Expression(void 0);break;case 33:this.$=new Expression,this.$.type="L",this.$.var_name=$$[$0];break;case 34:this.$=new Expression,this.$.type="N",this.$.children.push($$[$0-2]),this.$.var_name=$$[$0];break;case 35:this.$=new Expression(String($$[$0]));break;case 36:this.$=new Expression(Number($$[$0]));break;case 37:var e_one=new Expression(1);this.$=new Expression,this.$.type="R",this.$.children.push($$[$0-3]),this.$.children.push(e_one),this.$.children.push($$[$0-1]);break;case 38:this.$=new Expression,this.$.type="R",this.$.children.push($$[$0-5]),this.$.children.push($$[$0-3]),this.$.children.push($$[$0-1]);break;case 39:this.$=new Expression([]);break;case 40:this.$=$$[$0-2];break;case 41:this.$=new Expression,this.$.type="*",this.$.children.push($$[$0-2]),this.$.children.push($$[$0]);break;case 42:this.$=new Expression,this.$.type="/",this.$.children.push($$[$0-2]),this.$.children.push($$[$0]);break;case 43:this.$=new Expression,this.$.type="%",this.$.children.push($$[$0-2]),this.$.children.push($$[$0]);break;case 44:this.$=new Expression,this.$.type="+",this.$.children.push($$[$0-2]),this.$.children.push($$[$0]);break;case 45:this.$=new Expression,this.$.type="-",this.$.children.push($$[$0-2]),this.$.children.push($$[$0]);break;case 46:this.$=new Expression,this.$.type="<",this.$.children.push($$[$0-2]),this.$.children.push($$[$0]);break;case 47:this.$=new Expression,this.$.type="<=",this.$.children.push($$[$0-2]),this.$.children.push($$[$0]);break;case 48:this.$=new Expression,this.$.type="==",this.$.children.push($$[$0-2]),this.$.children.push($$[$0]);break;case 49:this.$=new Expression,this.$.type="!=",this.$.children.push($$[$0-2]),this.$.children.push($$[$0]);break;case 50:this.$=new Expression,this.$.type=">=",this.$.children.push($$[$0-2]),this.$.children.push($$[$0]);break;case 51:this.$=new Expression,this.$.type=">",this.$.children.push($$[$0-2]),this.$.children.push($$[$0]);break;case 52:this.$=new Expression,this.$.type="&&",this.$.children.push($$[$0-2]),this.$.children.push($$[$0]);break;case 53:this.$=new Expression,this.$.type="||",this.$.children.push($$[$0-2]),this.$.children.push($$[$0]);break;case 55:this.$=new Expression,this.$.type="I",this.$.children.push($$[$0]);break;case 56:this.$=new Expression,this.$.type="!",this.$.children.push($$[$0]);break;case 57:this.$=$$[$0-1];break;case 58:this.$=new Expression,this.$.type="?:",this.$.children.push($$[$0-4]),this.$.children.push($$[$0-2]),this.$.children.push($$[$0]);break;case 59:this.$=new Expression,this.$.type="[]",this.$.children.push($$[$0-3]),this.$.children.push($$[$0-1]);break;case 60:this.$=new Expression,this.$.type="F",this.$.call_funcname=$$[$0-3],this.$.call_argnames=$$[$0-1].argnames,this.$.children=$$[$0-1].argexpr,delete $$[$0-1];break;case 63:this.$=new Expression,this.$.type="V",this.$.children.push($$[$0]);break;case 64:this.$=$$[$0-3],this.$.children.push($$[$0]);break;case 65:case 70:this.$=new ArgsContainer;break;case 66:case 71:this.$=new ArgsContainer,this.$.argnames.push($$[$0].argname),this.$.argexpr.push($$[$0].argexpr),delete $$[$0];break;case 67:case 72:this.$=$$[$0-3],this.$.argnames.push($$[$0].argname),this.$.argexpr.push($$[$0].argexpr),delete $$[$0];break;case 68:this.$=new ArgContainer,this.$.argname=$$[$0],this.$.argexpr=void 0;break;case 69:case 74:this.$=new ArgContainer,this.$.argname=$$[$0-2],this.$.argexpr=$$[$0];break;case 73:this.$=new ArgContainer,this.$.argexpr=$$[$0]}},table:[o($V0,[2,2],{3:1,4:2}),{1:[3]},o($V1,$V2,{5:3,7:4,1:[2,1],9:$V3}),o($V0,[2,3]),{8:6,10:[1,10],15:[1,7],16:[1,8],18:9,21:[1,11],22:[1,12],25:19,26:$V4,27:14,29:13,31:$V5,32:$V6,33:$V7,34:$V8},{10:[1,21]},o($V9,[2,6]),o($V9,[2,9]),o($Va,[2,4],{6:22}),o($V9,[2,11]),{11:$Vb,19:[1,23]},{10:[1,25]},o($V9,[2,14]),{10:$Vc,15:[1,26],16:$Vd,18:28,23:27,25:19,26:$V4,27:14,29:13,31:$V5,32:$V6,33:$V7,34:$V8},o($Ve,[2,22]),{10:$Vc,29:31,31:$V5,32:$V6,33:$V7,34:$V8},{10:$Vc,29:32,31:$V5,32:$V6,33:$V7,34:$V8},{10:$Vc,29:33,31:$V5,32:$V6,33:$V7,34:$V8},{10:$Vc,29:34,31:$V5,32:$V6,33:$V7,34:$V8},o($V9,[2,18],{28:[1,35]}),{11:[1,36]},{11:[1,37]},o($V1,$V2,{7:4,5:39,9:$V3,17:[1,38]}),{10:$Vf,11:$Vg,20:40,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},o($Vq,$Vr,{30:52,59:53,20:54,10:$Vs,11:$Vg,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp}),{11:[1,56]},o($Ve,[2,20]),o($Ve,[2,21]),o($Ve,[2,15]),o($Vt,[2,23],{24:57}),{11:$Vb},o($Vu,[2,26]),o($Vu,[2,27]),o($Vu,[2,28]),o($Vu,[2,29]),{10:$Vc,16:$Vd,18:28,23:58,25:19,26:$V4,27:14,29:13,31:$V5,32:$V6,33:$V7,34:$V8},{10:$Vf,11:$Vg,20:59,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},o($Vq,$Vv,{12:60,58:61,10:$Vw}),o($V9,[2,10]),o($Va,[2,5]),{15:[1,63],33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD,48:$VE,49:$VF,50:$VG,51:$VH,52:$VI,53:$VJ,54:$VK,55:$VL,56:$VM},o($VN,[2,30]),o($VN,[2,31]),o($VN,[2,32]),o($VN,$VO,{11:$VP}),o($VN,[2,35]),o($VN,[2,36]),{10:$Vf,11:$Vg,13:82,20:81,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,43:$VQ,44:83,46:$Vo,47:$Vp,57:$VR},{10:$Vf,11:$Vg,20:85,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:86,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:87,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:88,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{14:[1,89],57:$VS},o($Vq,[2,71]),o($Vq,[2,73],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD,48:$VE,49:$VF,50:$VG,51:$VH,52:$VI,53:$VJ,54:$VK,55:$VL,56:$VM}),o([14,33,34,38,41,45,46,47,48,49,50,51,52,53,54,55,56,57],$VO,{11:$VP,19:[1,91]}),o($Vq,$Vv,{58:61,12:92,10:$Vw}),{10:$Vc,17:[1,93],18:94,25:19,26:$V4,27:14,29:13,31:$V5,32:$V6,33:$V7,34:$V8},o($Ve,[2,19]),{14:[1,95],33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD,48:$VE,49:$VF,50:$VG,51:$VH,52:$VI,53:$VJ,54:$VK,55:$VL,56:$VM},{13:96,14:$VQ,57:$VT},o($Vq,[2,66]),o($Vq,[2,68],{19:[1,98]}),o($V9,[2,12]),{10:[1,99]},{10:$Vf,11:$Vg,20:100,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:101,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:102,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:103,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:104,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:105,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:106,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:107,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:108,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:109,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:110,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:111,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:112,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:113,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{10:$Vf,11:$Vg,20:114,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},o($Vq,$Vr,{59:53,20:54,30:115,10:$Vs,11:$Vg,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp}),o($VU,[2,63],{33:$Vx,34:$Vy,38:$Vz,41:$VA,42:[1,116],45:$VB,46:$VC,47:$VD,48:$VE,49:$VF,50:$VG,51:$VH,52:$VI,53:$VJ,54:$VK,55:$VL,56:$VM}),{43:[1,117]
|
||
},{13:118,43:$VQ,57:[1,119]},o($VV,$VQ,{13:120,57:$VR}),o($VW,[2,54],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB}),o($VW,[2,55],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB}),o($VW,[2,56],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB}),{14:[1,121],33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD,48:$VE,49:$VF,50:$VG,51:$VH,52:$VI,53:$VJ,54:$VK,55:$VL,56:$VM},o($Vu,[2,25]),o([10,11,31,35,36,37,39,40,41,46,47],$VQ,{13:122,57:$VR}),{10:$Vf,11:$Vg,20:123,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{13:124,14:$VQ,57:$VT},o($Ve,[2,16]),o($Vt,[2,24]),{10:$Vc,16:$Vd,18:28,23:125,25:19,26:$V4,27:14,29:13,31:$V5,32:$V6,33:$V7,34:$V8},{14:[1,126]},o([10,14],$VQ,{13:127,57:$VR}),{10:$Vf,11:$Vg,20:128,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},o($VN,[2,34]),o($VX,[2,41],{38:$Vz,41:$VA}),o($VX,[2,42],{38:$Vz,41:$VA}),o($VX,[2,43],{38:$Vz,41:$VA}),o($VW,[2,44],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB}),o($VW,[2,45],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB}),o($VY,[2,46],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD,50:$VG,51:$VH}),o($VY,[2,47],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD,50:$VG,51:$VH}),o($VZ,[2,48],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD}),o($VZ,[2,49],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD}),o($VY,[2,50],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD,50:$VG,51:$VH}),o($VY,[2,51],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD,50:$VG,51:$VH}),o([14,15,42,43,54,55,56,57],[2,52],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD,48:$VE,49:$VF,50:$VG,51:$VH,52:$VI,53:$VJ}),o([14,15,42,43,55,56,57],[2,53],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD,48:$VE,49:$VF,50:$VG,51:$VH,52:$VI,53:$VJ,54:$VK}),{33:$Vx,34:$Vy,38:$Vz,41:$VA,42:[1,129],45:$VB,46:$VC,47:$VD,48:$VE,49:$VF,50:$VG,51:$VH,52:$VI,53:$VJ,54:$VK,55:$VL,56:$VM},{33:$Vx,34:$Vy,38:$Vz,41:$VA,43:[1,130],45:$VB,46:$VC,47:$VD,48:$VE,49:$VF,50:$VG,51:$VH,52:$VI,53:$VJ,54:$VK,55:$VL,56:$VM},{14:[1,131],57:$VS},{10:$Vf,11:$Vg,20:132,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},o($VN,[2,39]),{43:[1,133]},o([10,11,31,35,36,37,39,40,41,43,46,47],$VQ,{13:134,57:$VR}),o($VV,$V_),o($VN,[2,57]),{10:$Vs,11:$Vg,20:54,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp,59:135},o($Vq,[2,74],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD,48:$VE,49:$VF,50:$VG,51:$VH,52:$VI,53:$VJ,54:$VK,55:$VL,56:$VM}),{14:[1,136]},o($Ve,[2,17]),o($V1,[2,8]),{10:$Vw,14:$V_,58:137},o($Vq,[2,69],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD,48:$VE,49:$VF,50:$VG,51:$VH,52:$VI,53:$VJ,54:$VK,55:$VL,56:$VM}),{10:$Vf,11:$Vg,20:138,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},o($VN,[2,59]),o($VN,[2,60]),{33:$Vx,34:$Vy,38:$Vz,41:$VA,42:[1,140],43:[1,139],45:$VB,46:$VC,47:$VD,48:$VE,49:$VF,50:$VG,51:$VH,52:$VI,53:$VJ,54:$VK,55:$VL,56:$VM},o($VN,[2,40]),{10:$Vf,11:$Vg,20:141,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,43:$V_,46:$Vo,47:$Vp},o($Vq,[2,72]),{19:[1,142]},o($Vq,[2,67]),o([14,15,42,43,57],[2,58],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD,48:$VE,49:$VF,50:$VG,51:$VH,52:$VI,53:$VJ,54:$VK,55:$VL,56:$VM}),o($VN,[2,37]),{10:$Vf,11:$Vg,20:143,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},o($VU,[2,64],{33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD,48:$VE,49:$VF,50:$VG,51:$VH,52:$VI,53:$VJ,54:$VK,55:$VL,56:$VM}),{10:$Vf,11:$Vg,20:144,31:$Vh,35:$Vi,36:$Vj,37:$Vk,39:$Vl,40:$Vm,41:$Vn,46:$Vo,47:$Vp},{33:$Vx,34:$Vy,38:$Vz,41:$VA,43:[1,145],45:$VB,46:$VC,47:$VD,48:$VE,49:$VF,50:$VG,51:$VH,52:$VI,53:$VJ,54:$VK,55:$VL,56:$VM},{15:[1,146],33:$Vx,34:$Vy,38:$Vz,41:$VA,45:$VB,46:$VC,47:$VD,48:$VE,49:$VF,50:$VG,51:$VH,52:$VI,53:$VJ,54:$VK,55:$VL,56:$VM},o($VN,[2,38]),o($V9,[2,13])],defaultActions:{},parseError:function(str,hash){function _parseError(msg,hash){this.message=msg,this.hash=hash}if(!hash.recoverable)throw _parseError.prototype=Error,new _parseError(str,hash);this.trace(str)},parse:function(input){var self=this,stack=[0],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,recovering=0,TERROR=2,EOF=1,args=lstack.slice.call(arguments,1),lexer=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer,sharedState.yy.parser=this,"undefined"==typeof lexer.yylloc&&(lexer.yylloc={});var yyloc=lexer.yylloc;lstack.push(yyloc);var ranges=lexer.options&&lexer.options.ranges;"function"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var symbol,preErrorSymbol,state,action,r,p,len,newState,expected,lex=function(){var token;return token=lexer.lex()||EOF,"number"!=typeof token&&(token=self.symbols_[token]||token),token},yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null!==symbol&&"undefined"!=typeof symbol||(symbol=lex()),action=table[state]&&table[state][symbol]),"undefined"==typeof action||!action.length||!action[0]){var errStr="";expected=[];for(p in table[state])this.terminals_[p]&&p>TERROR&&expected.push("'"+this.terminals_[p]+"'");errStr=lexer.showPosition?"Parse error on line "+(yylineno+1)+":\n"+lexer.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(symbol==EOF?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer.match,token:this.terminals_[symbol]||symbol,line:lexer.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer.yytext),lstack.push(lexer.yylloc),stack.push(action[1]),symbol=null,preErrorSymbol?(symbol=preErrorSymbol,preErrorSymbol=null):(yyleng=lexer.yyleng,yytext=lexer.yytext,yylineno=lexer.yylineno,yyloc=lexer.yylloc,recovering>0&&recovering--);break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args)),"undefined"!=typeof r)return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0}},lexer=function(){var lexer={EOF:1,parseError:function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},setInput:function(input,yy){return this.yy=yy||this.yy||{},this._input=input,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var ch=this._input[0];this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch;var lines=ch.match(/(?:\r\n?|\n).*/g);return lines?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},unput:function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),lines.length-1&&(this.yylineno-=lines.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(n){this.unput(this.match.slice(n))},pastInput:function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},test_match:function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(backup.yylloc.range=this.yylloc.range.slice(0))),lines=match[0].match(/(?:\r\n?|\n).*/g),lines&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var token,match,tempMatch,index;this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if(tempMatch=this._input.match(this.rules[rules[i]]),tempMatch&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(token=this.test_match(tempMatch,rules[i]),token!==!1)return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?(token=this.test_match(match,rules[index]),token!==!1&&token):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var r=this.next();return r?r:this.lex()},begin:function(condition){this.conditionStack.push(condition)},popState:function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},pushState:function(condition){this.begin(condition)},stateStackSize:function(){return this.conditionStack.length},options:{flex:!0},performAction:function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:this.begin("cond_include");break;case 1:yy.filepath=yy_.yytext;break;case 2:yy.filename=yy_.yytext;break;case 3:this.popState();break;case 4:this.begin("cond_use");break;case 5:yy.filename=yy_.yytext;break;case 6:this.popState();break;case 7:return 9;case 8:return 21;case 9:return 26;case 10:return 28;case 11:return 35;case 12:return 36;case 13:return 37;case 14:stringcontents+=" ";break;case 15:stringcontents+="\n";break;case 16:stringcontents+='"';break;case 17:stringcontents+="\r";break;case 18:stringcontents+="\\";break;case 19:stringcontents+="\0";break;case 20:stringcontents+="a";break;case 21:stringcontents+="\b";break;case 22:stringcontents+="\t";break;case 23:stringcontents+="\n";break;case 24:stringcontents+="\v";break;case 25:stringcontents+="\f";break;case 26:stringcontents+="e";break;case 27:stringcontents+=yy_.yytext;break;case 28:return this.popState(),yy_.yytext=stringcontents,39;case 29:this.begin("cond_string"),stringcontents="";break;case 30:break;case 31:break;case 32:break;case 33:break;case 34:return 40;case 35:return 40;case 36:return 40;case 37:return 10;case 38:return 49;case 39:return 52;case 40:return 50;case 41:return 51;case 42:return 54;case 43:return 55;case 44:return yy_.yytext;case 45:console.log(yy_.yytext)}},rules:[/^(?:include[ \t\r\n>]*<)/,/^(?:[^\t\r\n>]*\/)/,/^(?:[^\t\r\n>\/]+)/,/^(?:>)/,/^(?:use[ \t\r\n>]*<)/,/^(?:[^\t\r\n>]+)/,/^(?:>)/,/^(?:module)/,/^(?:function)/,/^(?:if)/,/^(?:else)/,/^(?:true)/,/^(?:false)/,/^(?:undef)/,/^(?:\\t)/,/^(?:\\n)/,/^(?:\\")/,/^(?:\\r)/,/^(?:\\\\)/,/^(?:\\0)/,/^(?:\\a)/,/^(?:\\b)/,/^(?:\\t)/,/^(?:\\n)/,/^(?:\\v)/,/^(?:\\f)/,/^(?:\\e)/,/^(?:[^\\\n\"]+)/,/^(?:")/,/^(?:[\"])/,/^(?:[\n])/,/^(?:[\r\t ])/,/^(?:\/\/[^\n]*\n?)/,/^(?:\/\*.+\*\/)/,/^(?:([0-9])*\.([0-9])+([Ee][+-]?([0-9])+)?)/,/^(?:([0-9])+\.([0-9])*([Ee][+-]?([0-9])+)?)/,/^(?:([0-9])+([Ee][+-]?([0-9])+)?)/,/^(?:\$?[a-zA-Z0-9_]+)/,/^(?:<=)/,/^(?:>=)/,/^(?:==)/,/^(?:!=)/,/^(?:&&)/,/^(?:\|\|)/,/^(?:.)/,/^(?:.)/],conditions:{cond_include:{rules:[0,1,2,3,4,7,8,9,10,11,12,13,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},cond_use:{rules:[0,4,5,6,7,8,9,10,11,12,13,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},cond_comment:{rules:[0,4,7,8,9,10,11,12,13,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},cond_string:{rules:[0,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},cond_import:{rules:[0,4,7,8,9,10,11,12,13,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},INITIAL:{rules:[0,4,7,8,9,10,11,12,13,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return lexer}();return parser.lexer=lexer,Parser.prototype=parser,parser.Parser=Parser,new Parser}();"undefined"!=typeof require&&"undefined"!=typeof exports&&(exports.parser=parser,exports.Parser=parser.Parser,exports.parse=function(){return parser.parse.apply(parser,arguments)},exports.main=function(args){args[1]||(console.log("Usage: "+args[0]+" FILE"),process.exit(1));var source=require("fs").readFileSync(require("path").normalize(args[1]),"utf8");return exports.parser.parse(source)},"undefined"!=typeof module&&require.main===module&&exports.main(process.argv.slice(1)))}).call(this,require("_process"))},{"./ArgContainer":11,"./ArgsContainer":12,"./Expression":17,"./IfElseModuleInstantiation":20,"./ModuleInstantiation":24,"./openscad-parser-ext":31,_process:4,fs:1,path:3}],34:[function(require,module,exports){var parser=require("./parserCJS"),Globals=require("./Globals");module.exports={parse:function(text){void 0===parser.yy&&(parser.yy={});var openSCADText=Globals.preParse(text),openJSCADResult=parser.parse(openSCADText);return openJSCADResult.lines.join("\n")}}},{"./Globals":19,"./parserCJS":33}]},{},[34])(34)});
|