diff --git a/docs/zh/conf/base.md b/docs/zh/conf/base.md index 154d2ff..0795378 100644 --- a/docs/zh/conf/base.md +++ b/docs/zh/conf/base.md @@ -160,21 +160,38 @@ http { - 在《设置模板》中设置报表运行前的脚本(后端运行前脚本)添加代码: ~~~js -function resetDefaultParam(name){ - if(name=='branch_no')//如果参数名是branch_no ,那么缺省参数就是改为 xxxxx - return 'xxxxx'; -} +function resetDefaultParam(param_name,param_row){ //param_row 参数可以动态修改参数定义,下面例子是修改下拉可选项 + __env__.logger.info(param_name+'---'+param_row.getData("value")); + if(param_name=="abc"){ + if(你的判断成立){ + param_row.setData("allowCreate", true);// 设置为可动态添加 + param_row.setData("tagValueList", [['A','1'],['B','2']]);// 动态添加可选项 + } + // param_row.setData("Inner", true);// 设置为内部参数,前端将看不到hidden ,但后端是可用的 + // param_row.setData("default_value", '1');// 设置为缺省值,或者用下行的方式返回缺省值 + return '1';//返回缺省值 + } + + } ~~~ ## 参数的最终重置 ~~~js -function lastSetParam(name){ +function lastSetParam(name,param_row){ if(name=='branch_no')//如果参数名是branch_no ,那么最终参数就是改为 xxxxx,不管用户输入的是什么,都改 return 'xxxxx'; } ~~~ +## 数据集取数完成后执行的动作 + +可以定义\_after_calc_dataset_这个函数,使得在数据集取数完成后,执行特定动作: +``` js +function _after_calc_dataset_(){ + _zb_var_.my_ds_cnt= 部位2.count();// 将部位2 数据集的行数存到_zb_var_.my_ds_cnt +} +``` ## 前端隔行变色和条件颜色的配置 全局缺省配置,在安装目录的template.xml的footer2中。可以视情况修改 @@ -196,19 +213,21 @@ window.luckysheet_alternateformat_save='{"cellrange":{"row":[0,8],"column":[-1,- ## 前端的公共数据 - 前端组件的《编辑内容》中,可以使用以下参数引用后端传过来的数据.可以通过添加《动态模板》,将以下代码片段复制到内容里面做测试,以便找到适合自己使用的代码。 +- 在组件中调用全局数据要使用 _this.context ~~~js - context.clickedEle['test'] //点击test 元素后选中的数据,这里的元素指的是页面上的可点击单元。 + _this.context.clickedEle['test'] //点击test 元素后选中的数据,这里的元素指的是页面上的可点击单元。 //结构为:{data:deepClone(cur_data[0]),cell:cell.innerText,column} - context.report_result.dataSet //sql 结果数据,只有在设计预览状态,或设置变量_need_dataset_=True时才会有这个数据 + _this.context.report_result.dataSet //sql 结果数据,只有在设计预览状态,或设置变量_need_dataset_=True时才会有这个数据 // 内部为多个array ,每一个代表的都是数据集。如 context.report_result.dataSet['test'][0] 是数组。 里面才是真正的数据,第一行是表头,其他是数据 // 可以简写: - dataset('累计') - - context.report_result.data['main'] //页面上名字叫main 的报表数据。 + _this.dataset('累计') + + _this.context.report_result.data['main'] //页面上名字叫main 的报表数据。 // 格式为:{columns:[],tableData:[],colName_lines:[0,2],extend_lines:[4,22]} , // tableData 存放的所有单元格的数据。colName_lines 列标题起止范围,extend_lines 明细行起止范围 - + _this.context.queryForm //当前报表参数,可以修改,然后调用下面的submit提交 + _this.context.rpt_this.submit() //提交查询 self 配置 ~~~ @@ -247,6 +266,9 @@ _zb_var_.watermark={ |`dataset('累计')[0]` | 取数据集:累计 的列名 | | `dataset('累计').slice(1)` | 取数据集的数据 | |`Enumerable.from(dataset('累计')).skip(1).select(x=> {return {'name':x[0],value:x[1]} }).toArray()` | 转换数据集累计中的数据为对象:name属性对应第一列,value对应第二列 ,最后转换为数组返回| + + + ~~~html ",{a:1, ...{b:2} }); // {"a":1,"b":2} +{a:1, ...{a:3,b:2} } ; //{"a":3,"b":2} +[...[1,1+2],4] // [1,3,4] +``` + +### 语句规范 ::: warning 普通单独语句必须以分号结束,for 、function 等语句块 后不跟分号 ::: -- 变量定义 +### 变量定义 ~~~js var my_test_1="22";//必须以var 开始 ~~~ -- 条件语句 if + + +### 条件语句 if ~~~js if(param.b_date=='2022-01-01') return '2022元旦'; @@ -76,7 +90,7 @@ else return '不是2022元旦'; ~~~ -- 循环for +### 循环for ~~~js var lj_sum=0; for(var i=0;i<10;i++){ @@ -92,7 +106,7 @@ foreach(var one in ds){ } ~~~ -- 函数定义 +### 函数定义 ~~~js function hello(p){ return "hello "+p; @@ -106,3 +120,489 @@ function func_parent(p){ } ~~~ + +## 后端linq + +\$ 表示循环变量。通常参数都是lambda 函数。集合运算函数中不支持 +绝大部分函数都是延迟计算。 + +### All(判断函数) +确定序列中的所有元素是否都满足条件。 +参数: 用于测试每个元素是否满足条件的函数。 +``` js +var test_arr=[4,2,3,1,5,7,6,8,10,9,]; +test_arr.all(x=>x<11);//true +test_arr.all(x=>x<3);//false +``` + +### Append() +添加一个元素。不影响原有的列表 +``` js +var test_arr=[1,2,3]; +var sencond=test_arr.Append(4);// [1,2,3,4] + +``` + +### Any(判断函数) +确定序列中是否存在元素满足指定条件。 +参数: 用于测试每个元素是否满足条件的函数。 +``` js +var test_arr=[4,2,3,1,5,7,6,8,10,9,]; +test_arr.any(x=>x<1);//false +``` +### Count() +序列计数。 +如果没有参数,然后序列元素的个数 +如果包含参数,这个参数需要是一个 用于测试每个元素是否满足条件的函数,最终返回满足判断函数的元素个数。 +``` js +var test_arr=[4,2,3,1,5,7,6,8,10,9,]; +test_arr.Count();// 10 +test_arr.Count(x=>x>8);// 2 +``` + +### Concat() +连接多个序列 +``` js +[1,2,3].Concat([2,3,4]) ;// [1,2,3,2,3,4] +[1,2,3].Concat([2],[3,4]) ;// [1,2,3,2,3,4] +``` + +### Contains() +是否保含元素。 +如果只有一个参数,使用缺省判断函数测试是否包含这个参数 +如果两个参数,第二个参数是用于判断是否相等的函数,使用这个判断函数测试是否包含这个第一个参数 +``` js +var test_arr=[4,2,3,1,5,7,6,8,10,9,]; +test_arr.Contains(2);// true +var arr2 = [{Name:"A", 'Val':1}, {'Name':"B", 'Val':2}]; +var res2 = arr2.contains({'Name':"C", 'Val':2}, (a, b)=>{ return a.Val == b.Val; }) ; // true +``` + +### Distinct() +是否保护元素。 +如果没有参数,通过使用默认的相等比较器对值进行比较,返回序列中的非重复元素。 +如果一个参数,这个参数是用于判断是否相等的函数,使用这个判断函数比较器对值进行比较,返回序列中的非重复元素。 +``` js +trace('[1,2,1,3].distinct()',[1,2,1,3].distinct()); //[1,2,3] +[{Name:"A", Val:1}, {Name:"B", Val:1}].distinct((a, b)=>{ return a.Val == b.Val; });//{Name:"A", Val:1} +``` + +### First() +返回第一个元素。 +如果没有参数,返回第一个元素。 +如果一个参数,第一个参数是用于判断条件是否成立的函数,返回满足条件的第一个元素 +``` js +var test_arr=[4,2,3,1,5,7,6,8,10,9,]; +test_arr.First(x=>x>8);//10 +test_arr.First();//4 +``` + +### Last() +返回最后一个元素。 +如果没有参数,返回最后一个元素。 +如果一个参数,第一个参数是用于判断条件是否成立的函数,返回满足条件的最后一个元素,如果没有,就返回null +如果有第二个参数,这个参数是用于返回没有last元素时应该返回的值 +``` js +var test_arr=[4,2,3,1,5,7,6,8,10,9,]; +test_arr.Last(x=>x<4);//1 +test_arr.Last();//9 +test_arr.Last(x=>x>14 , -1); // 由于没有满足条件的元素,所以返回 -1 +``` + +### Where(判断函数) +基于谓词筛选值序列。 +参数: 用于测试每个元素是否满足条件的函数。 +``` js +var test_arr=[4,2,3,1,5,7,6,8,10,9,]; +test_arr.where(x=>x>8);//[10,9] +``` + +### max() +如果有第一个参数,这个参数是返回key函数,最终返回最大的key 值。如果没有参数,就按元素本身比较 +``` js + +var arr1 = [1, 2, 3, 4, 5, 6, 7, 8]; +var max1 = arr.max(); // 8 + +var arr2 = [{Name:"A", Val:1}, {Name:"B", Val:2}]; +var max2 = arr2.max(function(t){ return t.Val }); // 2 +``` + +### min() +如果有第一个参数,这个参数是返回key函数,最终返回最小的key 值。如果没有参数,就按元素本身比较 +``` js +var arr1 = [1, 2, 3, 4, 5, 6, 7, 8]; +var min1 = arr.min(); // 1 + +var arr2 = [{Name:"A", Val:1}, {Name:"B", Val:2}]; +var min2 = arr2.min(function(t){ return t.Val }); // 1 +``` + +### MaxBy() +第一个参数是返回key函数,最终返回最大的key 值对应的元素 +``` js +var arr2 = [{Name:"A", 'Val':1}, {'Name':"B", 'Val':2}]; +trace('MaxBy(x=>x.Val)',arr2.MaxBy(x=>x.Val));//{'Name':"B", 'Val':2} +``` + +### MinBy() +第一个参数是返回key函数,最终返回最小的key 值对应的元素 +``` js +var arr2 = [{Name:"A", 'Val':1}, {'Name':"B", 'Val':2}]; +trace('MinBy(x=>x.Val)',arr2.MinBy(x=>x.Val));//{Name:"A", 'Val':1} +``` + +### Sum() +第一个参数是返回key函数,最终返回最小的key 值对应的元素 +``` js +var arr1 = [1, 2, 3, 4, 5, 6, 7, 8]; +var sum1 = arr.sum(); // 36 + +var arr2 = [{Name:"A", Val:1}, {Name:"B", Val:2}]; +var sum2 = arr2.sum(function(t){ return t.Val }); // 3 +``` + +### Reduce +第一个参数是计算前面计算结果和当前元素的函数,第二个参数是初始值。很强大的函数 +``` js +var fruits = [ { description: 'orange', Amount: 50}, { description: 'orange', Amount: 50}, + { description: 'apple', Amount: 75}, { description: 'kiwi', Amount: 35}, { description: 'watermelon', Amount: 25},]; + +trace('reduce(235)', fruits.map(item => item.Amount).reduce((prev, curr) => prev + curr, 0) ); //reduce 函数, +var sentence = "the quick brown fox jumps over the lazy dog"; +trace('sentence(原始)', sentence ); +trace('reduce(反转)', split(sentence," ").reduce((prev, curr) => curr +' ' +prev) ); + +``` + +### Select +将序列中的每个元素投影到新序列。 +``` js + var test_arr=[{'a':1},{'a':2},{'a':3}]; + test_arr.Where(x=>x.a>1).Select( x=> {return {'b':x.a*2}; } ) ; // [{'b':4},{'v':6}] +``` + +### SelectMany +Projects each element of a sequence to an array and flattens the resulting sequences into one sequence. +处理序列中的每一个元素,并且熨平结果到一个新的大序列结果中。 +第一个参数:返回每个元素对应的序列 的函数。这个函数的第二个参数是元素所在位置 +第二个参数(可选) : 需要两个参数。第一个参数,原始序列中的元素,第二个参数,中间序列中的元素,返回这两个参数计算后的新元素的序列 + +``` js +var arr = [{Name:"A", Values:[1, 2, 3, 4]}, {Name:"B", Values:[5, 6, 7, 8]}]; + +arr.selectMany(t=>{ return t.Values; });// [1, 2, 3, 4,5, 6, 7, 8] + +arr.selectMany(t=>{ return t.Values; }, (t, u)=>{ return {Name:t.Name, Val:u};}); +// [{"Name":"A","Val":1},{"Name":"A","Val":2},{"Name":"A","Val":3},{"Name":"A","Val":4},{"Name":"B","Val":5},{"Name":"B","Val":6},{"Name":"B","Val":7},{"Name":"B","Val":8}] +``` + +### ForEach +对序列中的每个元素都调用一次函数参数 +``` js +var arr = [1, 2, 3, 4, 5]; +arr.forEach(t=>{ if(t % 2 ==0) trace(t); }); +``` + +### groupBy + 第一个参数:key选择器 + 第二个参数可选:如果没有,就是将同组的元素放到一个List序列中。如果有,对同组的元素都调用这个处理函数,返回新元素组成新的List序列 + 第三个参数:对结果进一步出来,处理函数接收两个参数(Key,中间List序列),作为最终结果返回。如果没有这个参数,就将(Key,中间List序列) 作为最终结果返回 +``` js +var arr = [{Name:"A", Val:1}, {Name:"A", Val:1}, {Name:"C", Val:3}, {Name:"C", Val:4}]; +var res = arr.groupBy( function(t){ return t.Name; } ); +res.forEach(function(t){ + trace("Key: " + t.Key, "OBJ: ", t); +}); +// Key: A OBJ: {"Key":"A","Value":[{"Name":"A","Val":1},{"Name":"A","Val":2}]} +// Key: C OBJ: {"Key":"C","Value":[{"Name":"C","Val":3},{"Name":"C","Val":4}]} +var res = arr.groupBy( function(t){ return t.Name; } ,$.Val); +res.forEach(function(t){ + trace("Key: " + t.Key, "OBJ: ", t); +}); +// Key: A OBJ: {"Key":"A","Value":[1,2]} +// Key: C OBJ: {"Key":"C","Value":[3,4]} +var res = arr.groupBy( x=>x.Name ,v=>v, (k,v)=>{ return {k,cnt:v.Count(),min:v.min($.Val),sum:v.sum(x=>x.Val) }; } ); +res.forEach(function(t){ + trace("Key: " + t.Key, "OBJ: ", t); +}); +// Key: A OBJ: {"Key":"A","Value":{"k":"A","cnt":2,"min":1,"sum":3}} +// Key: C OBJ: {"Key":"C","Value":{"k":"C","cnt":2,"min":3,"sum":7}} +``` +### ToDictionary +转换为Dictionary +第一个参数:key选择器 +第二个参数可选 +``` js +var arr = [{Name:"A", Val:1}, {Name:"A", Val:2}, {Name:"C", Val:3}, {Name:"C", Val:4}]; +var res = arr.groupBy( $.Name ).ToDictionary($.Key,$); +trace(res); +// {"A":[{"Name":"A","Val":1},{"Name":"A","Val":2}],"C":[{"Name":"C","Val":3},{"Name":"C","Val":4}]} + +``` +### Slice +和js 中slice 类似。参数:起始位置 结束位置,如果为负数,就是从结尾倒数 +``` js +var test_arr=fromto(1,10); +trace('slice()',test_arr.slice()); //不输入参数就是全部 +trace('slice(2)',test_arr.slice(2)); // 跳过两个 +trace('slice(1,3)',test_arr.slice(1,3)); //取第1 个(含) 到 第3 个(不含)。前含后不含 +trace('slice(-3,-1)',test_arr.slice(-3,-1));// 倒数第三个到倒数第三个 +trace('slice(-3)',test_arr.slice(-3));// 从倒数第三个开始 +``` + +### Take +从头开始返回指定数目的元素 +``` js +trace('take(2)=',test_arr.Take(2));// 返回两个 +``` + +### Skip +从头开始跳过指定数目的元素后,其他全部返回 +``` js +trace('Skip(2)=',test_arr.Skip(2));// 跳过两个 +``` +### TakeWhile +只要条件满足就返回到新序列里面,直到遇到不满足的第一个条件开始,剩余的全部忽略 +``` js +trace('TakeWhile(x=>x<5)',test_arr.TakeWhile(x=>x<5)); +``` + +### SkipWhile +只要条件满足就跳过,直到遇到不满足的第一个条件开始,剩下的全部返回到新序列里面 +``` js +trace('skipWhile(x=>x<5)',test_arr.skipWhile(x=>x<5)); +``` +### orderBy thenBy ThenByDescending orderByDescending +升序。稳定排序 +参数:根据键对序列的元素进行排序。有orderby的后面才可以跟thenby . +``` js +var arr = [ {Name:"C", Val:3}, {Name:"C", Val:4},{Name:"A", Val:11}, {Name:"A", Val:2},]; +trace( arr.orderby(x=>x.Name).ThenBy(x=>-x.Val)); +// [{"Name":"A","Val":11},{"Name":"A","Val":2},{"Name":"C","Val":4},{"Name":"C","Val":3}] +trace( arr.orderby(x=>x.Name).ThenByDescending(x=>-x.Val)); +// [{"Name":"A","Val":2},{"Name":"A","Val":11},{"Name":"C","Val":3},{"Name":"C","Val":4}] +``` +### zip +打包 +``` js +var numbers = [ 1, 2, 3, 4, ]; +var words = [ "one", "two", "three" ]; +numbers.Zip(words ).forEach(item=>trace(item) ); +//[1,"one"] +//[2,"two"] +//[3,"three"] +numbers.Zip(words, (first, second) => first + "===" + second).forEach(item=>trace(item) ); +//1===one +//2===two +//3===three +``` +### Except +生成两个序列的差集。 +``` js +trace({a:1,b:2}.Except({a:1}).ToDictionary($.Key,$.Value)); // [{"Key":"b","Value":2}] +trace([ 1, 2, 3, 4, ].Except([ 1, 2, ])); // [3,4] +trace("1ab11dc".Except("abc")); // ['1','d'] +trace([ 1, 2, 3, 4, ].Except([ "abc" ])); // 异常,不能执行 + +``` +### ExceptBy +根据指定的键选择器函数生成两个序列的集差异。 +``` js +var arr1 = [{Name:"A", Val:1}, {Name:"B", Val:2}, {Name:"C", Val:3}]; +var arr2 = [{a:"A"}]; +var res1 = arr1.ExceptBy(arr2, + t=> t.Name , // arr1 关键字选择器 + (x,y)=>x.a==y // 比较运算器 x是arr2里的记录 y 是上面的关键字选择器的结果。如果关键字选择器 的结果类型和arr2 一样,这个参数可以省略 + ) ; + trace(res1); // [{"Name":"B","Val":2},{"Name":"C","Val":3}] +var arr1 = [{Name:"A", Val:1}, {Name:"B", Val:2}, {Name:"C", Val:3}]; +var arr2 = ["A"]; +var res1 = arr1.ExceptBy(arr2, + t=> t.Name // arr1 关键字选择器 + ) ; + trace(res1); // [{"Name":"B","Val":2},{"Name":"C","Val":3}] +``` + +### Intersect +生成两个序列的交集。 +``` js +trace({a:1,b:2}.Intersect({a:1})); // [{"Key":"a","Value":1}] +trace([ 1, 2, 3, 4, ].Intersect([ 1, 2, ])); // [1,2] +``` +### IntersectBy +根据指定的键选择器函数生成两个序列的交集。 +``` js +var arr1 = [{Name:"A", Val:1}, {Name:"B", Val:2}, {Name:"C", Val:3}]; +var arr2 = [{a:"A"}]; +var res1 = arr1.IntersectBy(arr2, + t=> t.Name , // arr1 关键字选择器 + (x,y)=>x.a==y // 比较运算器 x是arr2里的记录 y 是上面的关键字选择器的结果。如果关键字选择器 的结果类型和arr2 一样,这个参数可以省略 + ) ; + trace(res1); // [{"Name":"A","Val":1}] +var arr1 = [{Name:"A", Val:1}, {Name:"B", Val:2}, {Name:"C", Val:3}]; +var arr2 = ["B"]; +var res1 = arr1.IntersectBy(arr2, + t=> t.Name // arr1 关键字选择器 + ) ; + trace(res1); // [{"Name":"B","Val":2}] +``` +### union +生成两个序列的集联合。 +``` js +var arr1 = [1, 2, 3, 4, 5]; +var arr2 = [5, 6, 7, 8, 9]; +var res = arr1.union(arr2); // [1, 2, 3, 4, 5, 6, 7, 8, 9] + trace(res); // [] + ``` + +### unionBy +根据指定的键选择器函数生成两个序列的集联合。 +``` js +var arr1 = [{Name:"A", Val:1}, {Name:"B", Val:2}, {Name:"C", Val:3}]; +var arr2 = [{Name:"A"}]; +var res1 = arr1.unionBy(arr2, + t=> t.Name , // arr1 关键字选择器 + (x,y)=>x.a==y // 比较运算器 x是arr2里的记录 y 是上面的关键字选择器的结果。如果关键字选择器 的结果类型和arr2 一样,这个参数可以省略 + ) ; + trace(res1); // + ``` + +### groupJoin +基于键值等同性将两个序列的元素进行关联,并对结果进行分组。 +``` js +var arr1 = [{Name:"A", Val:1}, {Name:"B", Val:2}, {Name:"C", Val:3}]; +var arr2 = [{Code:"A"}, {Code:"A"}, {Code:"B"}, {Code:"B"}, {Code:"C"}]; +var res1 = arr1.groupJoin(arr2, + t=> t.Name, // arr1 selector + u=>u.Code, // arr2 selector + (t, u)=>{ return {Item:t, Group:u} ;}) ; // result selector +trace(res1); +// [ +// {"Item":{"Name":"A","Val":1},"Group":[{"Code":"A"},{"Code":"A"}]}, +// {"Item":{"Name":"B","Val":2},"Group":[{"Code":"B"},{"Code":"B"}]}, +// {"Item":{"Name":"C","Val":3},"Group":[{"Code":"C"}]}] +``` + +### join +基于匹配键对两个序列的元素进行关联。 +``` js +var test_join= + [{a:1,b:2},{a:2,b:2}].join([{a:1,b:'b11'},{a:11,b:'b222'}], + left=>left.a , + right=>right.a, + (left,right)=>{key:left.a,left_prop:left.b,right:right.b } +); +// [{"key":1,"left_prop":2,"right":"b11"}] + +trace(test_join); +``` +### JoinAsString +将列表中的每一项取ToString(),然后用参数指定的字符串连接起来,如果没提供,就用逗号链接 +``` js +[ "one", "two", "three" ].joinAsString();//one,two,three +[ "one", "two", "three" ].joinAsString(',');//one','two','three +``` +### ToList +以上所有返回的是序列的函数,内部都是一个枚举对象,使用这个函数,将枚举对象转换为真正的序列列表 +``` js +test_arr.skipWhile(x=>x<5).ToList(); +``` + +### 大量的例子 +``` js +function test_parse_json(){ + var test_arr=[1,2,3]; + __env__.logger.error( test_arr.Where(x=>x>2).Select( x=> x*2 ) ); + for(var one in test_arr.Where(x=>x>2).Select( x=> x*2 )){ + __env__.logger.error("one:"+ one.ToString() ); + } + var test_arr=[{'a':1},{'a':2},{'a':3}]; + test_arr.Where(x=>x.a>2).Select( x=> {return {'b':x.a*2}; } ) ; + + var txt='{"a":1,"b":[1,2,3]}'; + return json_parse(txt); +} +var lambds_func= function(x){ return 1+33 ;}; +function test_lambda_func(func){ + trace('test_lambda_func'); + trace(func()); +} +test_lambda_func(x=>1+2); + +trace('lambds_func(1)='+lambds_func(1)); +var test_arr=fromto(1,10); +trace('slice()',test_arr.slice()); //和js 中slice 类似,不输入参数就是全部 +trace('slice(2)',test_arr.slice(2)); // 跳过两个 +trace('slice(1,3)',test_arr.slice(1,3)); //取第1 个(含) 到 第3 个(不含)。前含后不含 +trace('slice(-3,-1)',test_arr.slice(-3,-1));// 倒数第三个到倒数第三个 +trace('slice(-3)',test_arr.slice(-3));// 从倒数第三个开始 +var fruits = [ { description: 'orange', Amount: 50}, { description: 'orange', Amount: 50}, + { description: 'apple', Amount: 75}, { description: 'kiwi', Amount: 35}, { description: 'watermelon', Amount: 25},]; + +trace('reduce(235)', fruits.map(item => item.Amount).reduce((prev, curr) => prev + curr, 0) ); //reduce 函数,第一个参数是计算前面计算结果和当前元素的函数,第二个参数是初始值 +var sentence = "the quick brown fox jumps over the lazy dog"; +trace('sentence(原始)', sentence ); +trace('reduce(反转)', split(sentence," ").reduce((prev, curr) => curr +' ' +prev) ); +trace('---------------------------'); +trace('[1,2,1,3].distinct()',[1,2,1,3].distinct());// 如果没有参数,就是对每个元素做distinct ,如果有参数,这个参数需要是用来做比较的函数 +trace('[{Name:"A", Val:1},{Name:"B", Val:1}].distinct(function(a, b){ return a.Val == b.Val })',[{Name:"A", Val:1}, {Name:"B", Val:1}].distinct((a, b)=>{ return a.Val == b.Val; })); + +var test_arr=[4,2,3,1,5,7,6,8,10,9,]; +trace('test_arr=',test_arr); + +trace('all(x=>x<10)',test_arr.all(x=>x<11));//全部为true +trace('any(x=>x<2)',test_arr.any(x=>x<2));// 有为true +trace('skipWhile(x=>x<5)',test_arr.skipWhile(x=>x<5)); //只要条件满足就跳过,直到遇到不满足的第一个条件开始,剩下的全部返回到新序列里面 +trace('TakeWhile(x=>x<5)',test_arr.TakeWhile(x=>x<5));//只要条件满足就返回到新序列里面,直到遇到不满足的第一个条件开始,全部忽略 +trace('Min()',test_arr.Min()); +trace('Max()',test_arr.Max()); +trace('Sum()',test_arr.Sum()); + + +trace('take(2)=',test_arr.Take(2));// 返回两个 +trace('Skip(2)=',test_arr.Skip(2));// 跳过两个 +trace('First()=',test_arr.First()); //第一个 +trace('First(x=>x>4)=',test_arr.First(x=>x>4)); //满足条件的第一个,如果没有就返回空 +trace('First(x=>x>14 ,-1 ) ',test_arr.First(x=>x>14 , -1)); //满足条件的第一个,如果没有就返缺省值(第二个参数) +trace('---------------------------'); +trace('Last()',test_arr.Last());//和first类似 +trace('Last(x=>x>4)',test_arr.Last(x=>x>4)); +trace('Last(x=>x>14 ,-1 ) ',test_arr.Last(x=>x>14 , -1)); +trace('ForEach(x=>x>4)\n',test_arr.ForEach(x=> trace('foreach:',x)));//ForEach 对每个元素用函数处理一下 +trace('---------------------------'); +trace('Contains(3) ',test_arr.contains(3)); + +var arr2 = [{Name:"A", 'Val':1}, {'Name':"B", 'Val':2}]; +trace(arr2); +var res2 = arr2.contains({'Name':"C", 'Val':2}, (a, b)=>{ return a.Val == b.Val; }) ; // true +trace('MinBy(x=>x.Val)',arr2.MinBy(x=>x.Val)); //以函数计算后,满足最小条件的元素 +trace('MaxBy(x=>x.Val)',arr2.MaxBy(x=>x.Val));//以函数计算后,满足最大条件的元素 +trace('Sum(x=>x.Val)',arr2.Sum(x=>x.Val)); //以函数计算后的结果求和 + +trace("arr2.contains({'Name':\"C\", 'Val':2}, (a, b)=>{ return a.Val == b.Val; }) ",res2); +trace('---------------------------'); + var test_arr=fromto(1,10); + trace("text !!!"); + trace( json_stringify( test_arr.Where(x=>x>2).Select( x=> x*2 ).ToList() ) );//可以级联。ToList转换为列表(类似js里面的数组和c#里面的List) + + for(var one in test_arr.Where(x=>x>2).Select( x=> x*2 )){ + trace("one:"+ one.ToString() ); + } + var test_arr=[{'a':1},{'a':2},{'a':3}]; + trace( test_arr.Where(x=>x.a>1).Select( x=> {return {'b':x.a*2}; } ).ToList()); + +var lambds_func= (x)=>{ return 1+1 ;}; +trace('lambds_func(1)='+lambds_func(1)); +``` +### 修改数据集数据 +如果需要取完数据后,对数据集内的数据进行修改,我们必须要使用ds.Rows取出对应的行集。循环这个行集逐个修改。不能对数据集新增列,如果需要新增,我们要在sql 中提前准备好这个列,供我们修改使用。 +``` js +function _after_calc_dataset_(){ + trace(" begin _after_calc_dataset_"); + trace(ds.Rows.select(x=>[x.排名, x.链接Id] ));// 打印修改前的数据 + ds.Rows.ForEach(x=>{x.setData('排名',1111);} );//修改数据 + trace(ds.Rows.select(x=>[x.排名, x.链接Id] ));// 打印修改后的数据 + trace(" end _after_calc_dataset_"); +} +``` \ No newline at end of file diff --git a/end/CellReport.dll b/end/CellReport.dll index 25b7bc8..cad22dc 100644 Binary files a/end/CellReport.dll and b/end/CellReport.dll differ diff --git a/end/reportWeb/Controllers/DesignController.cs b/end/reportWeb/Controllers/DesignController.cs index a2a8f32..9e790b7 100644 --- a/end/reportWeb/Controllers/DesignController.cs +++ b/end/reportWeb/Controllers/DesignController.cs @@ -62,7 +62,7 @@ public DesignController(IConfiguration configuration, json_option.Converters.Add(new CellReport.math.BigDecimalConverter()); json_option.Converters.Add(new CellReport.util.DateConverter()); json_option.Converters.Add(new CellReport.util.DateTimeConverter()); - + json_option.Converters.Add(new CellReport.util.DBNullConverter()); } private String getFormValue(string name) { @@ -121,8 +121,8 @@ public async Task Preview(String _content,String _ConnectionId,st try { long start = DateTime.Now.Ticks; - System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument(); - xmlDoc.LoadXml(_content); + System.Xml.XmlDocument xmlDoc =Content2XmlDoc(_content); + if (reportName!=null && reportName.Contains(":")) reportName = reportName.Split(":")[1]; var reportDefine = await XmlReport.loadReportFromXmlDoc(xmlDoc, this.rpt_group.report_path, reportName??"temp.cr"); @@ -131,7 +131,8 @@ public async Task Preview(String _content,String _ConnectionId,st { report_env.getExprFaced().addVariable("_fresh_ds", _fresh_ds); } - report_env.logger = + + report_env.logger = _ConnectionId==null ? logger : new Logger(x => MessageQueueBlock .Add(new DemoMessage() { @@ -230,7 +231,15 @@ public async Task Preview(String _content,String _ConnectionId,st jsonWriter.Write(",\"errcode\":1,\"message\":"); jsonWriter.Write(JsonSerializer.Serialize(sb.ToString(), json_option)); } - + jsonWriter.Write(",\"_zb_var_\":"); + if (exprFaced.getVariable("_zb_var_") != null) + { + jsonWriter.Write(JsonSerializer.Serialize(exprFaced.getVariable("_zb_var_"), report_env.getJsonOption())); + } + else + { + jsonWriter.Write("{}"); + } jsonWriter.Write("\n}"); await jsonWriter.FlushAsync(); jsonStream.Position = 0; @@ -242,18 +251,8 @@ public async Task Preview(String _content,String _ConnectionId,st if (Request.HasFormContentType && (Request.Form.ContainsKey("__call_func"))) { var func_json = JsonDocument.Parse(Request.Form["__call_func"].ToString()).RootElement; - if (func_json.TryGetProperty("func_name", out var func_name) && func_json.TryGetProperty("func_params", out var func_params)) - { - if (null != exprFaced.getVariable(func_name.GetString())) - { - var result = exprFaced.calculate($"={func_name.GetString()}({func_params.GetRawText()})"); - await Response.WriteAsJsonAsync(result, report_env.getJsonOption()); - } - else - await Response.WriteAsJsonAsync(new { errcode = -1, message = $"没有自定义函数{func_name}" }, report_env.getJsonOption()); - } - else - await Response.WriteAsJsonAsync(new { errcode = -1, message = $"客户端调用函数{func_name},没有定义func_name或func_params" }, report_env.getJsonOption()); + Object result = CellReport.core.expr.ExprHelper.calc_client_func(report_env, func_json); + await Response.WriteAsJsonAsync(result, report_env.getJsonOption()); } else { @@ -289,6 +288,8 @@ public async Task Preview(String _content,String _ConnectionId,st return new EmptyResult(); }catch(Exception ex) { + while (ex.InnerException != null) + ex = ex.InnerException; return Json(new { errcode = 1, message = ex.Message,stacktrace=ex.StackTrace }); } } @@ -332,7 +333,7 @@ public IActionResult exec_expr(String expr) exprFaced.addVariable("_zb_var_", new Dictionary()); exprFaced.addVariable("_rpt_group_", rpt_group); - var exec_result = exprFaced.calculate("{\n" + expr + "\n}", null); + var exec_result = exprFaced.calculate("{ " + expr + "\n}", new()); if(exec_result is Exception ex) { throw ex; @@ -341,6 +342,8 @@ public IActionResult exec_expr(String expr) } catch (Exception ex) { + while (ex.InnerException != null) + ex = ex.InnerException; return Json(new { errcode = 1, message = ex.Message },json_option); } } @@ -438,7 +441,7 @@ public async Task Open(String reportName,string zb_dict_str,strin { Env parent_env = new Env(); await XmlReport.templateValue2Env(this.rpt_group.report_path, reportName, parent_env); - var xmlDoc = (await XmlReport.getReportXmlDoc(this.rpt_group.report_path, reportName)).xml; + var xmlDoc = (await XmlReport.getReportXmlDoc(this.rpt_group.report_path, reportName,isDesign:true)).xml; //var ret = XmlReport.reportToXmlDocumnt(XmlReport.loadReport(file_path), false).OuterXml; //var report_content = await System.IO.File.ReadAllTextAsync(file_path, System.Text.Encoding.UTF8); var conn_list =from x in this.rpt_group.db_connection_list select x.name; @@ -458,7 +461,7 @@ public async Task Open(String reportName,string zb_dict_str,strin private async Task insert_ds_param(string reportName, string zb_dict_str,string zb_param) { var file_path = Path.Combine(this.rpt_group.report_path, reportName); - var xmlDoc = (await XmlReport.getReportXmlDoc(this.rpt_group.report_path, reportName)).xml; + var xmlDoc = (await XmlReport.getReportXmlDoc(this.rpt_group.report_path, reportName,isDesign:true)).xml; //var ret = XmlReport.reportToXmlDocumnt(XmlReport.loadReport(file_path), false).OuterXml; //var report_content = await System.IO.File.ReadAllTextAsync(file_path, System.Text.Encoding.UTF8); var xml_elem_root = xmlDoc.SelectSingleNode("//report"); @@ -599,11 +602,9 @@ public async Task Save(String reportName, String content, string } if (!fileInfo.Exists || (fileInfo.Exists && String.IsNullOrEmpty(zb_dict_str))) { - content=content.Replace("><", ">\n<"); - //content = Regex.Replace(content, @".*?", ""); - //content = Regex.Replace(content, @".*?", ""); - //content = Regex.Replace(content, @".*?", ""); - await System.IO.File.WriteAllTextAsync(file_path, content, System.Text.Encoding.UTF8); + System.Xml.XmlDocument xmlDoc = Content2XmlDoc(content); + + xmlDoc.Save(file_path); XmlReport.MemoryCacheInstance.Remove(file_path); } if (!String.IsNullOrEmpty(zb_dict_str)) @@ -613,8 +614,34 @@ public async Task Save(String reportName, String content, string return Json(new { errcode = 0, message = "保存成功" }); } return Json(new { errcode = 1, message = "路径错误" }); + + + } + static System.Xml.XmlDocument Content2XmlDoc(string content) + { + var xmlDoc = new System.Xml.XmlDocument(); + xmlDoc.LoadXml(content); + var xml_report = xmlDoc.SelectSingleNode("//report"); + foreach (var one in new String[] { "parsererror", "parent_defaultsetting" , "range_level", "functions", + "canExecuteExpr","inner_script" }) + { + var cur_node_list = xmlDoc.SelectNodes($"//report/{one}"); + if (cur_node_list != null) + { + foreach (System.Xml.XmlNode cur_node in cur_node_list) + xml_report.RemoveChild(cur_node); + } + } + StringBuilder sb = new(); + foreach (Match one in new Regex(@"/\*\s*服务器脚本\s*\\n(.*?)结束\s*\*/").Matches(content)) + { + sb.AppendLine(one.Groups[1].Value); + } + var xmlNode = xmlDoc.CreateElement("inner_script"); + xmlNode.InnerText = ExprHelper.extractString(System.Net.WebUtility.HtmlDecode(sb.ToString())); + xml_report.AppendChild(xmlNode); + return xmlDoc; } - public async Task open_template(String path) { if (!Directory.Exists(this.rpt_group.report_path)) diff --git a/end/reportWeb/Controllers/PdfController.cs b/end/reportWeb/Controllers/PdfController.cs index 14d61bf..62e071b 100644 --- a/end/reportWeb/Controllers/PdfController.cs +++ b/end/reportWeb/Controllers/PdfController.cs @@ -23,11 +23,18 @@ using iText.Layout.Layout; using iText.Kernel.Pdf.Xobject; using System.Text.RegularExpressions; +using iText.Html2pdf.Resolver.Font; +using Microsoft.Extensions.Configuration; namespace reportWeb.Controllers { public class PdfController : Controller { + private IConfiguration configuration; + public PdfController(IConfiguration configuration) + { + this.configuration = configuration; + } [HttpPost] [AllowAnonymous] public IActionResult Index(string report_obj, string paperSetting) @@ -73,14 +80,38 @@ public byte[] buildPdf(string report_str, PageSetup ps) { default_font = CellReport.running.Template.getTemplate("template.xml").Get("FONT").content; default_font = json_root.GetProperty("defaultsetting").GetProperty("FONT").GetString(); + converterProperties = null; if (converterProperties == null) { - FontProvider fontProvider = new FontProvider(default_font); + // 如果发现字体显示不对,就需要调整字体顺序。 + FontProvider fontProvider = new DefaultFontProvider(true, true, false); + int idx = 0; + for (; idx < 1000; idx++) + { + var cur_font = configuration["pdf_fonts" + ":" + idx] ; + if (cur_font == null) + break; + FontProgram fontProgram = FontProgramFactory.CreateFont(cur_font); + fontProvider.AddFont(fontProgram); + } fontProvider.AddSystemFonts(); + //PdfFontFactory.RegisterDirectory("c:/windows/fonts"); + ////PdfFontFactory.RegisterDirectory("/usr/share/fonts"); + //foreach (var one in Directory.GetFiles("c:/windows/fonts")) + //{ + // + // if (one.EndsWith(".ttf") || one.EndsWith(".ttc")) + // fontProvider.AddFont(one); + //} + //String[] fonts = new string[] { "c:/windows/fonts/simfang.ttf" }; + + + + converterProperties = new ConverterProperties(); converterProperties.SetFontProvider(fontProvider); converterProperties.SetCharset("utf-8"); - converterProperties.SetBaseUri("http://127.0.0.1:5000/"); + converterProperties.SetBaseUri($"http://127.0.0.1:{HttpContext.Connection.LocalPort}/"); } Document pdf_doc = new(pdfDocument, new PageSize(ps.pageSize_Width, ps.pageSize_Height) , false); @@ -160,7 +191,7 @@ private void add_header_footer(PageSetup ps, PdfDocument pdf, Document pdf_doc, }; foreach (var item in zb_var.EnumerateObject()) { - mark_dict[item.Name] = item.Value.GetString(); + mark_dict[item.Name] = item.Value.ToString(); } if (watermark.ValueKind == JsonValueKind.Object) { @@ -469,9 +500,10 @@ private Table addTable(ReportGridJSON rg, List row_list, List col_list } pdf_cell.Add(cur_pp) //replace_var_to_Paragraph(cell_value.ToString(),0,0) - .SetMinWidth(max_width - deta).SetMaxWidth(max_width - deta) - .SetMinHeight(max_height - deta).SetMaxHeight(max_height - deta) - .SetPadding(0)// 不设置为0 ,将导致高度和设置的不同 缺省padding =2 + .SetMinWidth(max_width - deta).SetMaxWidth(max_width - deta); + if (rg.auto_line_height == false) + pdf_cell.SetMinHeight(max_height - deta).SetMaxHeight(max_height - deta); + pdf_cell.SetPadding(0)// 不设置为0 ,将导致高度和设置的不同 缺省padding =2 .SetMargin(0) ; diff --git a/end/reportWeb/Controllers/UserController.cs b/end/reportWeb/Controllers/UserController.cs index 88d4b73..b952a19 100644 --- a/end/reportWeb/Controllers/UserController.cs +++ b/end/reportWeb/Controllers/UserController.cs @@ -22,6 +22,7 @@ using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication.JwtBearer; using System.Security.Cryptography; +using reportWeb.Pages; namespace reportWeb.Controllers { @@ -31,12 +32,15 @@ public class UserController : Controller IConfiguration configuration; JsonSerializerOptions json_option; ReportDbContext reportDbContext; + private readonly MyLogger logger; + public UserController(IConfiguration configuration, - ReportDbContext reportDbContext, + ReportDbContext reportDbContext, ILogger logger, ScopedObj reportGrp) { this.configuration = configuration; this.reportDbContext = reportDbContext; + this.logger = new MyLogger(logger); json_option = new JsonSerializerOptions() { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, @@ -80,8 +84,10 @@ public IActionResult test_login(String login_script,string test_user, string tes var ef = new CellReport.core.expr.ExprFaced2(); ef.addNewScopeForScript(); - ef.addVariable("env", new Env()); - ef.addVariable("__env__", new Env()); + var report_env = new Env(); + report_env.logger = logger; + ef.addVariable("env", report_env); + ef.addVariable("__env__", report_env); ef.addVariable("userid", test_user); ef.addVariable("password", test_password); var result = ef.addNewScopeForScript(login_script) as IDictionary; @@ -262,6 +268,11 @@ public JsonResult getMenu(string parentId) icon = "el-icon-document", component = "", label = "组件管理" + },new{ + path = "/crud_template/index", + icon = "el-icon-document", + component = "", + label = "CRUD代码生成" } } } @@ -363,7 +374,9 @@ public static UserInfo ValidateJwtToken(HttpContext HttpContext, string raw_toke [AllowAnonymous] public IActionResult VerifyCode(string userid, string verfiy_code,int code_len) { - var verfiy_code_script = configuration["verfiy_code_script"]; + var verfiy_code_script = new CellReport.running.Env().TemplateGet("verfiy_code_script"); + if (string.IsNullOrEmpty(verfiy_code_script)) + verfiy_code_script = configuration["verfiy_code_script"]; if (string.IsNullOrEmpty(verfiy_code_script)) return new JsonResult(new { errcode = 1, message = "没有设置验证码发送脚本" }); if (string.IsNullOrEmpty(userid)) @@ -380,8 +393,10 @@ public IActionResult VerifyCode(string userid, string verfiy_code,int code_len) HttpContext.Session.SetString("send_time", DateTime.Now.Ticks.ToString()); var ef = new CellReport.core.expr.ExprFaced2(); ef.addNewScopeForScript(); - ef.addVariable("env", new Env()); - ef.addVariable("__env__", new Env()); + var report_env = new Env(); + report_env.logger = logger; + ef.addVariable("env", report_env); + ef.addVariable("__env__", report_env); ef.addVariable("userid", userid); ef.addVariable("verfiy_code", verfiy_code); var result = ef.addNewScopeForScript(verfiy_code_script) as IDictionary; diff --git a/end/reportWeb/GridOutput.cs b/end/reportWeb/GridOutput.cs index 34804f9..80cba2e 100644 --- a/end/reportWeb/GridOutput.cs +++ b/end/reportWeb/GridOutput.cs @@ -13,7 +13,7 @@ namespace CellReport { - public class ReportDefineForWeb:IDisposable + public class ReportDefineForWeb : IDisposable { public void Dispose() { @@ -24,7 +24,7 @@ public void Dispose() } //报表路径 - public String ReportDefinePath{get; set;} + public String ReportDefinePath { get; set; } //报表定义 private ReportDefine reportDefine; internal MyLogger logger; @@ -64,20 +64,20 @@ internal ReportDefine ensureReportDefine() String gobal_reportDefinePath = ReportDefinePath; String reportName = getQueryValue("reportName"); - if (reportName != null) + if (reportName != null) reportName = reportName.Replace("../", ""); if (reportDefine == null && reportName != null && reportName != "" && gobal_reportDefinePath != null && gobal_reportDefinePath != "") { if (!gobal_reportDefinePath.EndsWith(Path.DirectorySeparatorChar)) - gobal_reportDefinePath = gobal_reportDefinePath + Path.DirectorySeparatorChar; + gobal_reportDefinePath = gobal_reportDefinePath + Path.DirectorySeparatorChar; { //var load_task=; //load_task.ConfigureAwait(continueOnCapturedContext:false); reportDefine = XmlReport.loadReport(gobal_reportDefinePath, reportName).Result; } - reportDefine.getEnv().logger = logger; + reportDefine.getEnv().logger = logger; //reportDefinePath = gobal_reportDefinePath + reportName; } return reportDefine; @@ -87,7 +87,7 @@ public String getParamSortedString() var ret_sb = new System.Text.StringBuilder(1024); foreach (KeyValuePair one in paramSortedDictionary) { - if (reportDefine.getEnv().getParam(one.Key) == null && "sort"!= one.Key) + if (reportDefine.getEnv().getParam(one.Key) == null && "sort" != one.Key) continue; if (ret_sb.Length > 0) ret_sb.Append("&"); @@ -95,7 +95,7 @@ public String getParamSortedString() } return ret_sb.ToString(); } - public Func resetDefaultParam = null; + public Func resetDefaultParam = null; public Func lastSetParam = null; public Dictionary fixParamValueDict = new Dictionary(); public Dictionary fixDefaultParamValueDict = new Dictionary(); @@ -118,16 +118,16 @@ private String getQueryValue(string name) public void putRequestParamForForm() { ensureReportDefine(); - var exprfaced=reportDefine.getEnv().getExprFaced(); + var exprfaced = reportDefine.getEnv().getExprFaced(); paramSortedDictionary.Clear(); foreach (var one in new string[] { "__updated", "__inserted", "__deleted", "_d" }) { - if (getFormValue(one)!=null) + if (getFormValue(one) != null) exprfaced.addVariable(one, System.Net.WebUtility.UrlDecode(getFormValue(one))); } exprfaced.addNewScopeForScript(); ParamDefineDataSet pds = reportDefine.getEnv().getParamDefineDataSet(); - + foreach (var row in pds.Rows) { String param_name = row.getData("name").ToString(); @@ -151,13 +151,13 @@ public void putRequestParamForForm() exprfaced.addVariable("param_obj", row); if (exprfaced.getVariableDefine("resetDefaultParam") != null) { - var t_val= exprfaced.calculate($"=resetDefaultParam('{param_name}',param_obj)", reportDefine.getEnv().getDataSetResultMap())?.ToString(); - if(t_val!=null) + var t_val = exprfaced.calculate($"=resetDefaultParam('{param_name}',param_obj)", reportDefine.getEnv().getDataSetResultMap())?.ToString(); + if (t_val != null) default_value = t_val; } - if(param_name!="reportName") + if (param_name != "reportName") this.addParam(param_name, default_value); - if (getQueryValue(param_name)!= null) + if (getQueryValue(param_name) != null) this.addParam(param_name, getQueryValue(param_name)); if (getFormValue(param_name) != null) this.addParam(param_name, getFormValue(param_name)); @@ -174,10 +174,10 @@ public void putRequestParamForForm() if (lastSetParam != null) { default_value = paramSortedDictionary[param_name].ToString(); - default_value=lastSetParam(param_name); + default_value = lastSetParam(param_name); this.addParam(param_name, default_value); } - + if (exprfaced.getVariableDefine("lastSetParam") != null) { var t_val = exprfaced.calculate($"=lastSetParam('{param_name}',param_obj)", reportDefine.getEnv().getDataSetResultMap())?.ToString(); @@ -198,7 +198,7 @@ public void putRequestParamForForm() public async Task calcReport(CellReport.exporter.MyTextWrite tw) { if (alreadyCalc) - return ; + return; alreadyCalc = true; logger.Debug("==============================="); ensureReportDefine(); @@ -206,7 +206,7 @@ public async Task calcReport(CellReport.exporter.MyTextWrite tw) return; if (Report == null) { - + Engine engine = new Engine(reportDefine); //if (this.getParam("_d") != null) //{ diff --git a/end/reportWeb/Pages/ReportModel.cs b/end/reportWeb/Pages/ReportModel.cs index babded6..a1eefab 100644 --- a/end/reportWeb/Pages/ReportModel.cs +++ b/end/reportWeb/Pages/ReportModel.cs @@ -30,7 +30,9 @@ public MyLogger(ILogger _logger):base(null) public override void Info(Object info) { + _logger.LogInformation(info?.ToString()); + } public override void Warn(Object info) { @@ -99,7 +101,8 @@ public async Task Page_Load() Request.Form.Keys.Contains("__deleted")) ) needType = "json"; - if (needType == "json") + string str_call_func = Request.Query["__call_func"].ToString(); + if (needType == "json" || !String.IsNullOrEmpty(str_call_func)) { Response.ContentType = "application/json"; } @@ -197,10 +200,12 @@ public async Task Page_Load() Response.Body.Flush(); this.HttpContext.Response.RegisterForDispose(reportDefineForWeb); } - catch (System.Exception e) + catch (System.Exception ex) { - output_expection(e, logger,report_env); - throw; + while (ex.InnerException != null) + ex = ex.InnerException; + output_expection(ex, logger,report_env); + throw ex; } finally { @@ -209,7 +214,7 @@ public async Task Page_Load() } } - internal static void output_expection(Exception e, CellReport.running.Logger logger, CellReport.running.Env report_env) + internal static void output_expection(Exception e, CellReport.running.Logger logger, CellReport.running.Env report_env, HttpRequest Request = null) { logger.Error("-----------------------------------"); String curCellName = "`0"; @@ -224,6 +229,24 @@ internal static void output_expection(Exception e, CellReport.running.Logger log continue; sb.Append("\t" + kv.Key + "='" + kv.Value + "'"); } + if (Request != null) + { + sb.Append("\nQuery:"); + foreach (var kv in Request.Query) + { + if (kv.Key == "reportName") + continue; + sb.Append("\t" + kv.Key + "='" + kv.Value + "'"); + } + sb.Append("\nForm:"); + if (Request.HasFormContentType) + foreach (var kv in Request.Form) + { + if (kv.Key == "reportName") + continue; + sb.Append("\t" + kv.Key + "='" + kv.Value + "'"); + } + } logger.Error("当前报表:" + report_env.getExprFaced().calculate("=_rpt_group_.Id").ToString() + ":" @@ -239,9 +262,10 @@ internal static void output_expection(Exception e, CellReport.running.Logger log if (inner_e.StackTrace != null) break; inner_e = inner_e.InnerException; - } + } } + private void parse_fresh_ds() { if (!Request.HasFormContentType) @@ -320,21 +344,30 @@ await myCache.OutputOrCalcAndCache(tmpFileName, Response, async(jsonWrite) => await calc_output(jsonWrite)); await Response.Body.FlushAsync(); - await Response.WriteAsync(",\"notebook\":"); - await Response.WriteAsync(System.Text.Json.JsonSerializer.Serialize(report_env.TemplateGet("notebook"), report_env.getJsonOption())); //await Response.WriteAsync(",\"footer2\":"); //await Response.WriteAsync(System.Text.Json.JsonSerializer.Serialize(report_env.TemplateGet("footer2"), report_env.getJsonOption())); - + var exprFaced = report_env.getExprFaced(); if (this.myCache != null ) { this.tips = this.tips + "\n刷新标记是:" + this.myCache.fresh_flag + "\n刷新标记取得时间:" + this.myCache.global_time.ToString("yyyy-MM-dd hh:mm:ss fff") + "\n本报表计算时间:" + this.myCache.fresh_time.ToString("yyyy-MM-dd hh:mm:ss fff"); - this.tips = System.Text.Json.JsonSerializer.Serialize(this.tips, report_env.getJsonOption()); await Response.WriteAsync($",\"cache_key\":\"{myCache.cacheKey(tmpFileName)}\" ,\"tips\":{this.tips}"); } + await Response.WriteAsync(",\"_zb_var_\":"); + if (exprFaced.getVariable("_zb_var_") != null) + { + await Response.WriteAsync(JsonSerializer.Serialize(exprFaced.getVariable("_zb_var_"), report_env.getJsonOption())); + } + else + { + await Response.WriteAsync("{}"); + } + await Response.WriteAsync(",\"notebook\":"); + await Response.WriteAsync(System.Text.Json.JsonSerializer.Serialize(report_env.TemplateGet("notebook"), report_env.getJsonOption())); + await Response.WriteAsync("\n}"); } } @@ -375,27 +408,32 @@ private async Task NotCalcReportAndOutput() reportDefineForWeb.CurrentReportDefine.calcGridNames = new String[] { }; reportDefineForWeb.CurrentReportDefine.calcDsNames = new (); } - - if (Request.HasFormContentType && (Request.Form.ContainsKey("__call_func"))) + //string str_call_func=Request.Query["__call_func"].ToString(); + //if (!String.IsNullOrEmpty(str_call_func)) + //{ + // Object result = CellReport.core.expr.ExprHelper.calc_client_func(report_env, str_call_func); + // htmlWrite.Write(JsonSerializer.Serialize(result, report_env.getJsonOption())); + //} + else if (Request.HasFormContentType && (Request.Form.ContainsKey("__call_func"))) { + var __call_func = Request.Form["__call_func"].ToString(); + var func_json = JsonDocument.Parse(__call_func).RootElement; + Object result = CellReport.core.expr.ExprHelper.calc_client_func(report_env, func_json); - var func_json = JsonDocument.Parse(Request.Form["__call_func"].ToString()).RootElement; - if (func_json.TryGetProperty("func_name", out var func_name) && func_json.TryGetProperty("func_params", out var func_params)) - { - if (null != exprFaced.getVariable(func_name.GetString())) - { - var result = exprFaced.calculate($"={func_name.GetString()}({func_params.GetRawText()})", report_env.getDataSetResultMap()); - htmlWrite.Write(JsonSerializer.Serialize(result, report_env.getJsonOption())); - } - else - htmlWrite.Write(JsonSerializer.Serialize(new { errcode = -1, message = $"没有自定义函数{func_name}" }, report_env.getJsonOption())); - } - else - htmlWrite.Write(JsonSerializer.Serialize(new { errcode = -1, message = $"客户端调用函数{func_name},没有定义func_name或func_params" }, report_env.getJsonOption())); + htmlWrite.Write(JsonSerializer.Serialize(result, report_env.getJsonOption())); } else { await calc_output(htmlWrite); + htmlWrite.Write(",\"_zb_var_\":"); + if (exprFaced.getVariable("_zb_var_") != null) + { + htmlWrite.Write(JsonSerializer.Serialize(exprFaced.getVariable("_zb_var_"), report_env.getJsonOption())); + } + else + { + htmlWrite.Write("{}"); + } htmlWrite.Write(",\"notebook\":"); htmlWrite.Write(System.Text.Json.JsonSerializer.Serialize(report_env.TemplateGet("notebook"), report_env.getJsonOption())); //htmlWrite.Write(",\"footer2\":"); @@ -409,9 +447,9 @@ private async Task NotCalcReportAndOutput() } } - private async Task calc_output(MyTextWrite jsonWrite) + private async Task calc_output(MyTextWrite htmlWrite) { - await this.reportDefineForWeb.calcReport(jsonWrite);//命令格式:(g表格|d数据集|u修改数据), + await this.reportDefineForWeb.calcReport(htmlWrite);//命令格式:(g表格|d数据集|u修改数据), if (reportDefineForWeb.Report == null) if (reportDefineForWeb.currentException != null) { @@ -419,8 +457,9 @@ private async Task calc_output(MyTextWrite jsonWrite) } if (Request.Query["_fresh_ds"].ToString() == "") { - await reportDefineForWeb.Report.exportJson(jsonWrite); + await reportDefineForWeb.Report.exportJson(htmlWrite); } + } /// MD5 32位加密 /// </summary> diff --git a/end/reportWeb/appsettings.Development.json b/end/reportWeb/appsettings.Development.json index 3e64db6..5f6f77c 100644 --- a/end/reportWeb/appsettings.Development.json +++ b/end/reportWeb/appsettings.Development.json @@ -29,10 +29,11 @@ //"redis_str": "", //"verfiy_code_script": "web_request({ 'url':\"报表地址\" })", - + "cache_prefix": "report5", "aes_key": "ONxYDyNaCoyTzsp83JoQ3YYuMPHxk3j7", "zb_url": "", + "pdf_fonts": [ "c:/windows/fonts/simfang.ttf" ], "admin_user": "admin", "admin_password": "database!123", "DbProviderFactories": [ diff --git a/end/reportWeb/reportWeb.csproj b/end/reportWeb/reportWeb.csproj index b469c82..4cc9ed9 100644 --- a/end/reportWeb/reportWeb.csproj +++ b/end/reportWeb/reportWeb.csproj @@ -34,7 +34,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + true diff --git a/end/reportWeb/template.xml b/end/reportWeb/template.xml index a15ce48..91e0718 100644 --- a/end/reportWeb/template.xml +++ b/end/reportWeb/template.xml @@ -19,9 +19,9 @@ 0 1080 1920 - + true - + false false false @@ -43,10 +43,11 @@ return {'errcode':-1,'message':"不是图片类型" }; } ]]> - + - + window.luckysheet_conditionformat=[ {column_match:".*(占比|率)\$" ,val:'{"type":"colorGradation","cellrange":[{ "row":[0,1],"column":[1,1] }],"format":["rgb(248, 105, 107)", "rgb(255, 235, 132)", "rgb(99, 190, 123)"] }' }, //{column_match:".*(累计)" ,val:'{"type":"dataBar","cellrange":[{"left":283,"width":88,"top":117,"height":25,"left_move":283,"width_move":88,"top_move":117,"height_move":25,"row":[4,4],"column":[3,3],"row_focus":4,"column_focus":3}],"format":["red","#ffffff"]}' }, @@ -68,11 +69,6 @@ window.luckysheet_alternateformat_save={"cellrange":{"row":[0,8],"column":[-1,-1 |%|\""\""|,|>=|=<|<>|;|\|\||\[|\]|&|/|@)|(\b)+(select|update|insert|delete|declare|exec|dbcc|alter|drop|create|backup|if|else|end|and|or|add|set|open|close|use|begin|retun|as|go|exists)(\b)+)]]> - -
- -
- @@ -159,5 +155,299 @@ $}$ }); ]]> + + + + + {table:x.unique_table_name, from:x.base_column_name,to:x.unique_column_name})`] , + columns:[` + with aaa as( SELECT column_name FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE + WHERE TABLE_NAME = '$table$' and Constraint_name=(SELECT OBJECT_NAME(OBJECT_ID) AS NameofConstraint FROM sys.objects + WHERE type_desc IN ('PRIMARY_KEY_CONSTRAINT') and OBJECT_NAME(parent_object_id) = '$table$') + ) + SELECT T.object_id,S.name AS schema_name, T.name AS table_name + , C.name AS column_name,C.is_nullable, C.is_rowguidcol,C.is_identity auto_incr,tp.NAME data_type, + case when exists (select 1 from aaa where column_name=c.name) then 1 else 0 end is_key + FROM sys.tables AS T + INNER JOIN sys.schemas AS S ON T.schema_id = S.schema_id + INNER JOIN sys.columns AS C ON T.object_id = C.OBJECT_ID + INNER JOIN sys.types AS tp ON C.user_type_id = tp.user_type_id + where T.name='$table$'`, + `=cur.select(x=>{prop:x.column_name, label:x.column_name,type:"input",auto_incr:x.auto_incr, + is_nullable:iif(x.is_nullable==1,'NO','YES'),dflt_value:'',is_key:iif(x.is_key!=0,'true',''), + data_type:x.data_type})` ], + auto_incr_sql:'select @@IDENTITY as key;', + }, + "Microsoft.Data.Sqlite.SqliteFactory":{ + tables:`SELECT '' TABLE_CATALOG ,'' TABLE_SCHEMA,tbl_name TABLE_NAME FROM "main".sqlite_master where type='table';`, + foreign:[`PRAGMA foreign_key_list('$table$')`, + `=cur.select(x=>{table:x.table, from:x.from,to:x.to})`], + columns:[` + SELECT *,case when pk=1 and EXISTS (SELECT 1 FROM "sqlite_sequence" where name='$table$') then 1 else 0 end auto_incr + FROM pragma_table_info('$table$')`, + `=cur.select(x=>{prop:x.name, label:x.name,type:"input",auto_incr:x.auto_incr, + is_nullable:iif(x.notnull==1,'NO','YES'),dflt_value:x.dflt_value,is_key:iif(x.pk!=0,'true',''), + data_type:x.type})`], + auto_incr_sql:'select last_insert_rowid() as key;', + }, +} ; + +var tbl_default_filter=`=cur.select(x=>{ + prop:x.ColumnName,label:x.ColumnName,type:'input', + is_nullable: iif(x.IsNull==1,'YES','') ,is_key:iif(x.IsKey==1,'true',''), + data_type: x.ColumnType} )`; +var schema_filter=`=cur.orderBy(x=>x.ORDINAL_POSITION).select(x => { + prop: x.COLUMN_NAME,label: x.COLUMN_NAME,type: 'input', + is_nullable: x.IS_NULLABLE, + data_type: x.DATA_TYPE})`; + + +function buildTemplate(para){ + + var cur_schema=openDb(para.ds_link).schema_kind; + var col_list=para.col_list;//表的所有列名 + if(para.keys.count()==0) + return {errcode:1,message:`没有定义主键`}; + var key_not_exists=para.keys.where(x=> x not in col_list).JoinAsString(); + trace("key_not_exists:",key_not_exists); + if(key_not_exists!='') + return {errcode:1,message:`${key_not_exists} 不在列表中!(${col_list.JoinAsString()})`}; + // crud + var crud_cloumns=col_list.where(x=>x in para.keys).select(x => `{label:"${x}",prop:"${x}",span:8,type:"input",editDisabled:true,addDisabled: 'false'}`) + .union( col_list.where(x=>x not in para.keys).select(x => `{label:"${x}",prop:"${x}",span:8,type:"input"}`) ) + .JoinAsString(',\\n'); + var where_str=para.keys.select(x => `[${x}]='\${crud_obj.${x}\}'`).JoinAsString(" and ") ; + var list_where=iif(para.parent_table==null," 1=1 `",para.parent_table.select(x=>`${x.self_key}='\${p.${x.parent_key}}'` ).joinAsString(' and ') ); + //-------------------------------- + var 最终模板=` + + + + `; + return {最终模板}; + } +]]> + diff --git a/front/package-lock.json b/front/package-lock.json index b0dc571..d87eac8 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -1,12 +1,12 @@ { "name": "cell-report", - "version": "0.5.0", + "version": "2.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "cell-report", - "version": "0.5.0", + "version": "2.0.0", "dependencies": { "axios": "^0.21.1", "babel-core": "^6.26.3", @@ -14,6 +14,7 @@ "classlist-polyfill": "^1.2.0", "codemirror": "^5.59.2", "crypto-js": "^4.0.0", + "echarts": "^5.3.3", "element-resize-detector": "^1.2.1", "element-ui": "^2.15.0", "js-cookie": "^2.2.1", @@ -6553,6 +6554,20 @@ "safer-buffer": "^2.1.0" } }, + "node_modules/echarts": { + "version": "5.3.3", + "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.3.3.tgz", + "integrity": "sha512-BRw2serInRwO5SIwRviZ6Xgm5Lb7irgz+sLiFMmy/HOaf4SQ+7oYqxKzRHAKp4xHQ05AuHw1xvoQWJjDQq/FGw==", + "dependencies": { + "tslib": "2.3.0", + "zrender": "5.3.2" + } + }, + "node_modules/echarts/node_modules/tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz", @@ -17812,6 +17827,19 @@ "resolved": "https://registry.npmmirror.com/yallist/-/yallist-2.1.2.tgz", "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", "dev": true + }, + "node_modules/zrender": { + "version": "5.3.2", + "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.3.2.tgz", + "integrity": "sha512-8IiYdfwHj2rx0UeIGZGGU4WEVSDEdeVCaIg/fomejg1Xu6OifAL1GVzIPHg2D+MyUkbNgPWji90t0a8IDk+39w==", + "dependencies": { + "tslib": "2.3.0" + } + }, + "node_modules/zrender/node_modules/tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" } }, "dependencies": { @@ -23075,6 +23103,22 @@ "safer-buffer": "^2.1.0" } }, + "echarts": { + "version": "5.3.3", + "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.3.3.tgz", + "integrity": "sha512-BRw2serInRwO5SIwRviZ6Xgm5Lb7irgz+sLiFMmy/HOaf4SQ+7oYqxKzRHAKp4xHQ05AuHw1xvoQWJjDQq/FGw==", + "requires": { + "tslib": "2.3.0", + "zrender": "5.3.2" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + } + } + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz", @@ -32352,6 +32396,21 @@ "dev": true } } + }, + "zrender": { + "version": "5.3.2", + "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.3.2.tgz", + "integrity": "sha512-8IiYdfwHj2rx0UeIGZGGU4WEVSDEdeVCaIg/fomejg1Xu6OifAL1GVzIPHg2D+MyUkbNgPWji90t0a8IDk+39w==", + "requires": { + "tslib": "2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + } + } } } } diff --git a/front/package.json b/front/package.json index c74ecf9..f4d4fd8 100644 --- a/front/package.json +++ b/front/package.json @@ -19,6 +19,7 @@ "classlist-polyfill": "^1.2.0", "codemirror": "^5.59.2", "crypto-js": "^4.0.0", + "echarts": "^5.3.3", "element-resize-detector": "^1.2.1", "element-ui": "^2.15.0", "js-cookie": "^2.2.1", diff --git a/front/public/cdn/html-to-docx/CHANGELOG.md b/front/public/cdn/html-to-docx/CHANGELOG.md new file mode 100644 index 0000000..52eb497 --- /dev/null +++ b/front/public/cdn/html-to-docx/CHANGELOG.md @@ -0,0 +1,1174 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [1.4.0](https://github.com/privateOmega/html-to-docx/compare/v1.3.2...v1.4.0) (2022-06-01) + + +### Bug Fixes + +* add support for multi level nested formatting ([48a98bc](https://github.com/privateOmega/html-to-docx/commit/48a98bc9a0352800f22c0c518e9ee432cd7ee19e)) +* parent styles to children ([b0d004b](https://github.com/privateOmega/html-to-docx/commit/b0d004b64ee5ce47ca71137c581923e2e4ce4e77)) +* point regex ([fb82509](https://github.com/privateOmega/html-to-docx/commit/fb8250997a7c9fef6538fdadfc0c2c1d8430ea18)) + +### [1.3.2](https://github.com/privateOmega/html-to-docx/compare/v1.3.1...v1.3.2) (2022-01-23) + + +### Features + +* add support for lists within table cells ([b7d5ce7](https://github.com/privateOmega/html-to-docx/commit/b7d5ce7c6381c8e5ea79e537ee78768c9fefdbb5)) +* allow different list style types ([5579be2](https://github.com/privateOmega/html-to-docx/commit/5579be26639286bd0abd75cd3957795b52f044d3)) + +### [1.3.1](https://github.com/privateOmega/html-to-docx/compare/v1.3.0...v1.3.1) (2021-12-27) + +## [1.3.0](https://github.com/privateOmega/html-to-docx/compare/v1.2.4...v1.3.0) (2021-12-27) + + +### Features + +* **indentation:** html margins to indentation [#106](https://github.com/privateOmega/html-to-docx/issues/106) ([0a8d6e6](https://github.com/privateOmega/html-to-docx/commit/0a8d6e6a8cfeffd9543e17e7d4bc729dfde88ed4)) + + +### Bug Fixes + +* generate numbering for independent list types ([67151ce](https://github.com/privateOmega/html-to-docx/commit/67151ce957b01d4563b95def543f0bc004036153)) +* generating numbering xml based on type instead of type elements ([56c165e](https://github.com/privateOmega/html-to-docx/commit/56c165e6d5f9b3f26adc6508137022dbb69dae52)) +* nanoid api usage ([4aa4edc](https://github.com/privateOmega/html-to-docx/commit/4aa4edc088dcf4e031b850754a9f7b2d6740a6c3)) +* revert optional chaining on border check ([9ae5982](https://github.com/privateOmega/html-to-docx/commit/9ae59826b9885e867bfde26900e76fe34c1413b5)) +* update @rollup/plugin-node-resolve usage ([c359d92](https://github.com/privateOmega/html-to-docx/commit/c359d92afc7373fc5f236b61e8176c6bda3b7310)) +* update html-to-vdom import ([fbca2d3](https://github.com/privateOmega/html-to-docx/commit/fbca2d3b38edf6c14f883bf3f6f4eda1d8b55a8f)) + +### [1.2.4](https://github.com/privateOmega/html-to-docx/compare/v1.2.3...v1.2.4) (2021-09-20) + + +### Bug Fixes + +* spacing issue in between tags and text on multiple lines ([98e1a8d](https://github.com/privateOmega/html-to-docx/commit/98e1a8d710a92e894513fdef120417849e932de6)) + +### [1.2.3](https://github.com/privateOmega/html-to-docx/compare/v1.2.2...v1.2.3) (2021-09-15) + + +### Features + +* add support for code tag ([70a9485](https://github.com/privateOmega/html-to-docx/commit/70a948503d6b8c11b3f46141578047361c0bba87)) +* add support for pre tag ([c43ed9e](https://github.com/privateOmega/html-to-docx/commit/c43ed9e3bef91d1c95eddb8779df8e2d2e7f151b)) + + +### Bug Fixes + +* add support for nested code and pre tags ([7a504e1](https://github.com/privateOmega/html-to-docx/commit/7a504e10af3819829a7cfc0d6fd2ef86e1dc289b)) + +### [1.2.2](https://github.com/privateOmega/html-to-docx/compare/v1.2.1...v1.2.2) (2021-07-17) + + +### Features + +* **schema:** add theme ([d5aef3b](https://github.com/privateOmega/html-to-docx/commit/d5aef3b65376e71b594d494ae8426cab5ad5178c)) +* added line numbers ([f87202c](https://github.com/privateOmega/html-to-docx/commit/f87202c4d4cd534e830d3a59d33b9cc27cf6d654)) + +### [1.2.1](https://github.com/privateOmega/html-to-docx/compare/v1.2.0...v1.2.1) (2021-06-05) + +## [1.2.0](https://github.com/privateOmega/html-to-docx/compare/v1.1.34...v1.2.0) (2021-06-05) + + +### Features + +* Headings should have headings style ([8a731bb](https://github.com/privateOmega/html-to-docx/commit/8a731bb430c64fd3608e5baac53d4f4074770664)) + + +### Bug Fixes + +* added browser module building support ([343867a](https://github.com/privateOmega/html-to-docx/commit/343867ab000cb14e813344b3bcb535aa67e00808)) +* changed all imports to esm style ([d02320b](https://github.com/privateOmega/html-to-docx/commit/d02320bf22eefd3cf5fb90966b68e3d004ca9c1e)) +* changed default value to "Normal" ([b0e67d8](https://github.com/privateOmega/html-to-docx/commit/b0e67d8fdef6f339700133095bfd828993e48183)) +* moved to shortid for filename ([81ae184](https://github.com/privateOmega/html-to-docx/commit/81ae1848fa7359f4d7297b87b47fca96017d485d)) +* removed code made redundant with heading styles ([48da1dc](https://github.com/privateOmega/html-to-docx/commit/48da1dc1686a0b45ab56cfaa24db421772c5945e)) +* renamed method to more descriptive name ([b211f20](https://github.com/privateOmega/html-to-docx/commit/b211f205ddf03dab3c647bf0b91439677a33fb61)) +* renamed to paragraphStyle ([a1c4429](https://github.com/privateOmega/html-to-docx/commit/a1c442942de956533fdfda03d4ced748fde06cb1)) +* replaced html-minifier with regex replacement ([d6c9b38](https://github.com/privateOmega/html-to-docx/commit/d6c9b38ed485f73c14b759ad99bf4d3c91d9e07b)) +* updated example to use umd build ([078fa5d](https://github.com/privateOmega/html-to-docx/commit/078fa5dd6174be4fe314b469999f1b1010353c68)) + +### [1.1.34](https://github.com/privateOmega/html-to-docx/compare/v1.1.33...v1.1.34) (2021-02-07) + + +### Bug Fixes + +* superscript ([2fd87fd](https://github.com/privateOmega/html-to-docx/commit/2fd87fd406a97732e24d7f191147638ee7053ced)) + +### [1.1.33](https://github.com/privateOmega/html-to-docx/compare/v1.1.32...v1.1.33) (2021-01-20) + + +### Features + +* added indentation support ([9c1c3a4](https://github.com/privateOmega/html-to-docx/commit/9c1c3a4d539f4dfeda2ab6484d69236a91ec5ae1)) +* added row span support ([8f56a4a](https://github.com/privateOmega/html-to-docx/commit/8f56a4aae59b87d1e86e299bd88bb2bf0115d639)) +* added skip first header footer flag ([7710f28](https://github.com/privateOmega/html-to-docx/commit/7710f2803e64eb3645a7e7440a326664159e340a)) +* added table grid fragment from table row generator ([f8c4380](https://github.com/privateOmega/html-to-docx/commit/f8c4380ff5b7ff7b7df40c70f8a05938e4bacddf)) + + +### Bug Fixes + +* add table cell borders to span cells ([09b65e3](https://github.com/privateOmega/html-to-docx/commit/09b65e316a868a6e2e5032ab1889e817007d2b47)) +* row span cell generation ([d93ad9c](https://github.com/privateOmega/html-to-docx/commit/d93ad9c41225e7b07d9eb0d8c3a55602e65ec30b)) + +### 1.1.32 (2020-12-04) + + +### Features + +* **packaging:** added jszip for packaging ([89619ec](https://github.com/privateOmega/html-to-docx/commit/89619ec702564fb9c5eccaee55e65d366fcbacad)) +* **packaging:** added method to create container ([9808cf2](https://github.com/privateOmega/html-to-docx/commit/9808cf211bbb50cf3d7cbe122d01c82d4272e888)) +* added font size support ([0f27c60](https://github.com/privateOmega/html-to-docx/commit/0f27c609baa5b9488bc195dff1c060bcc04bbf2d)) +* **template:** added base docx template ([abdb87b](https://github.com/privateOmega/html-to-docx/commit/abdb87bdfead91890f9d54e2cedd038e916b6dce)) +* abstracted conversion using docxDocument class ([c625a01](https://github.com/privateOmega/html-to-docx/commit/c625a0181a6c328c0319b579fa1173192dff1187)) +* added b tag support ([f867abd](https://github.com/privateOmega/html-to-docx/commit/f867abd41c6bc85bbba207a27c58d441f1a2b532)) +* added builder methods for images ([9e2720f](https://github.com/privateOmega/html-to-docx/commit/9e2720f261a46701c8a2581aadafa9b60e6cee6b)) +* added css border string parser ([15562e8](https://github.com/privateOmega/html-to-docx/commit/15562e817732d1d85b99fd33921694f2e3ad3ad7)) +* added css color string ([cb0db2f](https://github.com/privateOmega/html-to-docx/commit/cb0db2ff2d3f2f66df823dbafbc5603030241bc3)) +* added document file render helper ([6dd9c3a](https://github.com/privateOmega/html-to-docx/commit/6dd9c3a01f5fceab78404d8ebddb848fb91c933c)) +* added eip conversions ([9d6e317](https://github.com/privateOmega/html-to-docx/commit/9d6e3171c0b0f9d71f776762357d4a329778cedb)) +* added em tag support ([6a06265](https://github.com/privateOmega/html-to-docx/commit/6a06265f724a611b50144cb988e576bc4e40b4d4)) +* added escape-html ([1a231d5](https://github.com/privateOmega/html-to-docx/commit/1a231d5dde3e6f9b5a23f248e19063191c07e54f)) +* added font support in styles ([18b3281](https://github.com/privateOmega/html-to-docx/commit/18b3281ac3f91e5c1905efa0487354ff78badec2)) +* added font table ([0903d6b](https://github.com/privateOmega/html-to-docx/commit/0903d6b98fae6dc378cdeafdadd80a86501c9959)) +* added footer support ([24f60df](https://github.com/privateOmega/html-to-docx/commit/24f60df94d755689493b761340d16d090c8b1b16)) +* added generic rels xml string ([7d2ea84](https://github.com/privateOmega/html-to-docx/commit/7d2ea8404093fd99ce5e6bccaedaf3603830f574)) +* added header generation ([25fb44f](https://github.com/privateOmega/html-to-docx/commit/25fb44f945df3fdc5f37d619b3de3ebe68b84cd6)) +* added header relationship support ([cc08355](https://github.com/privateOmega/html-to-docx/commit/cc083553e28a3ed88da3cc27ef0de0cbb26350b3)) +* added heading sizes ([bb18e72](https://github.com/privateOmega/html-to-docx/commit/bb18e724c42b0c4581722b2899d5ff808c1495c4)) +* added headings support ([fd489ee](https://github.com/privateOmega/html-to-docx/commit/fd489eeebfeedc7d05991f9366aeae2adc49fd6f)) +* added highlight support ([6159925](https://github.com/privateOmega/html-to-docx/commit/6159925495b74ab254cd7dc5628526d531595a92)) +* added horizontal text alignment ([d29669f](https://github.com/privateOmega/html-to-docx/commit/d29669ffdb0d63b7bdbbe09c6bca990e4c28cfb8)) +* added hsl conversion support ([153fa43](https://github.com/privateOmega/html-to-docx/commit/153fa43f84c640085f45823bc2054b24c28023d0)) +* added hyperlink styling ([6c3f1bd](https://github.com/privateOmega/html-to-docx/commit/6c3f1bd92f5c7b4ddf74beb1fc3f4e2e6b4762f5)) +* added hyperlinks support ([3560ce9](https://github.com/privateOmega/html-to-docx/commit/3560ce9f23fa8f590aa340302bf0059c8dfb6d5f)) +* added ins tag support ([6d64908](https://github.com/privateOmega/html-to-docx/commit/6d64908858dac290aa34421c236bdaf2d8ef07a7)) +* added line height support ([3d0ea2f](https://github.com/privateOmega/html-to-docx/commit/3d0ea2fe56d13893e3c5cd0e4a35e7b26b7c1d0a)) +* added linebreak support ([57c054c](https://github.com/privateOmega/html-to-docx/commit/57c054cd65f49d7c4244272af0117f2c141a8bc7)) +* added method to archive images with other files ([b6da74b](https://github.com/privateOmega/html-to-docx/commit/b6da74be10be03d689ca044f3f95dd724a3a29b6)) +* added minimum width support to tables ([b10d820](https://github.com/privateOmega/html-to-docx/commit/b10d820061b10531aa027fde304fbe3ceac849d5)) +* added more unit converters ([8f78c52](https://github.com/privateOmega/html-to-docx/commit/8f78c5241cf33d471c8b08e3f941f401d6a50d7b)) +* added more xml builder methods ([ffc584b](https://github.com/privateOmega/html-to-docx/commit/ffc584bed7ab434431999517a3308483ba99489a)) +* added more xml statment builder methods ([337e530](https://github.com/privateOmega/html-to-docx/commit/337e5305aa8768b6507323bec2279d557a35b67b)) +* added other measure units for margins and fonts ([1ae584a](https://github.com/privateOmega/html-to-docx/commit/1ae584a1b0a5350943e10c0d129402b843d7b9a2)) +* added page break support ([085ed2a](https://github.com/privateOmega/html-to-docx/commit/085ed2a2cb439ee2a4189b3664deca047926672b)) +* added page number support ([84ea1c3](https://github.com/privateOmega/html-to-docx/commit/84ea1c31923b4c4be6e46c892fbecb44c9c7689c)) +* added strike through support ([b73e8c7](https://github.com/privateOmega/html-to-docx/commit/b73e8c76d0051bc6449ed57861b4ce1c7ad4b408)) +* added support for span font sizing ([98b4844](https://github.com/privateOmega/html-to-docx/commit/98b4844858f967bd5a3932262d0b535cd53d499d)) +* added support for subscript and superscript ([f1ee4ed](https://github.com/privateOmega/html-to-docx/commit/f1ee4edf183a45731b48bba2b91154da591c203f)) +* added table max width support ([49ab5d3](https://github.com/privateOmega/html-to-docx/commit/49ab5d3876cdd58c2efd1b492fc5bb41e9a857e7)) +* **template:** added styles schema ([d83d230](https://github.com/privateOmega/html-to-docx/commit/d83d230a66807f6ad08ebb4a6c0c5299c311aaf5)) +* added table row cant split option ([252178c](https://github.com/privateOmega/html-to-docx/commit/252178c922d9910b8a89e6c4e30fafd2994d92d7)) +* added table row height support ([031c3aa](https://github.com/privateOmega/html-to-docx/commit/031c3aa963e5a7b2ee985ae8ac6ff612c89ae974)) +* added text formatting to paragraph ([bacd888](https://github.com/privateOmega/html-to-docx/commit/bacd888253a35a18ac7ea4e9141d4a4fb60e3cf7)) +* added valign to table cell element ([20e94f1](https://github.com/privateOmega/html-to-docx/commit/20e94f18370e8a92034f6d35f5e744ceb57ed774)) +* added vdom to xml method ([8b5a618](https://github.com/privateOmega/html-to-docx/commit/8b5a6185e6e211b0e07b9f1c1b7e23fb4b13dc9c)) +* added virtual-dom and html-to-vdom ([feaa396](https://github.com/privateOmega/html-to-docx/commit/feaa396162465276d19b7d3d5c51a533987a1738)) +* added xbuilder ([f13b5cc](https://github.com/privateOmega/html-to-docx/commit/f13b5cc06d29ae53493f1f4b8fdef6e8986e64e6)) +* added xml builder methods for images ([f413ad8](https://github.com/privateOmega/html-to-docx/commit/f413ad89b263c63a8fb9890b44b1b219a7413c4b)) +* added xml statement builder helper ([5e23c16](https://github.com/privateOmega/html-to-docx/commit/5e23c1636eb3c64f52589f1ac71a48dec3df65c2)) +* changed list parsing to support nested lists ([4339f2f](https://github.com/privateOmega/html-to-docx/commit/4339f2f9d2bdc5ffd68def80449c9bce8c09c9a9)) +* enabling header on flag ([516463c](https://github.com/privateOmega/html-to-docx/commit/516463cd532e58895faa8dd465b7e725f0de59e3)) +* handle line breaks ([164c0f5](https://github.com/privateOmega/html-to-docx/commit/164c0f5e17f62e3f30da25be6e181d3414ca4dde)) +* **template:** added numbering schema ([d179d73](https://github.com/privateOmega/html-to-docx/commit/d179d736e6e63ed42104a231ca0489430faae00a)) +* **template:** added XML schemas ([42232da](https://github.com/privateOmega/html-to-docx/commit/42232da9d63ed404367703e56b1c65cdb8a23782)) +* make tables center aligned ([077049b](https://github.com/privateOmega/html-to-docx/commit/077049b40babc45ec527b53211d4b33ba4f2b6ab)) +* styling table color ([2b44bff](https://github.com/privateOmega/html-to-docx/commit/2b44bff7dee0dad0de75f3c3b2403278c19e3a4b)) + + +### Bug Fixes + +* 3 digit hex color code support ([255fe82](https://github.com/privateOmega/html-to-docx/commit/255fe82fc47e2a447c795c346ae7c6634ae442d1)) +* added attributes to anchor drawing ([62e4a29](https://github.com/privateOmega/html-to-docx/commit/62e4a29ef664257d8f0364d5d97f056a62f0fb61)) +* added black as default color ([bcfcba3](https://github.com/privateOmega/html-to-docx/commit/bcfcba36194925fdf08a4c297ceafcb5b08c124b)) +* added bold to headings ([abe968a](https://github.com/privateOmega/html-to-docx/commit/abe968a0f2cdac5d01abf44bf7e7019922b295dd)) +* added border for paragraph padding ([252ead6](https://github.com/privateOmega/html-to-docx/commit/252ead6dc9f09b84edc9f1b145bb76ad2cb4fc01)) +* added colspan support for table cells ([bdf92f8](https://github.com/privateOmega/html-to-docx/commit/bdf92f8dbb10b4b58188364f3bdc5ff91e9cc982)) +* added default options ([4590800](https://github.com/privateOmega/html-to-docx/commit/459080010f92ce7464f4815585088a46ce8e759d)) +* added effectextent and srcrect fragment ([5f5e975](https://github.com/privateOmega/html-to-docx/commit/5f5e975b135eb38c48e18a09da590b363166d74e)) +* added empty paragraph for spacing after table ([6bae787](https://github.com/privateOmega/html-to-docx/commit/6bae787cbf3f376b8ec34389f444d8c7c5f3b340)) +* added extent fragment ([7ce81f2](https://github.com/privateOmega/html-to-docx/commit/7ce81f27e4c493bb9bf7d368a415f34cb0678e4c)) +* added extra before spacing for heading elements ([dc50c8d](https://github.com/privateOmega/html-to-docx/commit/dc50c8dfe85a126be1780598974752cd939b6a9f)) +* added header override in content-types xml ([5de681b](https://github.com/privateOmega/html-to-docx/commit/5de681be9295754eff648cea504e07bf9a6f6d09)) +* added html string minifier ([8faa19c](https://github.com/privateOmega/html-to-docx/commit/8faa19c46ff85a31b16e89207cbc2120c6ed5805)) +* added image conversion handler ([f726e71](https://github.com/privateOmega/html-to-docx/commit/f726e71ee2504bc254794ad09eaf5d67a8901b9a)) +* added image in table cell support ([7d98a16](https://github.com/privateOmega/html-to-docx/commit/7d98a16b1509b57910e8294cfb3985a88b7154ae)) +* added inline attributes ([0a4d2ce](https://github.com/privateOmega/html-to-docx/commit/0a4d2ce4b4c64952c3866928e6355b7c891ac044)) +* added italics, underline and bold in runproperties ([34c2e18](https://github.com/privateOmega/html-to-docx/commit/34c2e18123c8a6a956209951afebc0dce2ab6cfc)) +* added missing argument in buildParagraph ([2307076](https://github.com/privateOmega/html-to-docx/commit/23070766fe51d689e130d09fb5adcbba37781586)) +* added more namespaces ([68636b4](https://github.com/privateOmega/html-to-docx/commit/68636b4c7cc73bf9e0de75b7bf97ac9afb4fb6f9)) +* added namespace aliases to header and numbering xmls ([d0b4101](https://github.com/privateOmega/html-to-docx/commit/d0b4101017a6dabd0fa18e23228bd4af338129eb)) +* added numbering and styles relationship ([c7e29af](https://github.com/privateOmega/html-to-docx/commit/c7e29af7414ce71515c46861942342d4f397222b)) +* added other namespaces to the xml root ([afbbca9](https://github.com/privateOmega/html-to-docx/commit/afbbca9dbf723afc857034ce7770bc8f0840c0e4)) +* added override for relationship ([30acddc](https://github.com/privateOmega/html-to-docx/commit/30acddc84d40dc6c66ed9539618b94adeeb2fc85)) +* added override for settings and websettings ([977af04](https://github.com/privateOmega/html-to-docx/commit/977af04f48c19f2b3162cf6e61782cf63e7162e8)) +* added overrides for relationships ([22b9cac](https://github.com/privateOmega/html-to-docx/commit/22b9cac2fa788b9654262e450774c588180a18de)) +* added padding between image and wrapping text ([e45fbf5](https://github.com/privateOmega/html-to-docx/commit/e45fbf553c19071023634b692e3c4b0fab04aedf)) +* added positioning fragments ([e6f7e1c](https://github.com/privateOmega/html-to-docx/commit/e6f7e1c3679aa813a2818725548dfb5ebb0d9bd7)) +* added required attributes to anchor fragment ([d01c9f9](https://github.com/privateOmega/html-to-docx/commit/d01c9f915a929de201218af127103da627aaa4a1)) +* added settings and websettings relation ([34aeedc](https://github.com/privateOmega/html-to-docx/commit/34aeedce6d0dd02822062762f9b077bb146b09b9)) +* added settings and websettings to ooxml package ([6c829b5](https://github.com/privateOmega/html-to-docx/commit/6c829b5ec4596ba0b5d41fae9ba2bfd68fdf7230)) +* added simple positioning to anchor ([5006cc4](https://github.com/privateOmega/html-to-docx/commit/5006cc47d112360e51d8051f1ebff570e9f12779)) +* added support for decimal inch ([6027d2f](https://github.com/privateOmega/html-to-docx/commit/6027d2f36bbc9bb97ff4cbcaa59372df33528a54)) +* added support for full width background color ([733a937](https://github.com/privateOmega/html-to-docx/commit/733a9373ba13ccb0b781f66fe87d91a3eed4aab9)) +* added table and cell border support ([985f6a1](https://github.com/privateOmega/html-to-docx/commit/985f6a1e7a2e52f3b0a609a00da8a11bf113ef16)) +* added table borders ([12864db](https://github.com/privateOmega/html-to-docx/commit/12864db468a08f4aca4d01cb8e8b6635aa09c57d)) +* added table cell border support ([852c091](https://github.com/privateOmega/html-to-docx/commit/852c091e15a3b2add7b622472be8fc021bb05c06)) +* added table header support ([592aa89](https://github.com/privateOmega/html-to-docx/commit/592aa893fa115a83bc1d056c98480dbe5cc872f9)) +* added table width support ([73b172b](https://github.com/privateOmega/html-to-docx/commit/73b172b584aaeb7137d58e0eb2d8b73c4bb92561)) +* added unit conversion utils ([d5b5a91](https://github.com/privateOmega/html-to-docx/commit/d5b5a915d215fb834cfe84996539ae663cc98914)) +* added unit conversions ([e6d546b](https://github.com/privateOmega/html-to-docx/commit/e6d546bca1a87182568d15bad99ac0af23ee55de)) +* added unit conversions ([5890b18](https://github.com/privateOmega/html-to-docx/commit/5890b18833cc11f10c8ffc1e57d1dd9ffd46395d)) +* added wrap elements ([c951688](https://github.com/privateOmega/html-to-docx/commit/c95168864c4929e2ab95c5a6a53d0919c76f8a83)) +* bold based on font-weight ([3f0376e](https://github.com/privateOmega/html-to-docx/commit/3f0376e0a1e267705117a2ec50c9f382286b2a60)) +* border color ([a322450](https://github.com/privateOmega/html-to-docx/commit/a322450ceda77dbabaee24d1e9619ced04d88cad)) +* changed attribute field for picture name ([aef241d](https://github.com/privateOmega/html-to-docx/commit/aef241dc3d3d9adb732c429df9f0c2771b319680)) +* changed attribute used for name ([3885233](https://github.com/privateOmega/html-to-docx/commit/3885233bf14f9b7b16d48a2844d3e997e476a8ee)) +* changed default namespace of relationship to solve render issue ([56a3554](https://github.com/privateOmega/html-to-docx/commit/56a3554e7b2e9d85cedeece8d20acfebf23666ad)) +* changed file extension if octet stream is encountered ([32c5bf1](https://github.com/privateOmega/html-to-docx/commit/32c5bf1b5f7c5f8dc83a51fed142e932c7b008fd)) +* changed line spacing rule to work with inline images ([489f1c6](https://github.com/privateOmega/html-to-docx/commit/489f1c62fc093b108bc16aee33d74baad4ced7d8)) +* changed namespaces to original ecma 376 spec ([51be86e](https://github.com/privateOmega/html-to-docx/commit/51be86ecf0f4a78457840bf2a31579d217568208)) +* changed paragraph after spacing ([025523b](https://github.com/privateOmega/html-to-docx/commit/025523b0f07433456e3f19f3774f441e46c7a89b)) +* changed width conditions to match suggestions ([48347ab](https://github.com/privateOmega/html-to-docx/commit/48347abe339aadc3b322d763d52bc607d1293680)) +* created seperate abstract numbering for each lists ([c723c74](https://github.com/privateOmega/html-to-docx/commit/c723c746a3feb2612e73dddac14f1c40864e9ad9)) +* fix table render issue due to grid width ([636d499](https://github.com/privateOmega/html-to-docx/commit/636d499bcee00195f7b5ca198c60bb3e0f7d2a69)) +* fixed abstract numbering id ([9814cb8](https://github.com/privateOmega/html-to-docx/commit/9814cb89582bc7e87cec638be37ee1cd326c6117)) +* fixed coloring and refactored other text formatting ([c288f80](https://github.com/privateOmega/html-to-docx/commit/c288f809ea6387c91356976a6dd81396cecafc46)) +* fixed document rels and numbering bug ([d6e3152](https://github.com/privateOmega/html-to-docx/commit/d6e3152081da7d2ab379a67bfda345964fa15c40)) +* fixed docx generation ([3d96acf](https://github.com/privateOmega/html-to-docx/commit/3d96acf511d82776510fac857af57d5cb9453f89)) +* fixed incorrect table row generation ([742dd18](https://github.com/privateOmega/html-to-docx/commit/742dd1882ce4c1a33ab51e10ee2a628b817eca31)) +* fixed internal mode and added extensions ([1266121](https://github.com/privateOmega/html-to-docx/commit/12661213e00c55f7068e93abb019ba80cd4f2d87)) +* fixed margin issues ([f841b76](https://github.com/privateOmega/html-to-docx/commit/f841b76caa944ea5eec206a3b3fce3e5a5eaf3e7)) +* fixed numbering and header issue due to wrong filename ([64a04bc](https://github.com/privateOmega/html-to-docx/commit/64a04bc192616162aa67c43f80734e7ebb9ff588)) +* fixed table and image rendering ([c153092](https://github.com/privateOmega/html-to-docx/commit/c1530924f93351ce63882bf0e6050b6315aa6017)) +* formatted list ([2e00e44](https://github.com/privateOmega/html-to-docx/commit/2e00e448b812111d09c50b9759b9dd46bd36c860)) +* handled empty formatting tag ([d97521f](https://github.com/privateOmega/html-to-docx/commit/d97521f8004d2e7af9f324cdbdcbbe4fcc299e4b)) +* handled figure wrapper for images and tables ([4182a95](https://github.com/privateOmega/html-to-docx/commit/4182a9543aeb71fd8b0d2c7a2e08978a782de3e6)) +* handled formatting within list element ([aeb3f00](https://github.com/privateOmega/html-to-docx/commit/aeb3f0041d352ea8442551d30770644d04698e7a)) +* handled horizontal alignment ([72478cb](https://github.com/privateOmega/html-to-docx/commit/72478cb2308ac029f9a8149c416012101d23c18c)) +* handled image inside table cell ([339c18a](https://github.com/privateOmega/html-to-docx/commit/339c18a3de7e7e86e4133a72e54cb6ed5ec386c2)) +* handled table width ([237ddfd](https://github.com/privateOmega/html-to-docx/commit/237ddfd6bff914e0379c6cbd940a7eac29d7aeaf)) +* handled vertical alignment ([b2b3bcc](https://github.com/privateOmega/html-to-docx/commit/b2b3bcc382dc645a3cdebe18d99558538bad6282)) +* handling anchor tag ([8d0fa4b](https://github.com/privateOmega/html-to-docx/commit/8d0fa4bc8413c0aa256535eb3679c224eb79bcc2)) +* handling multiple span children and multilevel formatting of text ([4c81f58](https://github.com/privateOmega/html-to-docx/commit/4c81f586400d1f227236a8b07d067331c0f02c5d)) +* handling nested formatting ([04f0d7e](https://github.com/privateOmega/html-to-docx/commit/04f0d7e822a57fc3ba98d3990e17b9153c54afc7)) +* handling non paragraph text elements ([b4cc062](https://github.com/privateOmega/html-to-docx/commit/b4cc06237862c07b900b7ce158cddf2b673f0e1c)) +* hyperlink within table cell issue ([3a02365](https://github.com/privateOmega/html-to-docx/commit/3a02365b3f7232da17791f062d971cace65c0371)) +* improved table border styling ([ba3aa67](https://github.com/privateOmega/html-to-docx/commit/ba3aa67fc484fa1a47b1f61f5dd7f69dff353f48)) +* list element render ([2881455](https://github.com/privateOmega/html-to-docx/commit/2881455633e81127e192f8e0de7fe4711c320583)) +* modified abstractnumbering definition to support nested lists ([3dd6e3e](https://github.com/privateOmega/html-to-docx/commit/3dd6e3e6a8e02b1cd0892735c9053eb0ba518092)) +* modified example to use esm bundle ([491a83d](https://github.com/privateOmega/html-to-docx/commit/491a83d9b2c0deec13743817cdf32280d39bb9cd)) +* moved namespaces into separate file ([75cdf30](https://github.com/privateOmega/html-to-docx/commit/75cdf3033e69934b189a74d6c77eef08d50492aa)) +* namespace updated to 2016 standards ([6fc2ac2](https://github.com/privateOmega/html-to-docx/commit/6fc2ac2b6e904c4dd774b24e0ad119cccd873e0b)) +* package-lock conflicts ([e577239](https://github.com/privateOmega/html-to-docx/commit/e5772392c30cfa188cb11f0b93250e90a71b1600)) +* preserve spacing on text ([f2f12b1](https://github.com/privateOmega/html-to-docx/commit/f2f12b1f4903aa7caf6bae5cad3b88d9aed46d18)) +* removed html tidying ([0a43396](https://github.com/privateOmega/html-to-docx/commit/0a43396a9f8e022fe0f5069d513c7aa841e57d6c)) +* removed libtidy-updated ([aab3b19](https://github.com/privateOmega/html-to-docx/commit/aab3b19b725f53d3a34266f6bf49d8712190007e)) +* removed unwanted attribute ([f3caf44](https://github.com/privateOmega/html-to-docx/commit/f3caf44faf95ba8c6dee1f6f959300374e2b65ff)) +* renamed document rels schema file ([10c3fda](https://github.com/privateOmega/html-to-docx/commit/10c3fda9878847257b902d4c13c2d8dd36edd3f6)) +* renamed unit converters ([eee4487](https://github.com/privateOmega/html-to-docx/commit/eee44877cfee7228eb27b9efeb10b07a0e67ada9)) +* rewrote formatting loop to avoid memory leaks and text loss ([e5fe27c](https://github.com/privateOmega/html-to-docx/commit/e5fe27c232ba1394b93735dcc701354bbc5244b3)) +* scaled down images ([72d7c44](https://github.com/privateOmega/html-to-docx/commit/72d7c448730a46499a1a5cab50c443a525967a54)) +* set default values for table attributes and styles ([2a4fb23](https://github.com/privateOmega/html-to-docx/commit/2a4fb23747cc3830c1ed81fade8316a27f67efd7)) +* set header and footer HTML strings if corresponding option is true ([c4aecd0](https://github.com/privateOmega/html-to-docx/commit/c4aecd07f5fdceaf025a8ad260b0af2feeebd557)) +* table cell border style support ([2c5a205](https://github.com/privateOmega/html-to-docx/commit/2c5a2055d33ee02f55a07e9c8ba985e2e07f2871)) +* table cell vertical align issue ([424d2c1](https://github.com/privateOmega/html-to-docx/commit/424d2c1177e1d335dbfa2b016d59cd50817e679a)) +* table header bold ([aa62347](https://github.com/privateOmega/html-to-docx/commit/aa6234724f7b8f1ba91d724b9c6cd12ab2b725cb)) +* updated document abstraction to track generation ids ([c34810f](https://github.com/privateOmega/html-to-docx/commit/c34810f1373f934b0b3ecbe9da2838f41a68dcc9)) +* updated documentrels xml generation ([433e4b4](https://github.com/privateOmega/html-to-docx/commit/433e4b4eb9d71beede8feb1754363163ba5d1933)) +* updated example ([ec6323a](https://github.com/privateOmega/html-to-docx/commit/ec6323aa0124bcfe5f0c11ad181c0930d9d9a825)) +* updated high level option ([84a11bc](https://github.com/privateOmega/html-to-docx/commit/84a11bc364991910b0428567b95a662149ca71c5)) +* updated numbering xml generation ([81b7a82](https://github.com/privateOmega/html-to-docx/commit/81b7a8296d1e3afa095f47007a66698852d29f95)) +* updated row borders to use css borders ([76aeb85](https://github.com/privateOmega/html-to-docx/commit/76aeb85e8f75edb2c669f28674e5353599045866)) +* updated xml builder to use namespace and child nodes ([2e28b5e](https://github.com/privateOmega/html-to-docx/commit/2e28b5ec07241c10c4288412a6ced8023e8c03ce)) +* used image dimensions for extent fragment ([aa17f74](https://github.com/privateOmega/html-to-docx/commit/aa17f74d3a2fab51cfa730ce62c09c2862bad532)) +* using libtidy for cleaning up HTML string ([6b237a8](https://github.com/privateOmega/html-to-docx/commit/6b237a885008414c4625ca6b891bd7e48cee2111)) +* wrapped drawing inside paragraph tag ([d0476b4](https://github.com/privateOmega/html-to-docx/commit/d0476b4211fe13f5918091a6a06e5021015a5db8)) +* **template:** fixed document templating ([5f6a74f](https://github.com/privateOmega/html-to-docx/commit/5f6a74f9964348590fbb7f5baf88230c8c796766)) +* **template:** fixed numbering templating ([8b09691](https://github.com/privateOmega/html-to-docx/commit/8b096916284cbbe8452bb572d788caee23849084)) +* **template:** removed word xml schema ([ee0e1ed](https://github.com/privateOmega/html-to-docx/commit/ee0e1ed7b0b00cbaf3644ad887175abac0282dcc)) + +### [1.1.31](https://github.com/privateOmega/html-to-docx/compare/v1.1.30...v1.1.31) (2020-10-06) + + +### Features + +* added page break support ([085ed2a](https://github.com/privateOmega/html-to-docx/commit/085ed2a2cb439ee2a4189b3664deca047926672b)) +* added table row cant split option ([252178c](https://github.com/privateOmega/html-to-docx/commit/252178c922d9910b8a89e6c4e30fafd2994d92d7)) + + +### Bug Fixes + +* removed html tidying ([0a43396](https://github.com/privateOmega/html-to-docx/commit/0a43396a9f8e022fe0f5069d513c7aa841e57d6c)) +* removed libtidy-updated ([aab3b19](https://github.com/privateOmega/html-to-docx/commit/aab3b19b725f53d3a34266f6bf49d8712190007e)) +* updated example ([ec6323a](https://github.com/privateOmega/html-to-docx/commit/ec6323aa0124bcfe5f0c11ad181c0930d9d9a825)) +* updated high level option ([84a11bc](https://github.com/privateOmega/html-to-docx/commit/84a11bc364991910b0428567b95a662149ca71c5)) + +### [1.1.30](https://github.com/privateOmega/html-to-docx/compare/v1.1.29...v1.1.30) (2020-09-21) + + +### Features + +* added generic rels xml string ([7d2ea84](https://github.com/privateOmega/html-to-docx/commit/7d2ea8404093fd99ce5e6bccaedaf3603830f574)) +* added header relationship support ([cc08355](https://github.com/privateOmega/html-to-docx/commit/cc083553e28a3ed88da3cc27ef0de0cbb26350b3)) + +### [1.1.29](https://github.com/privateOmega/html-to-docx/compare/v1.1.28...v1.1.29) (2020-08-11) + + +### Bug Fixes + +* formatted list ([2e00e44](https://github.com/privateOmega/html-to-docx/commit/2e00e448b812111d09c50b9759b9dd46bd36c860)) + +### [1.1.28](https://github.com/privateOmega/html-to-docx/compare/v1.1.27...v1.1.28) (2020-08-06) + + +### Features + +* added table max width support ([49ab5d3](https://github.com/privateOmega/html-to-docx/commit/49ab5d3876cdd58c2efd1b492fc5bb41e9a857e7)) + + +### Bug Fixes + +* added extra before spacing for heading elements ([dc50c8d](https://github.com/privateOmega/html-to-docx/commit/dc50c8dfe85a126be1780598974752cd939b6a9f)) +* changed width conditions to match suggestions ([48347ab](https://github.com/privateOmega/html-to-docx/commit/48347abe339aadc3b322d763d52bc607d1293680)) + +### [1.1.27](https://github.com/privateOmega/html-to-docx/compare/v1.1.26...v1.1.27) (2020-08-04) + + +### Bug Fixes + +* list element render ([2881455](https://github.com/privateOmega/html-to-docx/commit/2881455633e81127e192f8e0de7fe4711c320583)) + +### [1.1.26](https://github.com/privateOmega/html-to-docx/compare/v1.1.25...v1.1.26) (2020-08-04) + + +### Bug Fixes + +* handled formatting within list element ([aeb3f00](https://github.com/privateOmega/html-to-docx/commit/aeb3f0041d352ea8442551d30770644d04698e7a)) + +### [1.1.25](https://github.com/privateOmega/html-to-docx/compare/v1.1.24...v1.1.25) (2020-07-24) + + +### Features + +* changed list parsing to support nested lists ([4339f2f](https://github.com/privateOmega/html-to-docx/commit/4339f2f9d2bdc5ffd68def80449c9bce8c09c9a9)) + + +### Bug Fixes + +* modified abstractnumbering definition to support nested lists ([3dd6e3e](https://github.com/privateOmega/html-to-docx/commit/3dd6e3e6a8e02b1cd0892735c9053eb0ba518092)) + +### [1.1.24](https://github.com/privateOmega/html-to-docx/compare/v1.1.23...v1.1.24) (2020-07-22) + + +### Bug Fixes + +* updated row borders to use css borders ([76aeb85](https://github.com/privateOmega/html-to-docx/commit/76aeb85e8f75edb2c669f28674e5353599045866)) + +### [1.1.23](https://github.com/privateOmega/html-to-docx/compare/v1.1.22...v1.1.23) (2020-07-21) + + +### Features + +* added css border string parser ([15562e8](https://github.com/privateOmega/html-to-docx/commit/15562e817732d1d85b99fd33921694f2e3ad3ad7)) +* added eip conversions ([9d6e317](https://github.com/privateOmega/html-to-docx/commit/9d6e3171c0b0f9d71f776762357d4a329778cedb)) +* added minimum width support to tables ([b10d820](https://github.com/privateOmega/html-to-docx/commit/b10d820061b10531aa027fde304fbe3ceac849d5)) +* make tables center aligned ([077049b](https://github.com/privateOmega/html-to-docx/commit/077049b40babc45ec527b53211d4b33ba4f2b6ab)) + + +### Bug Fixes + +* border color ([a322450](https://github.com/privateOmega/html-to-docx/commit/a322450ceda77dbabaee24d1e9619ced04d88cad)) +* improved table border styling ([ba3aa67](https://github.com/privateOmega/html-to-docx/commit/ba3aa67fc484fa1a47b1f61f5dd7f69dff353f48)) +* set default values for table attributes and styles ([2a4fb23](https://github.com/privateOmega/html-to-docx/commit/2a4fb23747cc3830c1ed81fade8316a27f67efd7)) + +### 1.1.22 (2020-07-09) + + +### Features + +* **packaging:** added jszip for packaging ([89619ec](https://github.com/privateOmega/html-to-docx/commit/89619ec702564fb9c5eccaee55e65d366fcbacad)) +* **packaging:** added method to create container ([9808cf2](https://github.com/privateOmega/html-to-docx/commit/9808cf211bbb50cf3d7cbe122d01c82d4272e888)) +* enabling header on flag ([516463c](https://github.com/privateOmega/html-to-docx/commit/516463cd532e58895faa8dd465b7e725f0de59e3)) +* **template:** added base docx template ([abdb87b](https://github.com/privateOmega/html-to-docx/commit/abdb87bdfead91890f9d54e2cedd038e916b6dce)) +* abstracted conversion using docxDocument class ([c625a01](https://github.com/privateOmega/html-to-docx/commit/c625a0181a6c328c0319b579fa1173192dff1187)) +* added b tag support ([f867abd](https://github.com/privateOmega/html-to-docx/commit/f867abd41c6bc85bbba207a27c58d441f1a2b532)) +* added builder methods for images ([9e2720f](https://github.com/privateOmega/html-to-docx/commit/9e2720f261a46701c8a2581aadafa9b60e6cee6b)) +* added css color string ([cb0db2f](https://github.com/privateOmega/html-to-docx/commit/cb0db2ff2d3f2f66df823dbafbc5603030241bc3)) +* added document file render helper ([6dd9c3a](https://github.com/privateOmega/html-to-docx/commit/6dd9c3a01f5fceab78404d8ebddb848fb91c933c)) +* added em tag support ([6a06265](https://github.com/privateOmega/html-to-docx/commit/6a06265f724a611b50144cb988e576bc4e40b4d4)) +* added escape-html ([1a231d5](https://github.com/privateOmega/html-to-docx/commit/1a231d5dde3e6f9b5a23f248e19063191c07e54f)) +* added font size support ([0f27c60](https://github.com/privateOmega/html-to-docx/commit/0f27c609baa5b9488bc195dff1c060bcc04bbf2d)) +* added font support in styles ([18b3281](https://github.com/privateOmega/html-to-docx/commit/18b3281ac3f91e5c1905efa0487354ff78badec2)) +* added font table ([0903d6b](https://github.com/privateOmega/html-to-docx/commit/0903d6b98fae6dc378cdeafdadd80a86501c9959)) +* added header generation ([25fb44f](https://github.com/privateOmega/html-to-docx/commit/25fb44f945df3fdc5f37d619b3de3ebe68b84cd6)) +* added heading sizes ([bb18e72](https://github.com/privateOmega/html-to-docx/commit/bb18e724c42b0c4581722b2899d5ff808c1495c4)) +* added headings support ([fd489ee](https://github.com/privateOmega/html-to-docx/commit/fd489eeebfeedc7d05991f9366aeae2adc49fd6f)) +* added highlight support ([6159925](https://github.com/privateOmega/html-to-docx/commit/6159925495b74ab254cd7dc5628526d531595a92)) +* added horizontal text alignment ([d29669f](https://github.com/privateOmega/html-to-docx/commit/d29669ffdb0d63b7bdbbe09c6bca990e4c28cfb8)) +* added hsl conversion support ([153fa43](https://github.com/privateOmega/html-to-docx/commit/153fa43f84c640085f45823bc2054b24c28023d0)) +* added hyperlinks support ([3560ce9](https://github.com/privateOmega/html-to-docx/commit/3560ce9f23fa8f590aa340302bf0059c8dfb6d5f)) +* added ins tag support ([6d64908](https://github.com/privateOmega/html-to-docx/commit/6d64908858dac290aa34421c236bdaf2d8ef07a7)) +* added line height support ([3d0ea2f](https://github.com/privateOmega/html-to-docx/commit/3d0ea2fe56d13893e3c5cd0e4a35e7b26b7c1d0a)) +* added linebreak support ([57c054c](https://github.com/privateOmega/html-to-docx/commit/57c054cd65f49d7c4244272af0117f2c141a8bc7)) +* added method to archive images with other files ([b6da74b](https://github.com/privateOmega/html-to-docx/commit/b6da74be10be03d689ca044f3f95dd724a3a29b6)) +* added more unit converters ([8f78c52](https://github.com/privateOmega/html-to-docx/commit/8f78c5241cf33d471c8b08e3f941f401d6a50d7b)) +* added more xml builder methods ([ffc584b](https://github.com/privateOmega/html-to-docx/commit/ffc584bed7ab434431999517a3308483ba99489a)) +* added more xml statment builder methods ([337e530](https://github.com/privateOmega/html-to-docx/commit/337e5305aa8768b6507323bec2279d557a35b67b)) +* added other measure units for margins and fonts ([1ae584a](https://github.com/privateOmega/html-to-docx/commit/1ae584a1b0a5350943e10c0d129402b843d7b9a2)) +* added strike through support ([b73e8c7](https://github.com/privateOmega/html-to-docx/commit/b73e8c76d0051bc6449ed57861b4ce1c7ad4b408)) +* added support for span font sizing ([98b4844](https://github.com/privateOmega/html-to-docx/commit/98b4844858f967bd5a3932262d0b535cd53d499d)) +* added support for subscript and superscript ([f1ee4ed](https://github.com/privateOmega/html-to-docx/commit/f1ee4edf183a45731b48bba2b91154da591c203f)) +* added table row height support ([031c3aa](https://github.com/privateOmega/html-to-docx/commit/031c3aa963e5a7b2ee985ae8ac6ff612c89ae974)) +* added text formatting to paragraph ([bacd888](https://github.com/privateOmega/html-to-docx/commit/bacd888253a35a18ac7ea4e9141d4a4fb60e3cf7)) +* added valign to table cell element ([20e94f1](https://github.com/privateOmega/html-to-docx/commit/20e94f18370e8a92034f6d35f5e744ceb57ed774)) +* added vdom to xml method ([8b5a618](https://github.com/privateOmega/html-to-docx/commit/8b5a6185e6e211b0e07b9f1c1b7e23fb4b13dc9c)) +* added virtual-dom and html-to-vdom ([feaa396](https://github.com/privateOmega/html-to-docx/commit/feaa396162465276d19b7d3d5c51a533987a1738)) +* added xbuilder ([f13b5cc](https://github.com/privateOmega/html-to-docx/commit/f13b5cc06d29ae53493f1f4b8fdef6e8986e64e6)) +* added xml builder methods for images ([f413ad8](https://github.com/privateOmega/html-to-docx/commit/f413ad89b263c63a8fb9890b44b1b219a7413c4b)) +* added xml statement builder helper ([5e23c16](https://github.com/privateOmega/html-to-docx/commit/5e23c1636eb3c64f52589f1ac71a48dec3df65c2)) +* handle line breaks ([164c0f5](https://github.com/privateOmega/html-to-docx/commit/164c0f5e17f62e3f30da25be6e181d3414ca4dde)) +* styling table color ([2b44bff](https://github.com/privateOmega/html-to-docx/commit/2b44bff7dee0dad0de75f3c3b2403278c19e3a4b)) +* **template:** added numbering schema ([d179d73](https://github.com/privateOmega/html-to-docx/commit/d179d736e6e63ed42104a231ca0489430faae00a)) +* **template:** added styles schema ([d83d230](https://github.com/privateOmega/html-to-docx/commit/d83d230a66807f6ad08ebb4a6c0c5299c311aaf5)) +* **template:** added XML schemas ([42232da](https://github.com/privateOmega/html-to-docx/commit/42232da9d63ed404367703e56b1c65cdb8a23782)) + + +### Bug Fixes + +* 3 digit hex color code support ([255fe82](https://github.com/privateOmega/html-to-docx/commit/255fe82fc47e2a447c795c346ae7c6634ae442d1)) +* added attributes to anchor drawing ([62e4a29](https://github.com/privateOmega/html-to-docx/commit/62e4a29ef664257d8f0364d5d97f056a62f0fb61)) +* added black as default color ([bcfcba3](https://github.com/privateOmega/html-to-docx/commit/bcfcba36194925fdf08a4c297ceafcb5b08c124b)) +* added bold to headings ([abe968a](https://github.com/privateOmega/html-to-docx/commit/abe968a0f2cdac5d01abf44bf7e7019922b295dd)) +* added border for paragraph padding ([252ead6](https://github.com/privateOmega/html-to-docx/commit/252ead6dc9f09b84edc9f1b145bb76ad2cb4fc01)) +* added colspan support for table cells ([bdf92f8](https://github.com/privateOmega/html-to-docx/commit/bdf92f8dbb10b4b58188364f3bdc5ff91e9cc982)) +* added default options ([4590800](https://github.com/privateOmega/html-to-docx/commit/459080010f92ce7464f4815585088a46ce8e759d)) +* added effectextent and srcrect fragment ([5f5e975](https://github.com/privateOmega/html-to-docx/commit/5f5e975b135eb38c48e18a09da590b363166d74e)) +* added empty paragraph for spacing after table ([6bae787](https://github.com/privateOmega/html-to-docx/commit/6bae787cbf3f376b8ec34389f444d8c7c5f3b340)) +* added extent fragment ([7ce81f2](https://github.com/privateOmega/html-to-docx/commit/7ce81f27e4c493bb9bf7d368a415f34cb0678e4c)) +* added header override in content-types xml ([5de681b](https://github.com/privateOmega/html-to-docx/commit/5de681be9295754eff648cea504e07bf9a6f6d09)) +* added html string minifier ([8faa19c](https://github.com/privateOmega/html-to-docx/commit/8faa19c46ff85a31b16e89207cbc2120c6ed5805)) +* added image conversion handler ([f726e71](https://github.com/privateOmega/html-to-docx/commit/f726e71ee2504bc254794ad09eaf5d67a8901b9a)) +* added image in table cell support ([7d98a16](https://github.com/privateOmega/html-to-docx/commit/7d98a16b1509b57910e8294cfb3985a88b7154ae)) +* added inline attributes ([0a4d2ce](https://github.com/privateOmega/html-to-docx/commit/0a4d2ce4b4c64952c3866928e6355b7c891ac044)) +* added italics, underline and bold in runproperties ([34c2e18](https://github.com/privateOmega/html-to-docx/commit/34c2e18123c8a6a956209951afebc0dce2ab6cfc)) +* added more namespaces ([68636b4](https://github.com/privateOmega/html-to-docx/commit/68636b4c7cc73bf9e0de75b7bf97ac9afb4fb6f9)) +* added namespace aliases to header and numbering xmls ([d0b4101](https://github.com/privateOmega/html-to-docx/commit/d0b4101017a6dabd0fa18e23228bd4af338129eb)) +* added numbering and styles relationship ([c7e29af](https://github.com/privateOmega/html-to-docx/commit/c7e29af7414ce71515c46861942342d4f397222b)) +* added other namespaces to the xml root ([afbbca9](https://github.com/privateOmega/html-to-docx/commit/afbbca9dbf723afc857034ce7770bc8f0840c0e4)) +* added override for relationship ([30acddc](https://github.com/privateOmega/html-to-docx/commit/30acddc84d40dc6c66ed9539618b94adeeb2fc85)) +* added override for settings and websettings ([977af04](https://github.com/privateOmega/html-to-docx/commit/977af04f48c19f2b3162cf6e61782cf63e7162e8)) +* added overrides for relationships ([22b9cac](https://github.com/privateOmega/html-to-docx/commit/22b9cac2fa788b9654262e450774c588180a18de)) +* added padding between image and wrapping text ([e45fbf5](https://github.com/privateOmega/html-to-docx/commit/e45fbf553c19071023634b692e3c4b0fab04aedf)) +* added positioning fragments ([e6f7e1c](https://github.com/privateOmega/html-to-docx/commit/e6f7e1c3679aa813a2818725548dfb5ebb0d9bd7)) +* added required attributes to anchor fragment ([d01c9f9](https://github.com/privateOmega/html-to-docx/commit/d01c9f915a929de201218af127103da627aaa4a1)) +* added settings and websettings relation ([34aeedc](https://github.com/privateOmega/html-to-docx/commit/34aeedce6d0dd02822062762f9b077bb146b09b9)) +* added settings and websettings to ooxml package ([6c829b5](https://github.com/privateOmega/html-to-docx/commit/6c829b5ec4596ba0b5d41fae9ba2bfd68fdf7230)) +* added simple positioning to anchor ([5006cc4](https://github.com/privateOmega/html-to-docx/commit/5006cc47d112360e51d8051f1ebff570e9f12779)) +* added support for decimal inch ([6027d2f](https://github.com/privateOmega/html-to-docx/commit/6027d2f36bbc9bb97ff4cbcaa59372df33528a54)) +* added support for full width background color ([733a937](https://github.com/privateOmega/html-to-docx/commit/733a9373ba13ccb0b781f66fe87d91a3eed4aab9)) +* added table and cell border support ([985f6a1](https://github.com/privateOmega/html-to-docx/commit/985f6a1e7a2e52f3b0a609a00da8a11bf113ef16)) +* added table borders ([12864db](https://github.com/privateOmega/html-to-docx/commit/12864db468a08f4aca4d01cb8e8b6635aa09c57d)) +* added table cell border support ([852c091](https://github.com/privateOmega/html-to-docx/commit/852c091e15a3b2add7b622472be8fc021bb05c06)) +* added table header support ([592aa89](https://github.com/privateOmega/html-to-docx/commit/592aa893fa115a83bc1d056c98480dbe5cc872f9)) +* added table width support ([73b172b](https://github.com/privateOmega/html-to-docx/commit/73b172b584aaeb7137d58e0eb2d8b73c4bb92561)) +* added unit conversion utils ([d5b5a91](https://github.com/privateOmega/html-to-docx/commit/d5b5a915d215fb834cfe84996539ae663cc98914)) +* added unit conversions ([e6d546b](https://github.com/privateOmega/html-to-docx/commit/e6d546bca1a87182568d15bad99ac0af23ee55de)) +* added unit conversions ([5890b18](https://github.com/privateOmega/html-to-docx/commit/5890b18833cc11f10c8ffc1e57d1dd9ffd46395d)) +* added wrap elements ([c951688](https://github.com/privateOmega/html-to-docx/commit/c95168864c4929e2ab95c5a6a53d0919c76f8a83)) +* bold based on font-weight ([3f0376e](https://github.com/privateOmega/html-to-docx/commit/3f0376e0a1e267705117a2ec50c9f382286b2a60)) +* changed attribute field for picture name ([aef241d](https://github.com/privateOmega/html-to-docx/commit/aef241dc3d3d9adb732c429df9f0c2771b319680)) +* changed attribute used for name ([3885233](https://github.com/privateOmega/html-to-docx/commit/3885233bf14f9b7b16d48a2844d3e997e476a8ee)) +* changed default namespace of relationship to solve render issue ([56a3554](https://github.com/privateOmega/html-to-docx/commit/56a3554e7b2e9d85cedeece8d20acfebf23666ad)) +* changed file extension if octet stream is encountered ([32c5bf1](https://github.com/privateOmega/html-to-docx/commit/32c5bf1b5f7c5f8dc83a51fed142e932c7b008fd)) +* changed line spacing rule to work with inline images ([489f1c6](https://github.com/privateOmega/html-to-docx/commit/489f1c62fc093b108bc16aee33d74baad4ced7d8)) +* changed namespaces to original ecma 376 spec ([51be86e](https://github.com/privateOmega/html-to-docx/commit/51be86ecf0f4a78457840bf2a31579d217568208)) +* changed paragraph after spacing ([025523b](https://github.com/privateOmega/html-to-docx/commit/025523b0f07433456e3f19f3774f441e46c7a89b)) +* created seperate abstract numbering for each lists ([c723c74](https://github.com/privateOmega/html-to-docx/commit/c723c746a3feb2612e73dddac14f1c40864e9ad9)) +* fix table render issue due to grid width ([636d499](https://github.com/privateOmega/html-to-docx/commit/636d499bcee00195f7b5ca198c60bb3e0f7d2a69)) +* fixed abstract numbering id ([9814cb8](https://github.com/privateOmega/html-to-docx/commit/9814cb89582bc7e87cec638be37ee1cd326c6117)) +* fixed coloring and refactored other text formatting ([c288f80](https://github.com/privateOmega/html-to-docx/commit/c288f809ea6387c91356976a6dd81396cecafc46)) +* fixed document rels and numbering bug ([d6e3152](https://github.com/privateOmega/html-to-docx/commit/d6e3152081da7d2ab379a67bfda345964fa15c40)) +* fixed docx generation ([3d96acf](https://github.com/privateOmega/html-to-docx/commit/3d96acf511d82776510fac857af57d5cb9453f89)) +* fixed incorrect table row generation ([742dd18](https://github.com/privateOmega/html-to-docx/commit/742dd1882ce4c1a33ab51e10ee2a628b817eca31)) +* fixed internal mode and added extensions ([1266121](https://github.com/privateOmega/html-to-docx/commit/12661213e00c55f7068e93abb019ba80cd4f2d87)) +* fixed margin issues ([f841b76](https://github.com/privateOmega/html-to-docx/commit/f841b76caa944ea5eec206a3b3fce3e5a5eaf3e7)) +* fixed numbering and header issue due to wrong filename ([64a04bc](https://github.com/privateOmega/html-to-docx/commit/64a04bc192616162aa67c43f80734e7ebb9ff588)) +* fixed table and image rendering ([c153092](https://github.com/privateOmega/html-to-docx/commit/c1530924f93351ce63882bf0e6050b6315aa6017)) +* handled empty formatting tag ([d97521f](https://github.com/privateOmega/html-to-docx/commit/d97521f8004d2e7af9f324cdbdcbbe4fcc299e4b)) +* handled figure wrapper for images and tables ([4182a95](https://github.com/privateOmega/html-to-docx/commit/4182a9543aeb71fd8b0d2c7a2e08978a782de3e6)) +* handled horizontal alignment ([72478cb](https://github.com/privateOmega/html-to-docx/commit/72478cb2308ac029f9a8149c416012101d23c18c)) +* handled image inside table cell ([339c18a](https://github.com/privateOmega/html-to-docx/commit/339c18a3de7e7e86e4133a72e54cb6ed5ec386c2)) +* handled table width ([237ddfd](https://github.com/privateOmega/html-to-docx/commit/237ddfd6bff914e0379c6cbd940a7eac29d7aeaf)) +* handled vertical alignment ([b2b3bcc](https://github.com/privateOmega/html-to-docx/commit/b2b3bcc382dc645a3cdebe18d99558538bad6282)) +* handling multiple span children and multilevel formatting of text ([4c81f58](https://github.com/privateOmega/html-to-docx/commit/4c81f586400d1f227236a8b07d067331c0f02c5d)) +* handling nested formatting ([04f0d7e](https://github.com/privateOmega/html-to-docx/commit/04f0d7e822a57fc3ba98d3990e17b9153c54afc7)) +* handling non paragraph text elements ([b4cc062](https://github.com/privateOmega/html-to-docx/commit/b4cc06237862c07b900b7ce158cddf2b673f0e1c)) +* modified example to use esm bundle ([491a83d](https://github.com/privateOmega/html-to-docx/commit/491a83d9b2c0deec13743817cdf32280d39bb9cd)) +* moved namespaces into separate file ([75cdf30](https://github.com/privateOmega/html-to-docx/commit/75cdf3033e69934b189a74d6c77eef08d50492aa)) +* namespace updated to 2016 standards ([6fc2ac2](https://github.com/privateOmega/html-to-docx/commit/6fc2ac2b6e904c4dd774b24e0ad119cccd873e0b)) +* preserve spacing on text ([f2f12b1](https://github.com/privateOmega/html-to-docx/commit/f2f12b1f4903aa7caf6bae5cad3b88d9aed46d18)) +* removed unwanted attribute ([f3caf44](https://github.com/privateOmega/html-to-docx/commit/f3caf44faf95ba8c6dee1f6f959300374e2b65ff)) +* renamed document rels schema file ([10c3fda](https://github.com/privateOmega/html-to-docx/commit/10c3fda9878847257b902d4c13c2d8dd36edd3f6)) +* renamed unit converters ([eee4487](https://github.com/privateOmega/html-to-docx/commit/eee44877cfee7228eb27b9efeb10b07a0e67ada9)) +* rewrote formatting loop to avoid memory leaks and text loss ([e5fe27c](https://github.com/privateOmega/html-to-docx/commit/e5fe27c232ba1394b93735dcc701354bbc5244b3)) +* scaled down images ([72d7c44](https://github.com/privateOmega/html-to-docx/commit/72d7c448730a46499a1a5cab50c443a525967a54)) +* table cell border style support ([2c5a205](https://github.com/privateOmega/html-to-docx/commit/2c5a2055d33ee02f55a07e9c8ba985e2e07f2871)) +* **template:** fixed document templating ([5f6a74f](https://github.com/privateOmega/html-to-docx/commit/5f6a74f9964348590fbb7f5baf88230c8c796766)) +* table cell vertical align issue ([424d2c1](https://github.com/privateOmega/html-to-docx/commit/424d2c1177e1d335dbfa2b016d59cd50817e679a)) +* table header bold ([aa62347](https://github.com/privateOmega/html-to-docx/commit/aa6234724f7b8f1ba91d724b9c6cd12ab2b725cb)) +* updated document abstraction to track generation ids ([c34810f](https://github.com/privateOmega/html-to-docx/commit/c34810f1373f934b0b3ecbe9da2838f41a68dcc9)) +* **template:** fixed numbering templating ([8b09691](https://github.com/privateOmega/html-to-docx/commit/8b096916284cbbe8452bb572d788caee23849084)) +* updated documentrels xml generation ([433e4b4](https://github.com/privateOmega/html-to-docx/commit/433e4b4eb9d71beede8feb1754363163ba5d1933)) +* updated numbering xml generation ([81b7a82](https://github.com/privateOmega/html-to-docx/commit/81b7a8296d1e3afa095f47007a66698852d29f95)) +* updated xml builder to use namespace and child nodes ([2e28b5e](https://github.com/privateOmega/html-to-docx/commit/2e28b5ec07241c10c4288412a6ced8023e8c03ce)) +* **template:** removed word xml schema ([ee0e1ed](https://github.com/privateOmega/html-to-docx/commit/ee0e1ed7b0b00cbaf3644ad887175abac0282dcc)) +* used image dimensions for extent fragment ([aa17f74](https://github.com/privateOmega/html-to-docx/commit/aa17f74d3a2fab51cfa730ce62c09c2862bad532)) +* using libtidy for cleaning up HTML string ([6b237a8](https://github.com/privateOmega/html-to-docx/commit/6b237a885008414c4625ca6b891bd7e48cee2111)) +* wrapped drawing inside paragraph tag ([d0476b4](https://github.com/privateOmega/html-to-docx/commit/d0476b4211fe13f5918091a6a06e5021015a5db8)) + +### [1.1.21](https://github.com/privateOmega/html-to-docx/compare/v1.1.20...v1.1.21) (2020-07-02) + + +### Bug Fixes + +* changed paragraph after spacing ([025523b](https://github.com/privateOmega/html-to-docx/commit/025523b0f07433456e3f19f3774f441e46c7a89b)) + +### [1.1.20](https://github.com/privateOmega/html-to-docx/compare/v1.1.19...v1.1.20) (2020-07-01) + +### [1.1.19](https://github.com/privateOmega/html-to-docx/compare/v1.1.18...v1.1.19) (2020-07-01) + + +### Bug Fixes + +* handled empty formatting tag ([d97521f](https://github.com/privateOmega/html-to-docx/commit/d97521f8004d2e7af9f324cdbdcbbe4fcc299e4b)) + +### [1.1.18](https://github.com/privateOmega/html-to-docx/compare/v1.1.17...v1.1.18) (2020-06-23) + + +### Bug Fixes + +* added border for paragraph padding ([252ead6](https://github.com/privateOmega/html-to-docx/commit/252ead6dc9f09b84edc9f1b145bb76ad2cb4fc01)) + +### [1.1.17](https://github.com/privateOmega/html-to-docx/compare/v1.1.16...v1.1.17) (2020-06-15) + + +### Bug Fixes + +* added support for decimal inch ([6027d2f](https://github.com/privateOmega/html-to-docx/commit/6027d2f36bbc9bb97ff4cbcaa59372df33528a54)) +* added support for full width background color ([733a937](https://github.com/privateOmega/html-to-docx/commit/733a9373ba13ccb0b781f66fe87d91a3eed4aab9)) + +### [1.1.16](https://github.com/privateOmega/html-to-docx/compare/v1.1.15...v1.1.16) (2020-06-12) + + +### Bug Fixes + +* handled image inside table cell ([339c18a](https://github.com/privateOmega/html-to-docx/commit/339c18a3de7e7e86e4133a72e54cb6ed5ec386c2)) + +### [1.1.15](https://github.com/privateOmega/html-to-docx/compare/v1.1.14...v1.1.15) (2020-06-12) + +### 1.1.14 (2020-06-12) + + +### Features + +* **packaging:** added jszip for packaging ([89619ec](https://github.com/privateOmega/html-to-docx/commit/89619ec702564fb9c5eccaee55e65d366fcbacad)) +* **packaging:** added method to create container ([9808cf2](https://github.com/privateOmega/html-to-docx/commit/9808cf211bbb50cf3d7cbe122d01c82d4272e888)) +* enabling header on flag ([516463c](https://github.com/privateOmega/html-to-docx/commit/516463cd532e58895faa8dd465b7e725f0de59e3)) +* **template:** added base docx template ([abdb87b](https://github.com/privateOmega/html-to-docx/commit/abdb87bdfead91890f9d54e2cedd038e916b6dce)) +* abstracted conversion using docxDocument class ([c625a01](https://github.com/privateOmega/html-to-docx/commit/c625a0181a6c328c0319b579fa1173192dff1187)) +* added b tag support ([f867abd](https://github.com/privateOmega/html-to-docx/commit/f867abd41c6bc85bbba207a27c58d441f1a2b532)) +* added builder methods for images ([9e2720f](https://github.com/privateOmega/html-to-docx/commit/9e2720f261a46701c8a2581aadafa9b60e6cee6b)) +* added css color string ([cb0db2f](https://github.com/privateOmega/html-to-docx/commit/cb0db2ff2d3f2f66df823dbafbc5603030241bc3)) +* added document file render helper ([6dd9c3a](https://github.com/privateOmega/html-to-docx/commit/6dd9c3a01f5fceab78404d8ebddb848fb91c933c)) +* added em tag support ([6a06265](https://github.com/privateOmega/html-to-docx/commit/6a06265f724a611b50144cb988e576bc4e40b4d4)) +* added escape-html ([1a231d5](https://github.com/privateOmega/html-to-docx/commit/1a231d5dde3e6f9b5a23f248e19063191c07e54f)) +* added font size support ([0f27c60](https://github.com/privateOmega/html-to-docx/commit/0f27c609baa5b9488bc195dff1c060bcc04bbf2d)) +* added font support in styles ([18b3281](https://github.com/privateOmega/html-to-docx/commit/18b3281ac3f91e5c1905efa0487354ff78badec2)) +* added font table ([0903d6b](https://github.com/privateOmega/html-to-docx/commit/0903d6b98fae6dc378cdeafdadd80a86501c9959)) +* added header generation ([25fb44f](https://github.com/privateOmega/html-to-docx/commit/25fb44f945df3fdc5f37d619b3de3ebe68b84cd6)) +* added heading sizes ([bb18e72](https://github.com/privateOmega/html-to-docx/commit/bb18e724c42b0c4581722b2899d5ff808c1495c4)) +* added headings support ([fd489ee](https://github.com/privateOmega/html-to-docx/commit/fd489eeebfeedc7d05991f9366aeae2adc49fd6f)) +* added highlight support ([6159925](https://github.com/privateOmega/html-to-docx/commit/6159925495b74ab254cd7dc5628526d531595a92)) +* added horizontal text alignment ([d29669f](https://github.com/privateOmega/html-to-docx/commit/d29669ffdb0d63b7bdbbe09c6bca990e4c28cfb8)) +* added hsl conversion support ([153fa43](https://github.com/privateOmega/html-to-docx/commit/153fa43f84c640085f45823bc2054b24c28023d0)) +* added hyperlinks support ([3560ce9](https://github.com/privateOmega/html-to-docx/commit/3560ce9f23fa8f590aa340302bf0059c8dfb6d5f)) +* added ins tag support ([6d64908](https://github.com/privateOmega/html-to-docx/commit/6d64908858dac290aa34421c236bdaf2d8ef07a7)) +* added line height support ([3d0ea2f](https://github.com/privateOmega/html-to-docx/commit/3d0ea2fe56d13893e3c5cd0e4a35e7b26b7c1d0a)) +* added linebreak support ([57c054c](https://github.com/privateOmega/html-to-docx/commit/57c054cd65f49d7c4244272af0117f2c141a8bc7)) +* added method to archive images with other files ([b6da74b](https://github.com/privateOmega/html-to-docx/commit/b6da74be10be03d689ca044f3f95dd724a3a29b6)) +* added more unit converters ([8f78c52](https://github.com/privateOmega/html-to-docx/commit/8f78c5241cf33d471c8b08e3f941f401d6a50d7b)) +* added more xml builder methods ([ffc584b](https://github.com/privateOmega/html-to-docx/commit/ffc584bed7ab434431999517a3308483ba99489a)) +* added more xml statment builder methods ([337e530](https://github.com/privateOmega/html-to-docx/commit/337e5305aa8768b6507323bec2279d557a35b67b)) +* added other measure units for margins and fonts ([1ae584a](https://github.com/privateOmega/html-to-docx/commit/1ae584a1b0a5350943e10c0d129402b843d7b9a2)) +* added strike through support ([b73e8c7](https://github.com/privateOmega/html-to-docx/commit/b73e8c76d0051bc6449ed57861b4ce1c7ad4b408)) +* added support for span font sizing ([98b4844](https://github.com/privateOmega/html-to-docx/commit/98b4844858f967bd5a3932262d0b535cd53d499d)) +* added support for subscript and superscript ([f1ee4ed](https://github.com/privateOmega/html-to-docx/commit/f1ee4edf183a45731b48bba2b91154da591c203f)) +* added table row height support ([031c3aa](https://github.com/privateOmega/html-to-docx/commit/031c3aa963e5a7b2ee985ae8ac6ff612c89ae974)) +* added text formatting to paragraph ([bacd888](https://github.com/privateOmega/html-to-docx/commit/bacd888253a35a18ac7ea4e9141d4a4fb60e3cf7)) +* added valign to table cell element ([20e94f1](https://github.com/privateOmega/html-to-docx/commit/20e94f18370e8a92034f6d35f5e744ceb57ed774)) +* added vdom to xml method ([8b5a618](https://github.com/privateOmega/html-to-docx/commit/8b5a6185e6e211b0e07b9f1c1b7e23fb4b13dc9c)) +* added virtual-dom and html-to-vdom ([feaa396](https://github.com/privateOmega/html-to-docx/commit/feaa396162465276d19b7d3d5c51a533987a1738)) +* added xbuilder ([f13b5cc](https://github.com/privateOmega/html-to-docx/commit/f13b5cc06d29ae53493f1f4b8fdef6e8986e64e6)) +* added xml builder methods for images ([f413ad8](https://github.com/privateOmega/html-to-docx/commit/f413ad89b263c63a8fb9890b44b1b219a7413c4b)) +* added xml statement builder helper ([5e23c16](https://github.com/privateOmega/html-to-docx/commit/5e23c1636eb3c64f52589f1ac71a48dec3df65c2)) +* handle line breaks ([164c0f5](https://github.com/privateOmega/html-to-docx/commit/164c0f5e17f62e3f30da25be6e181d3414ca4dde)) +* styling table color ([2b44bff](https://github.com/privateOmega/html-to-docx/commit/2b44bff7dee0dad0de75f3c3b2403278c19e3a4b)) +* **template:** added numbering schema ([d179d73](https://github.com/privateOmega/html-to-docx/commit/d179d736e6e63ed42104a231ca0489430faae00a)) +* **template:** added styles schema ([d83d230](https://github.com/privateOmega/html-to-docx/commit/d83d230a66807f6ad08ebb4a6c0c5299c311aaf5)) +* **template:** added XML schemas ([42232da](https://github.com/privateOmega/html-to-docx/commit/42232da9d63ed404367703e56b1c65cdb8a23782)) + + +### Bug Fixes + +* 3 digit hex color code support ([255fe82](https://github.com/privateOmega/html-to-docx/commit/255fe82fc47e2a447c795c346ae7c6634ae442d1)) +* added attributes to anchor drawing ([62e4a29](https://github.com/privateOmega/html-to-docx/commit/62e4a29ef664257d8f0364d5d97f056a62f0fb61)) +* added colspan support for table cells ([bdf92f8](https://github.com/privateOmega/html-to-docx/commit/bdf92f8dbb10b4b58188364f3bdc5ff91e9cc982)) +* added default options ([4590800](https://github.com/privateOmega/html-to-docx/commit/459080010f92ce7464f4815585088a46ce8e759d)) +* added effectextent and srcrect fragment ([5f5e975](https://github.com/privateOmega/html-to-docx/commit/5f5e975b135eb38c48e18a09da590b363166d74e)) +* added empty paragraph for spacing after table ([6bae787](https://github.com/privateOmega/html-to-docx/commit/6bae787cbf3f376b8ec34389f444d8c7c5f3b340)) +* added extent fragment ([7ce81f2](https://github.com/privateOmega/html-to-docx/commit/7ce81f27e4c493bb9bf7d368a415f34cb0678e4c)) +* added header override in content-types xml ([5de681b](https://github.com/privateOmega/html-to-docx/commit/5de681be9295754eff648cea504e07bf9a6f6d09)) +* added html string minifier ([8faa19c](https://github.com/privateOmega/html-to-docx/commit/8faa19c46ff85a31b16e89207cbc2120c6ed5805)) +* added image conversion handler ([f726e71](https://github.com/privateOmega/html-to-docx/commit/f726e71ee2504bc254794ad09eaf5d67a8901b9a)) +* added image in table cell support ([7d98a16](https://github.com/privateOmega/html-to-docx/commit/7d98a16b1509b57910e8294cfb3985a88b7154ae)) +* added inline attributes ([0a4d2ce](https://github.com/privateOmega/html-to-docx/commit/0a4d2ce4b4c64952c3866928e6355b7c891ac044)) +* added italics, underline and bold in runproperties ([34c2e18](https://github.com/privateOmega/html-to-docx/commit/34c2e18123c8a6a956209951afebc0dce2ab6cfc)) +* added more namespaces ([68636b4](https://github.com/privateOmega/html-to-docx/commit/68636b4c7cc73bf9e0de75b7bf97ac9afb4fb6f9)) +* added namespace aliases to header and numbering xmls ([d0b4101](https://github.com/privateOmega/html-to-docx/commit/d0b4101017a6dabd0fa18e23228bd4af338129eb)) +* added numbering and styles relationship ([c7e29af](https://github.com/privateOmega/html-to-docx/commit/c7e29af7414ce71515c46861942342d4f397222b)) +* added other namespaces to the xml root ([afbbca9](https://github.com/privateOmega/html-to-docx/commit/afbbca9dbf723afc857034ce7770bc8f0840c0e4)) +* added override for relationship ([30acddc](https://github.com/privateOmega/html-to-docx/commit/30acddc84d40dc6c66ed9539618b94adeeb2fc85)) +* added override for settings and websettings ([977af04](https://github.com/privateOmega/html-to-docx/commit/977af04f48c19f2b3162cf6e61782cf63e7162e8)) +* added overrides for relationships ([22b9cac](https://github.com/privateOmega/html-to-docx/commit/22b9cac2fa788b9654262e450774c588180a18de)) +* added padding between image and wrapping text ([e45fbf5](https://github.com/privateOmega/html-to-docx/commit/e45fbf553c19071023634b692e3c4b0fab04aedf)) +* added positioning fragments ([e6f7e1c](https://github.com/privateOmega/html-to-docx/commit/e6f7e1c3679aa813a2818725548dfb5ebb0d9bd7)) +* added required attributes to anchor fragment ([d01c9f9](https://github.com/privateOmega/html-to-docx/commit/d01c9f915a929de201218af127103da627aaa4a1)) +* added settings and websettings relation ([34aeedc](https://github.com/privateOmega/html-to-docx/commit/34aeedce6d0dd02822062762f9b077bb146b09b9)) +* added settings and websettings to ooxml package ([6c829b5](https://github.com/privateOmega/html-to-docx/commit/6c829b5ec4596ba0b5d41fae9ba2bfd68fdf7230)) +* added simple positioning to anchor ([5006cc4](https://github.com/privateOmega/html-to-docx/commit/5006cc47d112360e51d8051f1ebff570e9f12779)) +* added table and cell border support ([985f6a1](https://github.com/privateOmega/html-to-docx/commit/985f6a1e7a2e52f3b0a609a00da8a11bf113ef16)) +* added table borders ([12864db](https://github.com/privateOmega/html-to-docx/commit/12864db468a08f4aca4d01cb8e8b6635aa09c57d)) +* added table cell border support ([852c091](https://github.com/privateOmega/html-to-docx/commit/852c091e15a3b2add7b622472be8fc021bb05c06)) +* added table header support ([592aa89](https://github.com/privateOmega/html-to-docx/commit/592aa893fa115a83bc1d056c98480dbe5cc872f9)) +* added table width support ([73b172b](https://github.com/privateOmega/html-to-docx/commit/73b172b584aaeb7137d58e0eb2d8b73c4bb92561)) +* added unit conversion utils ([d5b5a91](https://github.com/privateOmega/html-to-docx/commit/d5b5a915d215fb834cfe84996539ae663cc98914)) +* added unit conversions ([5890b18](https://github.com/privateOmega/html-to-docx/commit/5890b18833cc11f10c8ffc1e57d1dd9ffd46395d)) +* added unit conversions ([e6d546b](https://github.com/privateOmega/html-to-docx/commit/e6d546bca1a87182568d15bad99ac0af23ee55de)) +* added wrap elements ([c951688](https://github.com/privateOmega/html-to-docx/commit/c95168864c4929e2ab95c5a6a53d0919c76f8a83)) +* bold based on font-weight ([3f0376e](https://github.com/privateOmega/html-to-docx/commit/3f0376e0a1e267705117a2ec50c9f382286b2a60)) +* changed attribute field for picture name ([aef241d](https://github.com/privateOmega/html-to-docx/commit/aef241dc3d3d9adb732c429df9f0c2771b319680)) +* changed attribute used for name ([3885233](https://github.com/privateOmega/html-to-docx/commit/3885233bf14f9b7b16d48a2844d3e997e476a8ee)) +* changed default namespace of relationship to solve render issue ([56a3554](https://github.com/privateOmega/html-to-docx/commit/56a3554e7b2e9d85cedeece8d20acfebf23666ad)) +* changed file extension if octet stream is encountered ([32c5bf1](https://github.com/privateOmega/html-to-docx/commit/32c5bf1b5f7c5f8dc83a51fed142e932c7b008fd)) +* changed line spacing rule to work with inline images ([489f1c6](https://github.com/privateOmega/html-to-docx/commit/489f1c62fc093b108bc16aee33d74baad4ced7d8)) +* changed namespaces to original ecma 376 spec ([51be86e](https://github.com/privateOmega/html-to-docx/commit/51be86ecf0f4a78457840bf2a31579d217568208)) +* created seperate abstract numbering for each lists ([c723c74](https://github.com/privateOmega/html-to-docx/commit/c723c746a3feb2612e73dddac14f1c40864e9ad9)) +* fix table render issue due to grid width ([636d499](https://github.com/privateOmega/html-to-docx/commit/636d499bcee00195f7b5ca198c60bb3e0f7d2a69)) +* fixed abstract numbering id ([9814cb8](https://github.com/privateOmega/html-to-docx/commit/9814cb89582bc7e87cec638be37ee1cd326c6117)) +* fixed coloring and refactored other text formatting ([c288f80](https://github.com/privateOmega/html-to-docx/commit/c288f809ea6387c91356976a6dd81396cecafc46)) +* fixed document rels and numbering bug ([d6e3152](https://github.com/privateOmega/html-to-docx/commit/d6e3152081da7d2ab379a67bfda345964fa15c40)) +* fixed docx generation ([3d96acf](https://github.com/privateOmega/html-to-docx/commit/3d96acf511d82776510fac857af57d5cb9453f89)) +* fixed incorrect table row generation ([742dd18](https://github.com/privateOmega/html-to-docx/commit/742dd1882ce4c1a33ab51e10ee2a628b817eca31)) +* fixed internal mode and added extensions ([1266121](https://github.com/privateOmega/html-to-docx/commit/12661213e00c55f7068e93abb019ba80cd4f2d87)) +* fixed margin issues ([f841b76](https://github.com/privateOmega/html-to-docx/commit/f841b76caa944ea5eec206a3b3fce3e5a5eaf3e7)) +* fixed numbering and header issue due to wrong filename ([64a04bc](https://github.com/privateOmega/html-to-docx/commit/64a04bc192616162aa67c43f80734e7ebb9ff588)) +* fixed table and image rendering ([c153092](https://github.com/privateOmega/html-to-docx/commit/c1530924f93351ce63882bf0e6050b6315aa6017)) +* handled figure wrapper for images and tables ([4182a95](https://github.com/privateOmega/html-to-docx/commit/4182a9543aeb71fd8b0d2c7a2e08978a782de3e6)) +* handled horizontal alignment ([72478cb](https://github.com/privateOmega/html-to-docx/commit/72478cb2308ac029f9a8149c416012101d23c18c)) +* handled table width ([237ddfd](https://github.com/privateOmega/html-to-docx/commit/237ddfd6bff914e0379c6cbd940a7eac29d7aeaf)) +* handled vertical alignment ([b2b3bcc](https://github.com/privateOmega/html-to-docx/commit/b2b3bcc382dc645a3cdebe18d99558538bad6282)) +* handling multiple span children and multilevel formatting of text ([4c81f58](https://github.com/privateOmega/html-to-docx/commit/4c81f586400d1f227236a8b07d067331c0f02c5d)) +* handling nested formatting ([04f0d7e](https://github.com/privateOmega/html-to-docx/commit/04f0d7e822a57fc3ba98d3990e17b9153c54afc7)) +* modified example to use esm bundle ([491a83d](https://github.com/privateOmega/html-to-docx/commit/491a83d9b2c0deec13743817cdf32280d39bb9cd)) +* moved namespaces into separate file ([75cdf30](https://github.com/privateOmega/html-to-docx/commit/75cdf3033e69934b189a74d6c77eef08d50492aa)) +* namespace updated to 2016 standards ([6fc2ac2](https://github.com/privateOmega/html-to-docx/commit/6fc2ac2b6e904c4dd774b24e0ad119cccd873e0b)) +* preserve spacing on text ([f2f12b1](https://github.com/privateOmega/html-to-docx/commit/f2f12b1f4903aa7caf6bae5cad3b88d9aed46d18)) +* removed unwanted attribute ([f3caf44](https://github.com/privateOmega/html-to-docx/commit/f3caf44faf95ba8c6dee1f6f959300374e2b65ff)) +* renamed document rels schema file ([10c3fda](https://github.com/privateOmega/html-to-docx/commit/10c3fda9878847257b902d4c13c2d8dd36edd3f6)) +* renamed unit converters ([eee4487](https://github.com/privateOmega/html-to-docx/commit/eee44877cfee7228eb27b9efeb10b07a0e67ada9)) +* scaled down images ([72d7c44](https://github.com/privateOmega/html-to-docx/commit/72d7c448730a46499a1a5cab50c443a525967a54)) +* table cell border style support ([2c5a205](https://github.com/privateOmega/html-to-docx/commit/2c5a2055d33ee02f55a07e9c8ba985e2e07f2871)) +* table cell vertical align issue ([424d2c1](https://github.com/privateOmega/html-to-docx/commit/424d2c1177e1d335dbfa2b016d59cd50817e679a)) +* updated document abstraction to track generation ids ([c34810f](https://github.com/privateOmega/html-to-docx/commit/c34810f1373f934b0b3ecbe9da2838f41a68dcc9)) +* updated documentrels xml generation ([433e4b4](https://github.com/privateOmega/html-to-docx/commit/433e4b4eb9d71beede8feb1754363163ba5d1933)) +* updated numbering xml generation ([81b7a82](https://github.com/privateOmega/html-to-docx/commit/81b7a8296d1e3afa095f47007a66698852d29f95)) +* updated xml builder to use namespace and child nodes ([2e28b5e](https://github.com/privateOmega/html-to-docx/commit/2e28b5ec07241c10c4288412a6ced8023e8c03ce)) +* **template:** fixed document templating ([5f6a74f](https://github.com/privateOmega/html-to-docx/commit/5f6a74f9964348590fbb7f5baf88230c8c796766)) +* **template:** fixed numbering templating ([8b09691](https://github.com/privateOmega/html-to-docx/commit/8b096916284cbbe8452bb572d788caee23849084)) +* used image dimensions for extent fragment ([aa17f74](https://github.com/privateOmega/html-to-docx/commit/aa17f74d3a2fab51cfa730ce62c09c2862bad532)) +* **template:** removed word xml schema ([ee0e1ed](https://github.com/privateOmega/html-to-docx/commit/ee0e1ed7b0b00cbaf3644ad887175abac0282dcc)) +* wrapped drawing inside paragraph tag ([d0476b4](https://github.com/privateOmega/html-to-docx/commit/d0476b4211fe13f5918091a6a06e5021015a5db8)) + +### [1.1.13](https://github.com/privateOmega/html-to-docx/compare/v1.1.12...v1.1.13) (2020-06-12) + +### [1.1.12](https://github.com/privateOmega/html-to-docx/compare/v1.1.11...v1.1.12) (2020-06-12) + + +### Bug Fixes + +* handled horizontal alignment ([72478cb](https://github.com/privateOmega/html-to-docx/commit/72478cb2308ac029f9a8149c416012101d23c18c)) +* handled vertical alignment ([b2b3bcc](https://github.com/privateOmega/html-to-docx/commit/b2b3bcc382dc645a3cdebe18d99558538bad6282)) + +### [1.1.11](https://github.com/privateOmega/html-to-docx/compare/v1.1.10...v1.1.11) (2020-06-10) + + +### Bug Fixes + +* added table width support ([73b172b](https://github.com/privateOmega/html-to-docx/commit/73b172b584aaeb7137d58e0eb2d8b73c4bb92561)) + +### [1.1.10](https://github.com/privateOmega/html-to-docx/compare/v1.1.9...v1.1.10) (2020-06-10) + + +### Features + +* added b tag support ([f867abd](https://github.com/privateOmega/html-to-docx/commit/f867abd41c6bc85bbba207a27c58d441f1a2b532)) +* added em tag support ([6a06265](https://github.com/privateOmega/html-to-docx/commit/6a06265f724a611b50144cb988e576bc4e40b4d4)) +* added heading sizes ([bb18e72](https://github.com/privateOmega/html-to-docx/commit/bb18e724c42b0c4581722b2899d5ff808c1495c4)) +* added headings support ([fd489ee](https://github.com/privateOmega/html-to-docx/commit/fd489eeebfeedc7d05991f9366aeae2adc49fd6f)) +* added highlight support ([6159925](https://github.com/privateOmega/html-to-docx/commit/6159925495b74ab254cd7dc5628526d531595a92)) +* added ins tag support ([6d64908](https://github.com/privateOmega/html-to-docx/commit/6d64908858dac290aa34421c236bdaf2d8ef07a7)) +* added linebreak support ([57c054c](https://github.com/privateOmega/html-to-docx/commit/57c054cd65f49d7c4244272af0117f2c141a8bc7)) +* added strike through support ([b73e8c7](https://github.com/privateOmega/html-to-docx/commit/b73e8c76d0051bc6449ed57861b4ce1c7ad4b408)) +* added support for subscript and superscript ([f1ee4ed](https://github.com/privateOmega/html-to-docx/commit/f1ee4edf183a45731b48bba2b91154da591c203f)) + + +### Bug Fixes + +* added empty paragraph for spacing after table ([6bae787](https://github.com/privateOmega/html-to-docx/commit/6bae787cbf3f376b8ec34389f444d8c7c5f3b340)) +* added html string minifier ([8faa19c](https://github.com/privateOmega/html-to-docx/commit/8faa19c46ff85a31b16e89207cbc2120c6ed5805)) +* added image in table cell support ([7d98a16](https://github.com/privateOmega/html-to-docx/commit/7d98a16b1509b57910e8294cfb3985a88b7154ae)) +* added table and cell border support ([985f6a1](https://github.com/privateOmega/html-to-docx/commit/985f6a1e7a2e52f3b0a609a00da8a11bf113ef16)) +* added table cell border support ([852c091](https://github.com/privateOmega/html-to-docx/commit/852c091e15a3b2add7b622472be8fc021bb05c06)) +* changed line spacing rule to work with inline images ([489f1c6](https://github.com/privateOmega/html-to-docx/commit/489f1c62fc093b108bc16aee33d74baad4ced7d8)) +* preserve spacing on text ([f2f12b1](https://github.com/privateOmega/html-to-docx/commit/f2f12b1f4903aa7caf6bae5cad3b88d9aed46d18)) +* table cell border style support ([2c5a205](https://github.com/privateOmega/html-to-docx/commit/2c5a2055d33ee02f55a07e9c8ba985e2e07f2871)) +* used image dimensions for extent fragment ([aa17f74](https://github.com/privateOmega/html-to-docx/commit/aa17f74d3a2fab51cfa730ce62c09c2862bad532)) + +### [1.1.9](https://github.com/privateOmega/html-to-docx/compare/v1.1.8...v1.1.9) (2020-06-08) + + +### Features + +* added more unit converters ([8f78c52](https://github.com/privateOmega/html-to-docx/commit/8f78c5241cf33d471c8b08e3f941f401d6a50d7b)) +* added other measure units for margins and fonts ([1ae584a](https://github.com/privateOmega/html-to-docx/commit/1ae584a1b0a5350943e10c0d129402b843d7b9a2)) + + +### Bug Fixes + +* added colspan support for table cells ([bdf92f8](https://github.com/privateOmega/html-to-docx/commit/bdf92f8dbb10b4b58188364f3bdc5ff91e9cc982)) +* created seperate abstract numbering for each lists ([c723c74](https://github.com/privateOmega/html-to-docx/commit/c723c746a3feb2612e73dddac14f1c40864e9ad9)) +* renamed unit converters ([eee4487](https://github.com/privateOmega/html-to-docx/commit/eee44877cfee7228eb27b9efeb10b07a0e67ada9)) +* table cell vertical align issue ([424d2c1](https://github.com/privateOmega/html-to-docx/commit/424d2c1177e1d335dbfa2b016d59cd50817e679a)) + +### [1.1.8](https://github.com/privateOmega/html-to-docx/compare/v1.1.7...v1.1.8) (2020-06-05) + + +### Features + +* added font support in styles ([18b3281](https://github.com/privateOmega/html-to-docx/commit/18b3281ac3f91e5c1905efa0487354ff78badec2)) +* added font table ([0903d6b](https://github.com/privateOmega/html-to-docx/commit/0903d6b98fae6dc378cdeafdadd80a86501c9959)) + + +### Bug Fixes + +* 3 digit hex color code support ([255fe82](https://github.com/privateOmega/html-to-docx/commit/255fe82fc47e2a447c795c346ae7c6634ae442d1)) + +### [1.1.7](https://github.com/privateOmega/html-to-docx/compare/v1.1.6...v1.1.7) (2020-06-04) + + +### Features + +* added table row height support ([031c3aa](https://github.com/privateOmega/html-to-docx/commit/031c3aa963e5a7b2ee985ae8ac6ff612c89ae974)) + + +### Bug Fixes + +* added table header support ([592aa89](https://github.com/privateOmega/html-to-docx/commit/592aa893fa115a83bc1d056c98480dbe5cc872f9)) + +### 1.1.6 (2020-06-04) + + +### Features + +* **packaging:** added jszip for packaging ([89619ec](https://github.com/privateOmega/html-to-docx/commit/89619ec702564fb9c5eccaee55e65d366fcbacad)) +* **packaging:** added method to create container ([9808cf2](https://github.com/privateOmega/html-to-docx/commit/9808cf211bbb50cf3d7cbe122d01c82d4272e888)) +* added xml builder methods for images ([f413ad8](https://github.com/privateOmega/html-to-docx/commit/f413ad89b263c63a8fb9890b44b1b219a7413c4b)) +* **template:** added base docx template ([abdb87b](https://github.com/privateOmega/html-to-docx/commit/abdb87bdfead91890f9d54e2cedd038e916b6dce)) +* abstracted conversion using docxDocument class ([c625a01](https://github.com/privateOmega/html-to-docx/commit/c625a0181a6c328c0319b579fa1173192dff1187)) +* added builder methods for images ([9e2720f](https://github.com/privateOmega/html-to-docx/commit/9e2720f261a46701c8a2581aadafa9b60e6cee6b)) +* added css color string ([cb0db2f](https://github.com/privateOmega/html-to-docx/commit/cb0db2ff2d3f2f66df823dbafbc5603030241bc3)) +* added document file render helper ([6dd9c3a](https://github.com/privateOmega/html-to-docx/commit/6dd9c3a01f5fceab78404d8ebddb848fb91c933c)) +* added escape-html ([1a231d5](https://github.com/privateOmega/html-to-docx/commit/1a231d5dde3e6f9b5a23f248e19063191c07e54f)) +* added font size support ([0f27c60](https://github.com/privateOmega/html-to-docx/commit/0f27c609baa5b9488bc195dff1c060bcc04bbf2d)) +* added header generation ([25fb44f](https://github.com/privateOmega/html-to-docx/commit/25fb44f945df3fdc5f37d619b3de3ebe68b84cd6)) +* added horizontal text alignment ([d29669f](https://github.com/privateOmega/html-to-docx/commit/d29669ffdb0d63b7bdbbe09c6bca990e4c28cfb8)) +* added hsl conversion support ([153fa43](https://github.com/privateOmega/html-to-docx/commit/153fa43f84c640085f45823bc2054b24c28023d0)) +* added hyperlinks support ([3560ce9](https://github.com/privateOmega/html-to-docx/commit/3560ce9f23fa8f590aa340302bf0059c8dfb6d5f)) +* added line height support ([3d0ea2f](https://github.com/privateOmega/html-to-docx/commit/3d0ea2fe56d13893e3c5cd0e4a35e7b26b7c1d0a)) +* added method to archive images with other files ([b6da74b](https://github.com/privateOmega/html-to-docx/commit/b6da74be10be03d689ca044f3f95dd724a3a29b6)) +* added more xml builder methods ([ffc584b](https://github.com/privateOmega/html-to-docx/commit/ffc584bed7ab434431999517a3308483ba99489a)) +* added more xml statment builder methods ([337e530](https://github.com/privateOmega/html-to-docx/commit/337e5305aa8768b6507323bec2279d557a35b67b)) +* added support for span font sizing ([98b4844](https://github.com/privateOmega/html-to-docx/commit/98b4844858f967bd5a3932262d0b535cd53d499d)) +* added text formatting to paragraph ([bacd888](https://github.com/privateOmega/html-to-docx/commit/bacd888253a35a18ac7ea4e9141d4a4fb60e3cf7)) +* added valign to table cell element ([20e94f1](https://github.com/privateOmega/html-to-docx/commit/20e94f18370e8a92034f6d35f5e744ceb57ed774)) +* added vdom to xml method ([8b5a618](https://github.com/privateOmega/html-to-docx/commit/8b5a6185e6e211b0e07b9f1c1b7e23fb4b13dc9c)) +* added virtual-dom and html-to-vdom ([feaa396](https://github.com/privateOmega/html-to-docx/commit/feaa396162465276d19b7d3d5c51a533987a1738)) +* added xbuilder ([f13b5cc](https://github.com/privateOmega/html-to-docx/commit/f13b5cc06d29ae53493f1f4b8fdef6e8986e64e6)) +* added xml statement builder helper ([5e23c16](https://github.com/privateOmega/html-to-docx/commit/5e23c1636eb3c64f52589f1ac71a48dec3df65c2)) +* enabling header on flag ([516463c](https://github.com/privateOmega/html-to-docx/commit/516463cd532e58895faa8dd465b7e725f0de59e3)) +* handle line breaks ([164c0f5](https://github.com/privateOmega/html-to-docx/commit/164c0f5e17f62e3f30da25be6e181d3414ca4dde)) +* styling table color ([2b44bff](https://github.com/privateOmega/html-to-docx/commit/2b44bff7dee0dad0de75f3c3b2403278c19e3a4b)) +* **template:** added numbering schema ([d179d73](https://github.com/privateOmega/html-to-docx/commit/d179d736e6e63ed42104a231ca0489430faae00a)) +* **template:** added styles schema ([d83d230](https://github.com/privateOmega/html-to-docx/commit/d83d230a66807f6ad08ebb4a6c0c5299c311aaf5)) +* **template:** added XML schemas ([42232da](https://github.com/privateOmega/html-to-docx/commit/42232da9d63ed404367703e56b1c65cdb8a23782)) + + +### Bug Fixes + +* added attributes to anchor drawing ([62e4a29](https://github.com/privateOmega/html-to-docx/commit/62e4a29ef664257d8f0364d5d97f056a62f0fb61)) +* added default options ([4590800](https://github.com/privateOmega/html-to-docx/commit/459080010f92ce7464f4815585088a46ce8e759d)) +* added effectextent and srcrect fragment ([5f5e975](https://github.com/privateOmega/html-to-docx/commit/5f5e975b135eb38c48e18a09da590b363166d74e)) +* added extent fragment ([7ce81f2](https://github.com/privateOmega/html-to-docx/commit/7ce81f27e4c493bb9bf7d368a415f34cb0678e4c)) +* added header override in content-types xml ([5de681b](https://github.com/privateOmega/html-to-docx/commit/5de681be9295754eff648cea504e07bf9a6f6d09)) +* added image conversion handler ([f726e71](https://github.com/privateOmega/html-to-docx/commit/f726e71ee2504bc254794ad09eaf5d67a8901b9a)) +* added inline attributes ([0a4d2ce](https://github.com/privateOmega/html-to-docx/commit/0a4d2ce4b4c64952c3866928e6355b7c891ac044)) +* added italics, underline and bold in runproperties ([34c2e18](https://github.com/privateOmega/html-to-docx/commit/34c2e18123c8a6a956209951afebc0dce2ab6cfc)) +* added more namespaces ([68636b4](https://github.com/privateOmega/html-to-docx/commit/68636b4c7cc73bf9e0de75b7bf97ac9afb4fb6f9)) +* added namespace aliases to header and numbering xmls ([d0b4101](https://github.com/privateOmega/html-to-docx/commit/d0b4101017a6dabd0fa18e23228bd4af338129eb)) +* added numbering and styles relationship ([c7e29af](https://github.com/privateOmega/html-to-docx/commit/c7e29af7414ce71515c46861942342d4f397222b)) +* added other namespaces to the xml root ([afbbca9](https://github.com/privateOmega/html-to-docx/commit/afbbca9dbf723afc857034ce7770bc8f0840c0e4)) +* added override for relationship ([30acddc](https://github.com/privateOmega/html-to-docx/commit/30acddc84d40dc6c66ed9539618b94adeeb2fc85)) +* added override for settings and websettings ([977af04](https://github.com/privateOmega/html-to-docx/commit/977af04f48c19f2b3162cf6e61782cf63e7162e8)) +* added overrides for relationships ([22b9cac](https://github.com/privateOmega/html-to-docx/commit/22b9cac2fa788b9654262e450774c588180a18de)) +* added padding between image and wrapping text ([e45fbf5](https://github.com/privateOmega/html-to-docx/commit/e45fbf553c19071023634b692e3c4b0fab04aedf)) +* added positioning fragments ([e6f7e1c](https://github.com/privateOmega/html-to-docx/commit/e6f7e1c3679aa813a2818725548dfb5ebb0d9bd7)) +* added required attributes to anchor fragment ([d01c9f9](https://github.com/privateOmega/html-to-docx/commit/d01c9f915a929de201218af127103da627aaa4a1)) +* added settings and websettings relation ([34aeedc](https://github.com/privateOmega/html-to-docx/commit/34aeedce6d0dd02822062762f9b077bb146b09b9)) +* added settings and websettings to ooxml package ([6c829b5](https://github.com/privateOmega/html-to-docx/commit/6c829b5ec4596ba0b5d41fae9ba2bfd68fdf7230)) +* added simple positioning to anchor ([5006cc4](https://github.com/privateOmega/html-to-docx/commit/5006cc47d112360e51d8051f1ebff570e9f12779)) +* added table borders ([12864db](https://github.com/privateOmega/html-to-docx/commit/12864db468a08f4aca4d01cb8e8b6635aa09c57d)) +* added unit conversion utils ([d5b5a91](https://github.com/privateOmega/html-to-docx/commit/d5b5a915d215fb834cfe84996539ae663cc98914)) +* added unit conversions ([5890b18](https://github.com/privateOmega/html-to-docx/commit/5890b18833cc11f10c8ffc1e57d1dd9ffd46395d)) +* added unit conversions ([e6d546b](https://github.com/privateOmega/html-to-docx/commit/e6d546bca1a87182568d15bad99ac0af23ee55de)) +* added wrap elements ([c951688](https://github.com/privateOmega/html-to-docx/commit/c95168864c4929e2ab95c5a6a53d0919c76f8a83)) +* bold based on font-weight ([3f0376e](https://github.com/privateOmega/html-to-docx/commit/3f0376e0a1e267705117a2ec50c9f382286b2a60)) +* changed attribute field for picture name ([aef241d](https://github.com/privateOmega/html-to-docx/commit/aef241dc3d3d9adb732c429df9f0c2771b319680)) +* changed attribute used for name ([3885233](https://github.com/privateOmega/html-to-docx/commit/3885233bf14f9b7b16d48a2844d3e997e476a8ee)) +* changed default namespace of relationship to solve render issue ([56a3554](https://github.com/privateOmega/html-to-docx/commit/56a3554e7b2e9d85cedeece8d20acfebf23666ad)) +* changed file extension if octet stream is encountered ([32c5bf1](https://github.com/privateOmega/html-to-docx/commit/32c5bf1b5f7c5f8dc83a51fed142e932c7b008fd)) +* changed namespaces to original ecma 376 spec ([51be86e](https://github.com/privateOmega/html-to-docx/commit/51be86ecf0f4a78457840bf2a31579d217568208)) +* fix table render issue due to grid width ([636d499](https://github.com/privateOmega/html-to-docx/commit/636d499bcee00195f7b5ca198c60bb3e0f7d2a69)) +* fixed abstract numbering id ([9814cb8](https://github.com/privateOmega/html-to-docx/commit/9814cb89582bc7e87cec638be37ee1cd326c6117)) +* fixed coloring and refactored other text formatting ([c288f80](https://github.com/privateOmega/html-to-docx/commit/c288f809ea6387c91356976a6dd81396cecafc46)) +* fixed document rels and numbering bug ([d6e3152](https://github.com/privateOmega/html-to-docx/commit/d6e3152081da7d2ab379a67bfda345964fa15c40)) +* fixed docx generation ([3d96acf](https://github.com/privateOmega/html-to-docx/commit/3d96acf511d82776510fac857af57d5cb9453f89)) +* fixed incorrect table row generation ([742dd18](https://github.com/privateOmega/html-to-docx/commit/742dd1882ce4c1a33ab51e10ee2a628b817eca31)) +* fixed internal mode and added extensions ([1266121](https://github.com/privateOmega/html-to-docx/commit/12661213e00c55f7068e93abb019ba80cd4f2d87)) +* fixed margin issues ([f841b76](https://github.com/privateOmega/html-to-docx/commit/f841b76caa944ea5eec206a3b3fce3e5a5eaf3e7)) +* fixed numbering and header issue due to wrong filename ([64a04bc](https://github.com/privateOmega/html-to-docx/commit/64a04bc192616162aa67c43f80734e7ebb9ff588)) +* fixed table and image rendering ([c153092](https://github.com/privateOmega/html-to-docx/commit/c1530924f93351ce63882bf0e6050b6315aa6017)) +* handled figure wrapper for images and tables ([4182a95](https://github.com/privateOmega/html-to-docx/commit/4182a9543aeb71fd8b0d2c7a2e08978a782de3e6)) +* handled table width ([237ddfd](https://github.com/privateOmega/html-to-docx/commit/237ddfd6bff914e0379c6cbd940a7eac29d7aeaf)) +* handling multiple span children and multilevel formatting of text ([4c81f58](https://github.com/privateOmega/html-to-docx/commit/4c81f586400d1f227236a8b07d067331c0f02c5d)) +* handling nested formatting ([04f0d7e](https://github.com/privateOmega/html-to-docx/commit/04f0d7e822a57fc3ba98d3990e17b9153c54afc7)) +* modified example to use esm bundle ([491a83d](https://github.com/privateOmega/html-to-docx/commit/491a83d9b2c0deec13743817cdf32280d39bb9cd)) +* moved namespaces into separate file ([75cdf30](https://github.com/privateOmega/html-to-docx/commit/75cdf3033e69934b189a74d6c77eef08d50492aa)) +* namespace updated to 2016 standards ([6fc2ac2](https://github.com/privateOmega/html-to-docx/commit/6fc2ac2b6e904c4dd774b24e0ad119cccd873e0b)) +* removed unwanted attribute ([f3caf44](https://github.com/privateOmega/html-to-docx/commit/f3caf44faf95ba8c6dee1f6f959300374e2b65ff)) +* renamed document rels schema file ([10c3fda](https://github.com/privateOmega/html-to-docx/commit/10c3fda9878847257b902d4c13c2d8dd36edd3f6)) +* scaled down images ([72d7c44](https://github.com/privateOmega/html-to-docx/commit/72d7c448730a46499a1a5cab50c443a525967a54)) +* updated document abstraction to track generation ids ([c34810f](https://github.com/privateOmega/html-to-docx/commit/c34810f1373f934b0b3ecbe9da2838f41a68dcc9)) +* updated documentrels xml generation ([433e4b4](https://github.com/privateOmega/html-to-docx/commit/433e4b4eb9d71beede8feb1754363163ba5d1933)) +* updated numbering xml generation ([81b7a82](https://github.com/privateOmega/html-to-docx/commit/81b7a8296d1e3afa095f47007a66698852d29f95)) +* updated xml builder to use namespace and child nodes ([2e28b5e](https://github.com/privateOmega/html-to-docx/commit/2e28b5ec07241c10c4288412a6ced8023e8c03ce)) +* **template:** fixed document templating ([5f6a74f](https://github.com/privateOmega/html-to-docx/commit/5f6a74f9964348590fbb7f5baf88230c8c796766)) +* **template:** fixed numbering templating ([8b09691](https://github.com/privateOmega/html-to-docx/commit/8b096916284cbbe8452bb572d788caee23849084)) +* wrapped drawing inside paragraph tag ([d0476b4](https://github.com/privateOmega/html-to-docx/commit/d0476b4211fe13f5918091a6a06e5021015a5db8)) +* **template:** removed word xml schema ([ee0e1ed](https://github.com/privateOmega/html-to-docx/commit/ee0e1ed7b0b00cbaf3644ad887175abac0282dcc)) + +### [1.1.5](https://github.com/privateOmega/html-to-docx/compare/v1.1.4...v1.1.5) (2020-06-03) + +### [1.1.4](https://github.com/privateOmega/html-to-docx/compare/v1.1.3...v1.1.4) (2020-06-03) + + +### Features + +* added css color string ([cb0db2f](https://github.com/privateOmega/html-to-docx/commit/cb0db2ff2d3f2f66df823dbafbc5603030241bc3)) +* added horizontal text alignment ([d29669f](https://github.com/privateOmega/html-to-docx/commit/d29669ffdb0d63b7bdbbe09c6bca990e4c28cfb8)) + + +### Bug Fixes + +* bold based on font-weight ([3f0376e](https://github.com/privateOmega/html-to-docx/commit/3f0376e0a1e267705117a2ec50c9f382286b2a60)) +* handling nested formatting ([04f0d7e](https://github.com/privateOmega/html-to-docx/commit/04f0d7e822a57fc3ba98d3990e17b9153c54afc7)) + +### 1.1.3 (2020-06-03) + + +### Features + +* **packaging:** added jszip for packaging ([89619ec](https://github.com/privateOmega/html-to-docx/commit/89619ec702564fb9c5eccaee55e65d366fcbacad)) +* **packaging:** added method to create container ([9808cf2](https://github.com/privateOmega/html-to-docx/commit/9808cf211bbb50cf3d7cbe122d01c82d4272e888)) +* added escape-html ([1a231d5](https://github.com/privateOmega/html-to-docx/commit/1a231d5dde3e6f9b5a23f248e19063191c07e54f)) +* **template:** added base docx template ([abdb87b](https://github.com/privateOmega/html-to-docx/commit/abdb87bdfead91890f9d54e2cedd038e916b6dce)) +* abstracted conversion using docxDocument class ([c625a01](https://github.com/privateOmega/html-to-docx/commit/c625a0181a6c328c0319b579fa1173192dff1187)) +* added builder methods for images ([9e2720f](https://github.com/privateOmega/html-to-docx/commit/9e2720f261a46701c8a2581aadafa9b60e6cee6b)) +* added document file render helper ([6dd9c3a](https://github.com/privateOmega/html-to-docx/commit/6dd9c3a01f5fceab78404d8ebddb848fb91c933c)) +* added header generation ([25fb44f](https://github.com/privateOmega/html-to-docx/commit/25fb44f945df3fdc5f37d619b3de3ebe68b84cd6)) +* added hsl conversion support ([153fa43](https://github.com/privateOmega/html-to-docx/commit/153fa43f84c640085f45823bc2054b24c28023d0)) +* **template:** added styles schema ([d83d230](https://github.com/privateOmega/html-to-docx/commit/d83d230a66807f6ad08ebb4a6c0c5299c311aaf5)) +* added hyperlinks support ([3560ce9](https://github.com/privateOmega/html-to-docx/commit/3560ce9f23fa8f590aa340302bf0059c8dfb6d5f)) +* added method to archive images with other files ([b6da74b](https://github.com/privateOmega/html-to-docx/commit/b6da74be10be03d689ca044f3f95dd724a3a29b6)) +* added more xml builder methods ([ffc584b](https://github.com/privateOmega/html-to-docx/commit/ffc584bed7ab434431999517a3308483ba99489a)) +* added more xml statment builder methods ([337e530](https://github.com/privateOmega/html-to-docx/commit/337e5305aa8768b6507323bec2279d557a35b67b)) +* added text formatting to paragraph ([bacd888](https://github.com/privateOmega/html-to-docx/commit/bacd888253a35a18ac7ea4e9141d4a4fb60e3cf7)) +* added valign to table cell element ([20e94f1](https://github.com/privateOmega/html-to-docx/commit/20e94f18370e8a92034f6d35f5e744ceb57ed774)) +* added vdom to xml method ([8b5a618](https://github.com/privateOmega/html-to-docx/commit/8b5a6185e6e211b0e07b9f1c1b7e23fb4b13dc9c)) +* added virtual-dom and html-to-vdom ([feaa396](https://github.com/privateOmega/html-to-docx/commit/feaa396162465276d19b7d3d5c51a533987a1738)) +* added xbuilder ([f13b5cc](https://github.com/privateOmega/html-to-docx/commit/f13b5cc06d29ae53493f1f4b8fdef6e8986e64e6)) +* added xml builder methods for images ([f413ad8](https://github.com/privateOmega/html-to-docx/commit/f413ad89b263c63a8fb9890b44b1b219a7413c4b)) +* added xml statement builder helper ([5e23c16](https://github.com/privateOmega/html-to-docx/commit/5e23c1636eb3c64f52589f1ac71a48dec3df65c2)) +* enabling header on flag ([516463c](https://github.com/privateOmega/html-to-docx/commit/516463cd532e58895faa8dd465b7e725f0de59e3)) +* handle line breaks ([164c0f5](https://github.com/privateOmega/html-to-docx/commit/164c0f5e17f62e3f30da25be6e181d3414ca4dde)) +* styling table color ([2b44bff](https://github.com/privateOmega/html-to-docx/commit/2b44bff7dee0dad0de75f3c3b2403278c19e3a4b)) +* **template:** added numbering schema ([d179d73](https://github.com/privateOmega/html-to-docx/commit/d179d736e6e63ed42104a231ca0489430faae00a)) +* **template:** added XML schemas ([42232da](https://github.com/privateOmega/html-to-docx/commit/42232da9d63ed404367703e56b1c65cdb8a23782)) + + +### Bug Fixes + +* added attributes to anchor drawing ([62e4a29](https://github.com/privateOmega/html-to-docx/commit/62e4a29ef664257d8f0364d5d97f056a62f0fb61)) +* added default options ([4590800](https://github.com/privateOmega/html-to-docx/commit/459080010f92ce7464f4815585088a46ce8e759d)) +* added effectextent and srcrect fragment ([5f5e975](https://github.com/privateOmega/html-to-docx/commit/5f5e975b135eb38c48e18a09da590b363166d74e)) +* added extent fragment ([7ce81f2](https://github.com/privateOmega/html-to-docx/commit/7ce81f27e4c493bb9bf7d368a415f34cb0678e4c)) +* added header override in content-types xml ([5de681b](https://github.com/privateOmega/html-to-docx/commit/5de681be9295754eff648cea504e07bf9a6f6d09)) +* added image conversion handler ([f726e71](https://github.com/privateOmega/html-to-docx/commit/f726e71ee2504bc254794ad09eaf5d67a8901b9a)) +* added inline attributes ([0a4d2ce](https://github.com/privateOmega/html-to-docx/commit/0a4d2ce4b4c64952c3866928e6355b7c891ac044)) +* added italics, underline and bold in runproperties ([34c2e18](https://github.com/privateOmega/html-to-docx/commit/34c2e18123c8a6a956209951afebc0dce2ab6cfc)) +* added more namespaces ([68636b4](https://github.com/privateOmega/html-to-docx/commit/68636b4c7cc73bf9e0de75b7bf97ac9afb4fb6f9)) +* added namespace aliases to header and numbering xmls ([d0b4101](https://github.com/privateOmega/html-to-docx/commit/d0b4101017a6dabd0fa18e23228bd4af338129eb)) +* added numbering and styles relationship ([c7e29af](https://github.com/privateOmega/html-to-docx/commit/c7e29af7414ce71515c46861942342d4f397222b)) +* added other namespaces to the xml root ([afbbca9](https://github.com/privateOmega/html-to-docx/commit/afbbca9dbf723afc857034ce7770bc8f0840c0e4)) +* added override for relationship ([30acddc](https://github.com/privateOmega/html-to-docx/commit/30acddc84d40dc6c66ed9539618b94adeeb2fc85)) +* added override for settings and websettings ([977af04](https://github.com/privateOmega/html-to-docx/commit/977af04f48c19f2b3162cf6e61782cf63e7162e8)) +* added overrides for relationships ([22b9cac](https://github.com/privateOmega/html-to-docx/commit/22b9cac2fa788b9654262e450774c588180a18de)) +* added padding between image and wrapping text ([e45fbf5](https://github.com/privateOmega/html-to-docx/commit/e45fbf553c19071023634b692e3c4b0fab04aedf)) +* added positioning fragments ([e6f7e1c](https://github.com/privateOmega/html-to-docx/commit/e6f7e1c3679aa813a2818725548dfb5ebb0d9bd7)) +* added required attributes to anchor fragment ([d01c9f9](https://github.com/privateOmega/html-to-docx/commit/d01c9f915a929de201218af127103da627aaa4a1)) +* changed namespaces to original ecma 376 spec ([51be86e](https://github.com/privateOmega/html-to-docx/commit/51be86ecf0f4a78457840bf2a31579d217568208)) +* **template:** removed word xml schema ([ee0e1ed](https://github.com/privateOmega/html-to-docx/commit/ee0e1ed7b0b00cbaf3644ad887175abac0282dcc)) +* added settings and websettings relation ([34aeedc](https://github.com/privateOmega/html-to-docx/commit/34aeedce6d0dd02822062762f9b077bb146b09b9)) +* added settings and websettings to ooxml package ([6c829b5](https://github.com/privateOmega/html-to-docx/commit/6c829b5ec4596ba0b5d41fae9ba2bfd68fdf7230)) +* added simple positioning to anchor ([5006cc4](https://github.com/privateOmega/html-to-docx/commit/5006cc47d112360e51d8051f1ebff570e9f12779)) +* added table borders ([12864db](https://github.com/privateOmega/html-to-docx/commit/12864db468a08f4aca4d01cb8e8b6635aa09c57d)) +* added unit conversion utils ([d5b5a91](https://github.com/privateOmega/html-to-docx/commit/d5b5a915d215fb834cfe84996539ae663cc98914)) +* added wrap elements ([c951688](https://github.com/privateOmega/html-to-docx/commit/c95168864c4929e2ab95c5a6a53d0919c76f8a83)) +* changed attribute field for picture name ([aef241d](https://github.com/privateOmega/html-to-docx/commit/aef241dc3d3d9adb732c429df9f0c2771b319680)) +* changed attribute used for name ([3885233](https://github.com/privateOmega/html-to-docx/commit/3885233bf14f9b7b16d48a2844d3e997e476a8ee)) +* changed default namespace of relationship to solve render issue ([56a3554](https://github.com/privateOmega/html-to-docx/commit/56a3554e7b2e9d85cedeece8d20acfebf23666ad)) +* changed file extension if octet stream is encountered ([32c5bf1](https://github.com/privateOmega/html-to-docx/commit/32c5bf1b5f7c5f8dc83a51fed142e932c7b008fd)) +* fix table render issue due to grid width ([636d499](https://github.com/privateOmega/html-to-docx/commit/636d499bcee00195f7b5ca198c60bb3e0f7d2a69)) +* fixed abstract numbering id ([9814cb8](https://github.com/privateOmega/html-to-docx/commit/9814cb89582bc7e87cec638be37ee1cd326c6117)) +* fixed coloring and refactored other text formatting ([c288f80](https://github.com/privateOmega/html-to-docx/commit/c288f809ea6387c91356976a6dd81396cecafc46)) +* fixed document rels and numbering bug ([d6e3152](https://github.com/privateOmega/html-to-docx/commit/d6e3152081da7d2ab379a67bfda345964fa15c40)) +* fixed docx generation ([3d96acf](https://github.com/privateOmega/html-to-docx/commit/3d96acf511d82776510fac857af57d5cb9453f89)) +* fixed incorrect table row generation ([742dd18](https://github.com/privateOmega/html-to-docx/commit/742dd1882ce4c1a33ab51e10ee2a628b817eca31)) +* fixed internal mode and added extensions ([1266121](https://github.com/privateOmega/html-to-docx/commit/12661213e00c55f7068e93abb019ba80cd4f2d87)) +* fixed margin issues ([f841b76](https://github.com/privateOmega/html-to-docx/commit/f841b76caa944ea5eec206a3b3fce3e5a5eaf3e7)) +* fixed numbering and header issue due to wrong filename ([64a04bc](https://github.com/privateOmega/html-to-docx/commit/64a04bc192616162aa67c43f80734e7ebb9ff588)) +* fixed table and image rendering ([c153092](https://github.com/privateOmega/html-to-docx/commit/c1530924f93351ce63882bf0e6050b6315aa6017)) +* handled figure wrapper for images and tables ([4182a95](https://github.com/privateOmega/html-to-docx/commit/4182a9543aeb71fd8b0d2c7a2e08978a782de3e6)) +* handled table width ([237ddfd](https://github.com/privateOmega/html-to-docx/commit/237ddfd6bff914e0379c6cbd940a7eac29d7aeaf)) +* handling multiple span children and multilevel formatting of text ([4c81f58](https://github.com/privateOmega/html-to-docx/commit/4c81f586400d1f227236a8b07d067331c0f02c5d)) +* modified example to use esm bundle ([491a83d](https://github.com/privateOmega/html-to-docx/commit/491a83d9b2c0deec13743817cdf32280d39bb9cd)) +* moved namespaces into separate file ([75cdf30](https://github.com/privateOmega/html-to-docx/commit/75cdf3033e69934b189a74d6c77eef08d50492aa)) +* namespace updated to 2016 standards ([6fc2ac2](https://github.com/privateOmega/html-to-docx/commit/6fc2ac2b6e904c4dd774b24e0ad119cccd873e0b)) +* removed unwanted attribute ([f3caf44](https://github.com/privateOmega/html-to-docx/commit/f3caf44faf95ba8c6dee1f6f959300374e2b65ff)) +* renamed document rels schema file ([10c3fda](https://github.com/privateOmega/html-to-docx/commit/10c3fda9878847257b902d4c13c2d8dd36edd3f6)) +* scaled down images ([72d7c44](https://github.com/privateOmega/html-to-docx/commit/72d7c448730a46499a1a5cab50c443a525967a54)) +* updated document abstraction to track generation ids ([c34810f](https://github.com/privateOmega/html-to-docx/commit/c34810f1373f934b0b3ecbe9da2838f41a68dcc9)) +* updated documentrels xml generation ([433e4b4](https://github.com/privateOmega/html-to-docx/commit/433e4b4eb9d71beede8feb1754363163ba5d1933)) +* updated numbering xml generation ([81b7a82](https://github.com/privateOmega/html-to-docx/commit/81b7a8296d1e3afa095f47007a66698852d29f95)) +* updated xml builder to use namespace and child nodes ([2e28b5e](https://github.com/privateOmega/html-to-docx/commit/2e28b5ec07241c10c4288412a6ced8023e8c03ce)) +* **template:** fixed document templating ([5f6a74f](https://github.com/privateOmega/html-to-docx/commit/5f6a74f9964348590fbb7f5baf88230c8c796766)) +* **template:** fixed numbering templating ([8b09691](https://github.com/privateOmega/html-to-docx/commit/8b096916284cbbe8452bb572d788caee23849084)) +* wrapped drawing inside paragraph tag ([d0476b4](https://github.com/privateOmega/html-to-docx/commit/d0476b4211fe13f5918091a6a06e5021015a5db8)) + +### 1.1.2 (2020-05-29) + + +### Features + +* **packaging:** added jszip for packaging ([89619ec](https://github.com/privateOmega/html-to-docx/commit/89619ec702564fb9c5eccaee55e65d366fcbacad)) +* **packaging:** added method to create container ([9808cf2](https://github.com/privateOmega/html-to-docx/commit/9808cf211bbb50cf3d7cbe122d01c82d4272e888)) +* abstracted conversion using docxDocument class ([c625a01](https://github.com/privateOmega/html-to-docx/commit/c625a0181a6c328c0319b579fa1173192dff1187)) +* **template:** added base docx template ([abdb87b](https://github.com/privateOmega/html-to-docx/commit/abdb87bdfead91890f9d54e2cedd038e916b6dce)) +* added builder methods for images ([9e2720f](https://github.com/privateOmega/html-to-docx/commit/9e2720f261a46701c8a2581aadafa9b60e6cee6b)) +* added document file render helper ([6dd9c3a](https://github.com/privateOmega/html-to-docx/commit/6dd9c3a01f5fceab78404d8ebddb848fb91c933c)) +* added escape-html ([1a231d5](https://github.com/privateOmega/html-to-docx/commit/1a231d5dde3e6f9b5a23f248e19063191c07e54f)) +* added header generation ([25fb44f](https://github.com/privateOmega/html-to-docx/commit/25fb44f945df3fdc5f37d619b3de3ebe68b84cd6)) +* added hyperlinks support ([3560ce9](https://github.com/privateOmega/html-to-docx/commit/3560ce9f23fa8f590aa340302bf0059c8dfb6d5f)) +* added method to archive images with other files ([b6da74b](https://github.com/privateOmega/html-to-docx/commit/b6da74be10be03d689ca044f3f95dd724a3a29b6)) +* added more xml builder methods ([ffc584b](https://github.com/privateOmega/html-to-docx/commit/ffc584bed7ab434431999517a3308483ba99489a)) +* added more xml statment builder methods ([337e530](https://github.com/privateOmega/html-to-docx/commit/337e5305aa8768b6507323bec2279d557a35b67b)) +* added text formatting to paragraph ([bacd888](https://github.com/privateOmega/html-to-docx/commit/bacd888253a35a18ac7ea4e9141d4a4fb60e3cf7)) +* added vdom to xml method ([8b5a618](https://github.com/privateOmega/html-to-docx/commit/8b5a6185e6e211b0e07b9f1c1b7e23fb4b13dc9c)) +* added virtual-dom and html-to-vdom ([feaa396](https://github.com/privateOmega/html-to-docx/commit/feaa396162465276d19b7d3d5c51a533987a1738)) +* added xbuilder ([f13b5cc](https://github.com/privateOmega/html-to-docx/commit/f13b5cc06d29ae53493f1f4b8fdef6e8986e64e6)) +* added xml builder methods for images ([f413ad8](https://github.com/privateOmega/html-to-docx/commit/f413ad89b263c63a8fb9890b44b1b219a7413c4b)) +* added xml statement builder helper ([5e23c16](https://github.com/privateOmega/html-to-docx/commit/5e23c1636eb3c64f52589f1ac71a48dec3df65c2)) +* enabling header on flag ([516463c](https://github.com/privateOmega/html-to-docx/commit/516463cd532e58895faa8dd465b7e725f0de59e3)) +* handle line breaks ([164c0f5](https://github.com/privateOmega/html-to-docx/commit/164c0f5e17f62e3f30da25be6e181d3414ca4dde)) +* **template:** added numbering schema ([d179d73](https://github.com/privateOmega/html-to-docx/commit/d179d736e6e63ed42104a231ca0489430faae00a)) +* **template:** added styles schema ([d83d230](https://github.com/privateOmega/html-to-docx/commit/d83d230a66807f6ad08ebb4a6c0c5299c311aaf5)) +* **template:** added XML schemas ([42232da](https://github.com/privateOmega/html-to-docx/commit/42232da9d63ed404367703e56b1c65cdb8a23782)) + + +### Bug Fixes + +* added attributes to anchor drawing ([62e4a29](https://github.com/privateOmega/html-to-docx/commit/62e4a29ef664257d8f0364d5d97f056a62f0fb61)) +* added default options ([4590800](https://github.com/privateOmega/html-to-docx/commit/459080010f92ce7464f4815585088a46ce8e759d)) +* added effectextent and srcrect fragment ([5f5e975](https://github.com/privateOmega/html-to-docx/commit/5f5e975b135eb38c48e18a09da590b363166d74e)) +* added extent fragment ([7ce81f2](https://github.com/privateOmega/html-to-docx/commit/7ce81f27e4c493bb9bf7d368a415f34cb0678e4c)) +* added header override in content-types xml ([5de681b](https://github.com/privateOmega/html-to-docx/commit/5de681be9295754eff648cea504e07bf9a6f6d09)) +* added image conversion handler ([f726e71](https://github.com/privateOmega/html-to-docx/commit/f726e71ee2504bc254794ad09eaf5d67a8901b9a)) +* added inline attributes ([0a4d2ce](https://github.com/privateOmega/html-to-docx/commit/0a4d2ce4b4c64952c3866928e6355b7c891ac044)) +* added italics, underline and bold in runproperties ([34c2e18](https://github.com/privateOmega/html-to-docx/commit/34c2e18123c8a6a956209951afebc0dce2ab6cfc)) +* added more namespaces ([68636b4](https://github.com/privateOmega/html-to-docx/commit/68636b4c7cc73bf9e0de75b7bf97ac9afb4fb6f9)) +* added namespace aliases to header and numbering xmls ([d0b4101](https://github.com/privateOmega/html-to-docx/commit/d0b4101017a6dabd0fa18e23228bd4af338129eb)) +* added numbering and styles relationship ([c7e29af](https://github.com/privateOmega/html-to-docx/commit/c7e29af7414ce71515c46861942342d4f397222b)) +* added other namespaces to the xml root ([afbbca9](https://github.com/privateOmega/html-to-docx/commit/afbbca9dbf723afc857034ce7770bc8f0840c0e4)) +* added override for relationship ([30acddc](https://github.com/privateOmega/html-to-docx/commit/30acddc84d40dc6c66ed9539618b94adeeb2fc85)) +* added override for settings and websettings ([977af04](https://github.com/privateOmega/html-to-docx/commit/977af04f48c19f2b3162cf6e61782cf63e7162e8)) +* added overrides for relationships ([22b9cac](https://github.com/privateOmega/html-to-docx/commit/22b9cac2fa788b9654262e450774c588180a18de)) +* added padding between image and wrapping text ([e45fbf5](https://github.com/privateOmega/html-to-docx/commit/e45fbf553c19071023634b692e3c4b0fab04aedf)) +* added positioning fragments ([e6f7e1c](https://github.com/privateOmega/html-to-docx/commit/e6f7e1c3679aa813a2818725548dfb5ebb0d9bd7)) +* added required attributes to anchor fragment ([d01c9f9](https://github.com/privateOmega/html-to-docx/commit/d01c9f915a929de201218af127103da627aaa4a1)) +* added settings and websettings relation ([34aeedc](https://github.com/privateOmega/html-to-docx/commit/34aeedce6d0dd02822062762f9b077bb146b09b9)) +* added settings and websettings to ooxml package ([6c829b5](https://github.com/privateOmega/html-to-docx/commit/6c829b5ec4596ba0b5d41fae9ba2bfd68fdf7230)) +* added simple positioning to anchor ([5006cc4](https://github.com/privateOmega/html-to-docx/commit/5006cc47d112360e51d8051f1ebff570e9f12779)) +* added table borders ([12864db](https://github.com/privateOmega/html-to-docx/commit/12864db468a08f4aca4d01cb8e8b6635aa09c57d)) +* added wrap elements ([c951688](https://github.com/privateOmega/html-to-docx/commit/c95168864c4929e2ab95c5a6a53d0919c76f8a83)) +* changed attribute field for picture name ([aef241d](https://github.com/privateOmega/html-to-docx/commit/aef241dc3d3d9adb732c429df9f0c2771b319680)) +* changed attribute used for name ([3885233](https://github.com/privateOmega/html-to-docx/commit/3885233bf14f9b7b16d48a2844d3e997e476a8ee)) +* changed default namespace of relationship to solve render issue ([56a3554](https://github.com/privateOmega/html-to-docx/commit/56a3554e7b2e9d85cedeece8d20acfebf23666ad)) +* changed file extension if octet stream is encountered ([32c5bf1](https://github.com/privateOmega/html-to-docx/commit/32c5bf1b5f7c5f8dc83a51fed142e932c7b008fd)) +* changed namespaces to original ecma 376 spec ([51be86e](https://github.com/privateOmega/html-to-docx/commit/51be86ecf0f4a78457840bf2a31579d217568208)) +* fix table render issue due to grid width ([636d499](https://github.com/privateOmega/html-to-docx/commit/636d499bcee00195f7b5ca198c60bb3e0f7d2a69)) +* fixed abstract numbering id ([9814cb8](https://github.com/privateOmega/html-to-docx/commit/9814cb89582bc7e87cec638be37ee1cd326c6117)) +* fixed coloring and refactored other text formatting ([c288f80](https://github.com/privateOmega/html-to-docx/commit/c288f809ea6387c91356976a6dd81396cecafc46)) +* fixed document rels and numbering bug ([d6e3152](https://github.com/privateOmega/html-to-docx/commit/d6e3152081da7d2ab379a67bfda345964fa15c40)) +* fixed docx generation ([3d96acf](https://github.com/privateOmega/html-to-docx/commit/3d96acf511d82776510fac857af57d5cb9453f89)) +* fixed incorrect table row generation ([742dd18](https://github.com/privateOmega/html-to-docx/commit/742dd1882ce4c1a33ab51e10ee2a628b817eca31)) +* fixed internal mode and added extensions ([1266121](https://github.com/privateOmega/html-to-docx/commit/12661213e00c55f7068e93abb019ba80cd4f2d87)) +* fixed margin issues ([f841b76](https://github.com/privateOmega/html-to-docx/commit/f841b76caa944ea5eec206a3b3fce3e5a5eaf3e7)) +* fixed numbering and header issue due to wrong filename ([64a04bc](https://github.com/privateOmega/html-to-docx/commit/64a04bc192616162aa67c43f80734e7ebb9ff588)) +* fixed table and image rendering ([c153092](https://github.com/privateOmega/html-to-docx/commit/c1530924f93351ce63882bf0e6050b6315aa6017)) +* handled figure wrapper for images and tables ([4182a95](https://github.com/privateOmega/html-to-docx/commit/4182a9543aeb71fd8b0d2c7a2e08978a782de3e6)) +* handled table width ([237ddfd](https://github.com/privateOmega/html-to-docx/commit/237ddfd6bff914e0379c6cbd940a7eac29d7aeaf)) +* handling multiple span children and multilevel formatting of text ([4c81f58](https://github.com/privateOmega/html-to-docx/commit/4c81f586400d1f227236a8b07d067331c0f02c5d)) +* modified example to use esm bundle ([491a83d](https://github.com/privateOmega/html-to-docx/commit/491a83d9b2c0deec13743817cdf32280d39bb9cd)) +* moved namespaces into separate file ([75cdf30](https://github.com/privateOmega/html-to-docx/commit/75cdf3033e69934b189a74d6c77eef08d50492aa)) +* namespace updated to 2016 standards ([6fc2ac2](https://github.com/privateOmega/html-to-docx/commit/6fc2ac2b6e904c4dd774b24e0ad119cccd873e0b)) +* **template:** fixed document templating ([5f6a74f](https://github.com/privateOmega/html-to-docx/commit/5f6a74f9964348590fbb7f5baf88230c8c796766)) +* **template:** fixed numbering templating ([8b09691](https://github.com/privateOmega/html-to-docx/commit/8b096916284cbbe8452bb572d788caee23849084)) +* **template:** removed word xml schema ([ee0e1ed](https://github.com/privateOmega/html-to-docx/commit/ee0e1ed7b0b00cbaf3644ad887175abac0282dcc)) +* removed unwanted attribute ([f3caf44](https://github.com/privateOmega/html-to-docx/commit/f3caf44faf95ba8c6dee1f6f959300374e2b65ff)) +* renamed document rels schema file ([10c3fda](https://github.com/privateOmega/html-to-docx/commit/10c3fda9878847257b902d4c13c2d8dd36edd3f6)) +* updated document abstraction to track generation ids ([c34810f](https://github.com/privateOmega/html-to-docx/commit/c34810f1373f934b0b3ecbe9da2838f41a68dcc9)) +* updated documentrels xml generation ([433e4b4](https://github.com/privateOmega/html-to-docx/commit/433e4b4eb9d71beede8feb1754363163ba5d1933)) +* updated numbering xml generation ([81b7a82](https://github.com/privateOmega/html-to-docx/commit/81b7a8296d1e3afa095f47007a66698852d29f95)) +* updated xml builder to use namespace and child nodes ([2e28b5e](https://github.com/privateOmega/html-to-docx/commit/2e28b5ec07241c10c4288412a6ced8023e8c03ce)) +* wrapped drawing inside paragraph tag ([d0476b4](https://github.com/privateOmega/html-to-docx/commit/d0476b4211fe13f5918091a6a06e5021015a5db8)) + +### [1.1.1](https://github.com/privateOmega/html-to-docx/compare/v1.1.0...v1.1.1) (2020-05-28) + + +### Bug Fixes + +* modified example to use esm bundle ([dcd7f4b](https://github.com/privateOmega/html-to-docx/commit/dcd7f4b7705b806697dfe92f060641030ee42cfa)) + +## 1.1.0 (2020-05-28) + + +### Features + +* **packaging:** added jszip for packaging ([89619ec](https://github.com/privateOmega/html-to-docx/commit/89619ec702564fb9c5eccaee55e65d366fcbacad)) +* **packaging:** added method to create container ([9808cf2](https://github.com/privateOmega/html-to-docx/commit/9808cf211bbb50cf3d7cbe122d01c82d4272e888)) +* **template:** added base docx template ([abdb87b](https://github.com/privateOmega/html-to-docx/commit/abdb87bdfead91890f9d54e2cedd038e916b6dce)) +* **template:** added numbering schema ([d179d73](https://github.com/privateOmega/html-to-docx/commit/d179d736e6e63ed42104a231ca0489430faae00a)) +* **template:** added styles schema ([d83d230](https://github.com/privateOmega/html-to-docx/commit/d83d230a66807f6ad08ebb4a6c0c5299c311aaf5)) +* abstracted conversion using docxDocument class ([c625a01](https://github.com/privateOmega/html-to-docx/commit/c625a0181a6c328c0319b579fa1173192dff1187)) +* added builder methods for images ([9e2720f](https://github.com/privateOmega/html-to-docx/commit/9e2720f261a46701c8a2581aadafa9b60e6cee6b)) +* added document file render helper ([6dd9c3a](https://github.com/privateOmega/html-to-docx/commit/6dd9c3a01f5fceab78404d8ebddb848fb91c933c)) +* added escape-html ([1a231d5](https://github.com/privateOmega/html-to-docx/commit/1a231d5dde3e6f9b5a23f248e19063191c07e54f)) +* added header generation ([25fb44f](https://github.com/privateOmega/html-to-docx/commit/25fb44f945df3fdc5f37d619b3de3ebe68b84cd6)) +* added hyperlinks support ([3560ce9](https://github.com/privateOmega/html-to-docx/commit/3560ce9f23fa8f590aa340302bf0059c8dfb6d5f)) +* added method to archive images with other files ([b6da74b](https://github.com/privateOmega/html-to-docx/commit/b6da74be10be03d689ca044f3f95dd724a3a29b6)) +* added more xml builder methods ([ffc584b](https://github.com/privateOmega/html-to-docx/commit/ffc584bed7ab434431999517a3308483ba99489a)) +* added more xml statment builder methods ([337e530](https://github.com/privateOmega/html-to-docx/commit/337e5305aa8768b6507323bec2279d557a35b67b)) +* added text formatting to paragraph ([bacd888](https://github.com/privateOmega/html-to-docx/commit/bacd888253a35a18ac7ea4e9141d4a4fb60e3cf7)) +* added vdom to xml method ([8b5a618](https://github.com/privateOmega/html-to-docx/commit/8b5a6185e6e211b0e07b9f1c1b7e23fb4b13dc9c)) +* added virtual-dom and html-to-vdom ([feaa396](https://github.com/privateOmega/html-to-docx/commit/feaa396162465276d19b7d3d5c51a533987a1738)) +* added xbuilder ([f13b5cc](https://github.com/privateOmega/html-to-docx/commit/f13b5cc06d29ae53493f1f4b8fdef6e8986e64e6)) +* added xml builder methods for images ([f413ad8](https://github.com/privateOmega/html-to-docx/commit/f413ad89b263c63a8fb9890b44b1b219a7413c4b)) +* added xml statement builder helper ([5e23c16](https://github.com/privateOmega/html-to-docx/commit/5e23c1636eb3c64f52589f1ac71a48dec3df65c2)) +* handle line breaks ([164c0f5](https://github.com/privateOmega/html-to-docx/commit/164c0f5e17f62e3f30da25be6e181d3414ca4dde)) +* **template:** added XML schemas ([42232da](https://github.com/privateOmega/html-to-docx/commit/42232da9d63ed404367703e56b1c65cdb8a23782)) + + +### Bug Fixes + +* added attributes to anchor drawing ([62e4a29](https://github.com/privateOmega/html-to-docx/commit/62e4a29ef664257d8f0364d5d97f056a62f0fb61)) +* added effectextent and srcrect fragment ([5f5e975](https://github.com/privateOmega/html-to-docx/commit/5f5e975b135eb38c48e18a09da590b363166d74e)) +* added extent fragment ([7ce81f2](https://github.com/privateOmega/html-to-docx/commit/7ce81f27e4c493bb9bf7d368a415f34cb0678e4c)) +* added header override in content-types xml ([5de681b](https://github.com/privateOmega/html-to-docx/commit/5de681be9295754eff648cea504e07bf9a6f6d09)) +* added image conversion handler ([f726e71](https://github.com/privateOmega/html-to-docx/commit/f726e71ee2504bc254794ad09eaf5d67a8901b9a)) +* added inline attributes ([0a4d2ce](https://github.com/privateOmega/html-to-docx/commit/0a4d2ce4b4c64952c3866928e6355b7c891ac044)) +* added italics, underline and bold in runproperties ([34c2e18](https://github.com/privateOmega/html-to-docx/commit/34c2e18123c8a6a956209951afebc0dce2ab6cfc)) +* added more namespaces ([68636b4](https://github.com/privateOmega/html-to-docx/commit/68636b4c7cc73bf9e0de75b7bf97ac9afb4fb6f9)) +* added namespace aliases to header and numbering xmls ([d0b4101](https://github.com/privateOmega/html-to-docx/commit/d0b4101017a6dabd0fa18e23228bd4af338129eb)) +* added numbering and styles relationship ([c7e29af](https://github.com/privateOmega/html-to-docx/commit/c7e29af7414ce71515c46861942342d4f397222b)) +* added other namespaces to the xml root ([afbbca9](https://github.com/privateOmega/html-to-docx/commit/afbbca9dbf723afc857034ce7770bc8f0840c0e4)) +* added override for relationship ([30acddc](https://github.com/privateOmega/html-to-docx/commit/30acddc84d40dc6c66ed9539618b94adeeb2fc85)) +* added override for settings and websettings ([977af04](https://github.com/privateOmega/html-to-docx/commit/977af04f48c19f2b3162cf6e61782cf63e7162e8)) +* added overrides for relationships ([22b9cac](https://github.com/privateOmega/html-to-docx/commit/22b9cac2fa788b9654262e450774c588180a18de)) +* added padding between image and wrapping text ([e45fbf5](https://github.com/privateOmega/html-to-docx/commit/e45fbf553c19071023634b692e3c4b0fab04aedf)) +* added positioning fragments ([e6f7e1c](https://github.com/privateOmega/html-to-docx/commit/e6f7e1c3679aa813a2818725548dfb5ebb0d9bd7)) +* added required attributes to anchor fragment ([d01c9f9](https://github.com/privateOmega/html-to-docx/commit/d01c9f915a929de201218af127103da627aaa4a1)) +* added settings and websettings relation ([34aeedc](https://github.com/privateOmega/html-to-docx/commit/34aeedce6d0dd02822062762f9b077bb146b09b9)) +* added settings and websettings to ooxml package ([6c829b5](https://github.com/privateOmega/html-to-docx/commit/6c829b5ec4596ba0b5d41fae9ba2bfd68fdf7230)) +* added simple positioning to anchor ([5006cc4](https://github.com/privateOmega/html-to-docx/commit/5006cc47d112360e51d8051f1ebff570e9f12779)) +* added table borders ([12864db](https://github.com/privateOmega/html-to-docx/commit/12864db468a08f4aca4d01cb8e8b6635aa09c57d)) +* added wrap elements ([c951688](https://github.com/privateOmega/html-to-docx/commit/c95168864c4929e2ab95c5a6a53d0919c76f8a83)) +* changed attribute field for picture name ([aef241d](https://github.com/privateOmega/html-to-docx/commit/aef241dc3d3d9adb732c429df9f0c2771b319680)) +* changed attribute used for name ([3885233](https://github.com/privateOmega/html-to-docx/commit/3885233bf14f9b7b16d48a2844d3e997e476a8ee)) +* changed default namespace of relationship to solve render issue ([56a3554](https://github.com/privateOmega/html-to-docx/commit/56a3554e7b2e9d85cedeece8d20acfebf23666ad)) +* changed file extension if octet stream is encountered ([32c5bf1](https://github.com/privateOmega/html-to-docx/commit/32c5bf1b5f7c5f8dc83a51fed142e932c7b008fd)) +* changed namespaces to original ecma 376 spec ([51be86e](https://github.com/privateOmega/html-to-docx/commit/51be86ecf0f4a78457840bf2a31579d217568208)) +* fix table render issue due to grid width ([636d499](https://github.com/privateOmega/html-to-docx/commit/636d499bcee00195f7b5ca198c60bb3e0f7d2a69)) +* fixed abstract numbering id ([9814cb8](https://github.com/privateOmega/html-to-docx/commit/9814cb89582bc7e87cec638be37ee1cd326c6117)) +* fixed coloring and refactored other text formatting ([c288f80](https://github.com/privateOmega/html-to-docx/commit/c288f809ea6387c91356976a6dd81396cecafc46)) +* fixed document rels and numbering bug ([d6e3152](https://github.com/privateOmega/html-to-docx/commit/d6e3152081da7d2ab379a67bfda345964fa15c40)) +* fixed docx generation ([3d96acf](https://github.com/privateOmega/html-to-docx/commit/3d96acf511d82776510fac857af57d5cb9453f89)) +* fixed incorrect table row generation ([742dd18](https://github.com/privateOmega/html-to-docx/commit/742dd1882ce4c1a33ab51e10ee2a628b817eca31)) +* fixed internal mode and added extensions ([1266121](https://github.com/privateOmega/html-to-docx/commit/12661213e00c55f7068e93abb019ba80cd4f2d87)) +* fixed margin issues ([f841b76](https://github.com/privateOmega/html-to-docx/commit/f841b76caa944ea5eec206a3b3fce3e5a5eaf3e7)) +* fixed numbering and header issue due to wrong filename ([64a04bc](https://github.com/privateOmega/html-to-docx/commit/64a04bc192616162aa67c43f80734e7ebb9ff588)) +* fixed table and image rendering ([c153092](https://github.com/privateOmega/html-to-docx/commit/c1530924f93351ce63882bf0e6050b6315aa6017)) +* handled figure wrapper for images and tables ([4182a95](https://github.com/privateOmega/html-to-docx/commit/4182a9543aeb71fd8b0d2c7a2e08978a782de3e6)) +* handled table width ([237ddfd](https://github.com/privateOmega/html-to-docx/commit/237ddfd6bff914e0379c6cbd940a7eac29d7aeaf)) +* handling multiple span children and multilevel formatting of text ([4c81f58](https://github.com/privateOmega/html-to-docx/commit/4c81f586400d1f227236a8b07d067331c0f02c5d)) +* moved namespaces into separate file ([75cdf30](https://github.com/privateOmega/html-to-docx/commit/75cdf3033e69934b189a74d6c77eef08d50492aa)) +* namespace updated to 2016 standards ([6fc2ac2](https://github.com/privateOmega/html-to-docx/commit/6fc2ac2b6e904c4dd774b24e0ad119cccd873e0b)) +* removed unwanted attribute ([f3caf44](https://github.com/privateOmega/html-to-docx/commit/f3caf44faf95ba8c6dee1f6f959300374e2b65ff)) +* renamed document rels schema file ([10c3fda](https://github.com/privateOmega/html-to-docx/commit/10c3fda9878847257b902d4c13c2d8dd36edd3f6)) +* updated document abstraction to track generation ids ([c34810f](https://github.com/privateOmega/html-to-docx/commit/c34810f1373f934b0b3ecbe9da2838f41a68dcc9)) +* **template:** fixed document templating ([5f6a74f](https://github.com/privateOmega/html-to-docx/commit/5f6a74f9964348590fbb7f5baf88230c8c796766)) +* **template:** fixed numbering templating ([8b09691](https://github.com/privateOmega/html-to-docx/commit/8b096916284cbbe8452bb572d788caee23849084)) +* updated documentrels xml generation ([433e4b4](https://github.com/privateOmega/html-to-docx/commit/433e4b4eb9d71beede8feb1754363163ba5d1933)) +* updated numbering xml generation ([81b7a82](https://github.com/privateOmega/html-to-docx/commit/81b7a8296d1e3afa095f47007a66698852d29f95)) +* updated xml builder to use namespace and child nodes ([2e28b5e](https://github.com/privateOmega/html-to-docx/commit/2e28b5ec07241c10c4288412a6ced8023e8c03ce)) +* wrapped drawing inside paragraph tag ([d0476b4](https://github.com/privateOmega/html-to-docx/commit/d0476b4211fe13f5918091a6a06e5021015a5db8)) +* **template:** removed word xml schema ([ee0e1ed](https://github.com/privateOmega/html-to-docx/commit/ee0e1ed7b0b00cbaf3644ad887175abac0282dcc)) diff --git a/front/public/cdn/html-to-docx/LICENSE b/front/public/cdn/html-to-docx/LICENSE new file mode 100644 index 0000000..7c27c9e --- /dev/null +++ b/front/public/cdn/html-to-docx/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 privateOmega + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/front/public/cdn/html-to-docx/README.md b/front/public/cdn/html-to-docx/README.md new file mode 100644 index 0000000..1d79d6a --- /dev/null +++ b/front/public/cdn/html-to-docx/README.md @@ -0,0 +1,136 @@ +html-to-docx +============ + +[![NPM Version][npm-image]][npm-url] + +html-to-docx is a js library for converting HTML documents to DOCX format supported by Microsoft Word 2007+, LibreOffice Writer, Google Docs, WPS Writer etc. + +It was inspired by [html-docx-js] project but mitigates the problem of documents generated being non-compatiable with word processors like Google Docs and libreOffice Writer that doesn't support [altchunks] feature. + +html-to-docx earlier used to use [libtidy] to clean up the html before parsing, but had to remove it since it was causing so many dependency issues due to node-gyp. + +### Disclaimer + +Even though there is an instance of html-to-docx running in production, please ensure that it covers all the cases that you might be encountering usually, since this is not a complete solution. + +Currently it doesn't work with browser directly, but it was tested against React. + +## Installation + +Use the npm to install foobar. + +```bash +npm install html-to-docx +``` + +## Usage + +```js +await HTMLtoDOCX(htmlString, headerHTMLString, documentOptions, footerHTMLString) +``` + +full fledged examples can be found under `example/` + +### Parameters + +- `htmlString` <[String]> clean html string equivalent of document content. +- `headerHTMLString` <[String]> clean html string equivalent of header. Defaults to `

` if header flag is `true`. +- `documentOptions` + - `orientation` <"portrait"|"landscape"> defines the general orientation of the document. Defaults to portrait. + - `margins` + - `top` <[Number]> distance between the top of the text margins for the main document and the top of the page for all pages in this section in [TWIP]. Defaults to 1440. Supports equivalent measurement in [pixel], [cm] or [inch]. + - `right` <[Number]> distance between the right edge of the page and the right edge of the text extents for this document in [TWIP]. Defaults to 1800. Supports equivalent measurement in [pixel], [cm] or [inch]. + - `bottom` <[Number]> distance between the bottom of text margins for the document and the bottom of the page in [TWIP]. Defaults to 1440. Supports equivalent measurement in [pixel], [cm] or [inch]. + - `left` <[Number]> distance between the left edge of the page and the left edge of the text extents for this document in [TWIP]. Defaults to 1800. Supports equivalent measurement in [pixel], [cm] or [inch]. + - `header` <[Number]> distance from the top edge of the page to the top edge of the header in [TWIP]. Defaults to 720. Supports equivalent measurement in [pixel], [cm] or [inch]. + - `footer` <[Number]> distance from the bottom edge of the page to the bottom edge of the footer in [TWIP]. Defaults to 720. Supports equivalent measurement in [pixel], [cm] or [inch]. + - `gutter` <[Number]> amount of extra space added to the specified margin, above any existing margin values. This setting is typically used when a document is being created for binding in [TWIP]. Defaults to 0. Supports equivalent measurement in [pixel], [cm] or [inch]. + - `title` title of the document. + - `subject` subject of the document. + - `creator` creator of the document. Defaults to `html-to-docx` + - `keywords` > keywords associated with the document. Defaults to ['html-to-docx']. + - `description` description of the document. + - `lastModifiedBy` last modifier of the document. Defaults to `html-to-docx`. + - `revision` revision of the document. Defaults to `1`. + - `createdAt` time of creation of the document. Defaults to current time. + - `modifiedAt` time of last modification of the document. Defaults to current time. + - `headerType` <"default"|"first"|"even"> type of header. Defaults to `default`. + - `header` flag to enable header. Defaults to `false`. + - `footerType` <"default"|"first"|"even"> type of footer. Defaults to `default`. + - `footer` flag to enable footer. Defaults to `false`. + - `font` font name to be used. Defaults to `Times New Roman`. + - `fontSize` size of font in HIP(Half of point). Defaults to `22`. Supports equivalent measure in [pt]. + - `complexScriptFontSize` size of complex script font in HIP(Half of point). Defaults to `22`. Supports equivalent measure in [pt]. + - `table` + - `row` + - `cantSplit` flag to allow table row to split across pages. Defaults to `false`. + - `pageNumber` flag to enable page number in footer. Defaults to `false`. Page number works only if footer flag is set as `true`. + - `skipFirstHeaderFooter` flag to skip first page header and footer. Defaults to `false`. + - `lineNumber` flag to enable line numbering. Defaults to `false`. + - `lineNumberOptions` + - `start` <[Number]> start of the numbering - 1. Defaults to `0`. + - `countBy` <[Number]> skip numbering in how many lines in between + 1. Defaults to `1`. + - `restart` <"continuous"|"newPage"|"newSection"> numbering restart strategy. Defaults to `continuous`. +- `footerHTMLString` <[String]> clean html string equivalent of footer. Defaults to `

` if footer flag is `true`. + +### Returns + +<[Promise]<[Buffer]|[Blob]>> + +## Notes + +Currently page break can be implemented by having div with classname "page-break" or style "page-break-after" despite the values of the "page-break-after", and contents inside the div element will be ignored. `
` + +
+ +CSS list-style-type for `
    ` element are now supported. Just do something like this in the HTML: +``` +
      +
    1. List item
    2. + ... +
    +``` +List of supported list-style-type: +- upper-alpha, will result in `A. List item` +- lower-alpha, will result in `a. List item` +- upper-roman, will result in `I. List item` +- lower-roman, will result in `i. List item` +- decimal, will result in `1. List item` +- lower-alpha-bracket-end, will result in `a) List item` +- decimal-bracket-end, will result in `1) List item` +- decimal-bracket, will result in `(1) List item` + + +Also you could add attribute `data-start="n"` to start the numbering from the n-th. + +`
      ` will start the numbering from ( B. b. II. ii. 2. ) + +## Contributing + +Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. + +Please make sure to branch new branches off of develop for contribution. + +## License + +MIT + +[npm-image]: https://img.shields.io/npm/v/html-to-docx.svg +[npm-url]: https://npmjs.org/package/html-to-docx +[html-docx-js]: https://github.com/evidenceprime/html-docx-js "html-docx-js" +[altchunks]: https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.wordprocessing.altchunk?view=openxml-2.8.1 "altchunks" +[libtidy]: https://github.com/jure/node-libtidy "libtidy" +[String]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String" +[Object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object "Object" +[Number]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type "Number" +[TWIP]: https://en.wikipedia.org/wiki/Twip "TWIP" +[Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array "Array" +[Date]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date "Date" +[Boolean]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type "Boolean" +[Promise]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise "Promise" +[Buffer]: https://nodejs.org/api/buffer.html#buffer_buffer "Buffer" +[Blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob "Blob" +[pixel]: https://en.wikipedia.org/wiki/Pixel#:~:text=Pixels%2C%20abbreviated%20as%20%22px%22,what%20screen%20resolution%20views%20it. "pixel" +[cm]: https://en.wikipedia.org/wiki/Centimetre "cm" +[inch]: https://en.wikipedia.org/wiki/Inch "inch" +[pt]: https://en.wikipedia.org/wiki/Point_(typography) "pt" \ No newline at end of file diff --git a/front/public/cdn/html-to-docx/dist/html-to-docx.esm.js b/front/public/cdn/html-to-docx/dist/html-to-docx.esm.js new file mode 100644 index 0000000..09054cd --- /dev/null +++ b/front/public/cdn/html-to-docx/dist/html-to-docx.esm.js @@ -0,0 +1,2 @@ +import JSZip from"jszip";import{fragment,create}from"xmlbuilder2";import HTMLToVDOM from"html-to-vdom";import crypto from"crypto";import escape from"escape-html";import fs from"fs";import path from"path";import util from"util";import events from"events";import colorNames from"color-name";var isVnode=function(x){return x&&"VirtualNode"===x.type&&"2"===x.version};var isWidget_1=function(w){return w&&"Widget"===w.type};var isThunk_1=function(t){return t&&"Thunk"===t.type};var isVhook=function(hook){return hook&&("function"==typeof hook.hook&&!hook.hasOwnProperty("hook")||"function"==typeof hook.unhook&&!hook.hasOwnProperty("unhook"))};var vnode=VirtualNode,noProperties={},noChildren=[];function VirtualNode(tagName,properties,children,key,namespace){this.tagName=tagName,this.properties=properties||noProperties,this.children=children||noChildren,this.key=null!=key?String(key):void 0,this.namespace="string"==typeof namespace?namespace:null;var hooks,count=children&&children.length||0,descendants=0,hasWidgets=!1,hasThunks=!1,descendantHooks=!1;for(var propName in properties)if(properties.hasOwnProperty(propName)){var property=properties[propName];isVhook(property)&&property.unhook&&(hooks||(hooks={}),hooks[propName]=property)}for(var i=0;i"']/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*$/,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reHasRegExpChar=RegExp(reRegExpChar.source),reTrimStart=/^\s+/,reWhitespace=/\s/,reWrapComment=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,reWrapDetails=/\{\n\/\* \[wrapped with (.+)\] \*/,reSplitDetails=/,? & /,reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,reForbiddenIdentifierChars=/[()=,{}\[\]\/\s]/,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,rsComboRange="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",rsBreakRange="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",rsAstral="[\\ud800-\\udfff]",rsBreak="["+rsBreakRange+"]",rsCombo="["+rsComboRange+"]",rsDigits="\\d+",rsDingbat="[\\u2700-\\u27bf]",rsLower="[a-z\\xdf-\\xf6\\xf8-\\xff]",rsMisc="[^\\ud800-\\udfff"+rsBreakRange+rsDigits+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsNonAstral="[^\\ud800-\\udfff]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="[A-Z\\xc0-\\xd6\\xd8-\\xde]",rsMiscLower="(?:"+rsLower+"|"+rsMisc+")",rsMiscUpper="(?:"+rsUpper+"|"+rsMisc+")",reOptMod="(?:"+rsCombo+"|"+rsFitz+")"+"?",rsSeq="[\\ufe0e\\ufe0f]?"+reOptMod+("(?:\\u200d(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")[\\ufe0e\\ufe0f]?"+reOptMod+")*"),rsEmoji="(?:"+[rsDingbat,rsRegional,rsSurrPair].join("|")+")"+rsSeq,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reApos=RegExp("['’]","g"),reComboMark=RegExp(rsCombo,"g"),reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g"),reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsMiscUpper+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[rsBreak,rsUpper+rsMiscLower,"$"].join("|")+")",rsUpper+"?"+rsMiscLower+"+(?:['’](?:d|ll|m|re|s|t|ve))?",rsUpper+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rsDigits,rsEmoji].join("|"),"g"),reHasUnicode=RegExp("[\\u200d\\ud800-\\udfff"+rsComboRange+"\\ufe0e\\ufe0f]"),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["[object Uint8ClampedArray]"]=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["[object Uint8ClampedArray]"]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=!1;var stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},freeParseFloat=parseFloat,freeParseInt=parseInt,freeGlobal="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),freeExports=exports&&!exports.nodeType&&exports,freeModule=freeExports&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,freeProcess=moduleExports&&freeGlobal.process,nodeUtil=function(){try{var types=freeModule&&freeModule.require&&freeModule.require("util").types;return types||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;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-1}function arrayIncludesWith(array,value,comparator){for(var index=-1,length=null==array?0:array.length;++index-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}var deburrLetter=basePropertyOf({"À":"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"}),escapeHtmlChar=basePropertyOf({"&":"&","<":"<",">":">",'"':""","'":"'"});function escapeStringChar(chr){return"\\"+stringEscapes[chr]}function hasUnicode(string){return reHasUnicode.test(string)}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",""":'"',"'":"'"});var _=function runInContext(context){var uid,Array=(context=null==context?root:_.defaults(root.Object(),context,_.pick(root,contextProps))).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=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""))?"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;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)}var 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}}();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__=4294967295,this.__views__=[]}function Hash(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index=lower?number:lower)),number}function baseClone(value,bitmask,customizer,key,object,stack){var result,isDeep=1&bitmask,isFlat=2&bitmask,isFull=4&bitmask;if(customizer&&(result=object?customizer(value,key,object,stack):customizer(value)),undefined!==result)return result;if(!isObject(value))return value;var isArr=isArray(value);if(isArr){if(result=function(array){var length=array.length,result=new array.constructor(length);length&&"string"==typeof array[0]&&hasOwnProperty.call(array,"index")&&(result.index=array.index,result.input=array.input);return result}(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?function(source,object){return copyObject(source,getSymbolsIn(source),object)}(value,function(object,source){return object&©Object(source,keysIn(source),object)}(result,value)):function(source,object){return copyObject(source,getSymbols(source),object)}(value,baseAssign(result,value))}else{if(!cloneableTags[tag])return object?value:{};result=function(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return cloneArrayBuffer(object);case boolTag:case dateTag:return new Ctor(+object);case dataViewTag:return function(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength)}(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 new Ctor;case numberTag:case stringTag:return new Ctor(object);case regexpTag:return function(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));return result.lastIndex=regexp.lastIndex,result}(object);case setTag:return new Ctor;case symbolTag:return symbol=object,symbolValueOf?Object(symbolValueOf.call(symbol)):{}}var symbol}(value,tag,isDeep)}}stack||(stack=new Stack);var stacked=stack.get(value);if(stacked)return stacked;stack.set(value,result),isSet(value)?value.forEach((function(subValue){result.add(baseClone(subValue,bitmask,customizer,subValue,value,stack))})):isMap(value)&&value.forEach((function(subValue,key){result.set(key,baseClone(subValue,bitmask,customizer,key,value,stack))}));var props=isArr?undefined:(isFull?isFlat?getAllKeysIn:getAllKeys:isFlat?keysIn:keys)(value);return arrayEach(props||value,(function(subValue,key){props&&(subValue=value[key=subValue]),assignValue(result,key,baseClone(subValue,bitmask,customizer,key,value,stack))})),result}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(undefined===value&&!(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>=200&&(includes=cacheHas,isCommon=!1,values=new SetCache(values));outer:for(;++index-1},ListCache.prototype.set=function(key,value){var data=this.__data__,index=assocIndexOf(data,key);return index<0?(++this.size,data.push([key,value])):data[index][1]=value,this},MapCache.prototype.clear=function(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}},MapCache.prototype.delete=function(key){var result=getMapData(this,key).delete(key);return this.size-=result?1:0,result},MapCache.prototype.get=function(key){return getMapData(this,key).get(key)},MapCache.prototype.has=function(key){return getMapData(this,key).has(key)},MapCache.prototype.set=function(key,value){var data=getMapData(this,key),size=data.size;return data.set(key,value),this.size+=data.size==size?0:1,this},SetCache.prototype.add=SetCache.prototype.push=function(value){return this.__data__.set(value,"__lodash_hash_undefined__"),this},SetCache.prototype.has=function(value){return this.__data__.has(value)},Stack.prototype.clear=function(){this.__data__=new ListCache,this.size=0},Stack.prototype.delete=function(key){var data=this.__data__,result=data.delete(key);return this.size=data.size,result},Stack.prototype.get=function(key){return this.__data__.get(key)},Stack.prototype.has=function(key){return this.__data__.has(key)},Stack.prototype.set=function(key,value){var data=this.__data__;if(data instanceof ListCache){var pairs=data.__data__;if(!Map||pairs.length<199)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};var baseEach=createBaseEach(baseForOwn),baseEachRight=createBaseEach(baseForOwnRight,!0);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;++index0&&predicate(value)?depth>1?baseFlatten(value,depth-1,predicate,isStrict,result):arrayPush(result,value):isStrict||(result[result.length]=value)}return result}var baseFor=createBaseFor(),baseForRight=createBaseFor(!0);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){for(var index=0,length=(path=castPath(path,object)).length;null!=object&&indexother}function baseHas(object,key){return null!=object&&hasOwnProperty.call(object,key)}function baseHasIn(object,key){return null!=object&&key in Object(object)}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=ordersLength?result:result*("desc"==orders[index]?-1:1)}return object.index-other.index}(object,other,orders)}))}function basePickBy(object,paths,predicate){for(var index=-1,length=paths.length,result={};++index-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 baseRepeat(string,n){var result="";if(!string||n<1||n>9007199254740991)return result;do{n%2&&(result+=string),(n=nativeFloor(n/2))&&(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;for(var index=-1,length=(path=castPath(path,object)).length,lastIndex=length-1,nested=object;null!=nested&&++indexlength?0:length+start),(end=end>length?length:end)<0&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);++index>>1,computed=array[mid];null!==computed&&!isSymbol(computed)&&(retHighest?computed<=value:computed=200){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?array:baseSlice(array,start,end)}var clearTimeout=ctxClearTimeout||function(id){return root.clearTimeout(id)};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 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=undefined!==value,valIsNull=null===value,valIsReflexive=value==value,valIsSymbol=isSymbol(value),othIsDefined=undefined!==other,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&&value1?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-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;++index1&&args.reverse(),isAry&&aryarrLength))return!1;var arrStacked=stack.get(array),othStacked=stack.get(other);if(arrStacked&&othStacked)return arrStacked==other&&othStacked==array;var index=-1,result=!0,seen=2&bitmask?new SetCache:undefined;for(stack.set(array,other),stack.set(other,array);++index-1&&value%1==0&&value1?"& ":"")+details[lastIndex],details=details.join(length>2?", ":" "),source.replace(reWrapComment,"{\n/* [wrapped with "+details+"] */\n")}(source,function(details,bitmask){return arrayEach(wrapFlags,(function(pair){var value="_."+pair[0];bitmask&pair[1]&&!arrayIncludes(details,value)&&details.push(value)})),details.sort()}(function(source){var match=source.match(reWrapDetails);return match?match[1].split(reSplitDetails):[]}(source),bitmask)))}function shortOut(func){var count=0,lastCalled=0;return function(){var stamp=nativeNow(),remaining=16-(stamp-lastCalled);if(lastCalled=stamp,remaining>0){if(++count>=800)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=undefined===size?length:size;++index1?arrays[length-1]:undefined;return iteratee="function"==typeof iteratee?(arrays.pop(),iteratee):undefined,unzipWith(arrays,iteratee)}));function chain(value){var result=lodash(value);return result.__chain__=!0,result}function thru(value,interceptor){return interceptor(value)}var 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))).__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)}));var countBy=createAggregator((function(result,value,key){hasOwnProperty.call(result,key)?++result[key]:baseAssignValue(result,key,1)}));var find=createFind(findIndex),findLast=createFind(findLastIndex);function forEach(collection,iteratee){return(isArray(collection)?arrayEach:baseEach)(collection,getIteratee(iteratee,3))}function forEachRight(collection,iteratee){return(isArray(collection)?arrayEachRight:baseEachRight)(collection,getIteratee(iteratee,3))}var groupBy=createAggregator((function(result,value,key){hasOwnProperty.call(result,key)?result[key].push(value):baseAssignValue(result,key,[value])}));var 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)}));function map(collection,iteratee){return(isArray(collection)?arrayMap:baseMap)(collection,getIteratee(iteratee,3))}var partition=createAggregator((function(result,value,key){result[key?0:1].push(value)}),(function(){return[[],[]]}));var 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()};function ary(func,n,guard){return n=guard?undefined:n,createWrap(func,128,undefined,undefined,undefined,undefined,n=func&&null==n?func.length: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}}var bind=baseRest((function(func,thisArg,partials){var bitmask=1;if(partials.length){var holders=replaceHolders(partials,getHolder(bind));bitmask|=32}return createWrap(func,bitmask,thisArg,partials,holders)})),bindKey=baseRest((function(object,key,partials){var bitmask=3;if(partials.length){var holders=replaceHolders(partials,getHolder(bindKey));bitmask|=32}return createWrap(key,bitmask,object,partials,holders)}));function debounce(func,wait,options){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);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 shouldInvoke(time){var timeSinceLastCall=time-lastCallTime;return undefined===lastCallTime||timeSinceLastCall>=wait||timeSinceLastCall<0||maxing&&time-lastInvokeTime>=maxWait}function timerExpired(){var time=now();if(shouldInvoke(time))return trailingEdge(time);timerId=setTimeout(timerExpired,function(time){var timeWaiting=wait-(time-lastCallTime);return maxing?nativeMin(timeWaiting,maxWait-(time-lastInvokeTime)):timeWaiting}(time))}function trailingEdge(time){return timerId=undefined,trailing&&lastArgs?invokeFunc(time):(lastArgs=lastThis=undefined,result)}function debounced(){var time=now(),isInvoking=shouldInvoke(time);if(lastArgs=arguments,lastThis=this,lastCallTime=time,isInvoking){if(undefined===timerId)return leadingEdge(lastCallTime);if(maxing)return clearTimeout(timerId),timerId=setTimeout(timerExpired,wait),invokeFunc(lastCallTime)}return undefined===timerId&&(timerId=setTimeout(timerExpired,wait)),result}return wait=toNumber(wait)||0,isObject(options)&&(leading=!!options.leading,maxWait=(maxing="maxWait"in options)?nativeMax(toNumber(options.maxWait)||0,wait):maxWait,trailing="trailing"in options?!!options.trailing:trailing),debounced.cancel=function(){undefined!==timerId&&clearTimeout(timerId),lastInvokeTime=0,lastArgs=lastCallTime=lastThis=timerId=undefined},debounced.flush=function(){return undefined===timerId?result:trailingEdge(now())},debounced}var defer=baseRest((function(func,args){return baseDelay(func,1,args)})),delay=baseRest((function(func,wait,args){return baseDelay(func,toNumber(wait)||0,args)}));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)}}memoize.Cache=MapCache;var overArgs=castRest((function(func,transforms){var funcsLength=(transforms=1==transforms.length&&isArray(transforms[0])?arrayMap(transforms[0],baseUnary(getIteratee())):arrayMap(baseFlatten(transforms,1),baseUnary(getIteratee()))).length;return baseRest((function(args){for(var index=-1,length=nativeMin(args.length,funcsLength);++index=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):function(value){return isObjectLike(value)&&baseGetTag(value)==arrayBufferTag};function isArrayLike(value){return null!=value&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}var isBuffer=nativeIsBuffer||stubFalse,isDate=nodeIsDate?baseUnary(nodeIsDate):function(value){return isObjectLike(value)&&baseGetTag(value)==dateTag};function isError(value){if(!isObjectLike(value))return!1;var tag=baseGetTag(value);return tag==errorTag||"[object DOMException]"==tag||"string"==typeof value.message&&"string"==typeof value.name&&!isPlainObject(value)}function isFunction(value){if(!isObject(value))return!1;var tag=baseGetTag(value);return tag==funcTag||tag==genTag||"[object AsyncFunction]"==tag||"[object Proxy]"==tag}function isInteger(value){return"number"==typeof value&&value==toInteger(value)}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=9007199254740991}function isObject(value){var type=typeof value;return null!=value&&("object"==type||"function"==type)}function isObjectLike(value){return null!=value&&"object"==typeof value}var isMap=nodeIsMap?baseUnary(nodeIsMap):function(value){return isObjectLike(value)&&getTag(value)==mapTag};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}var isRegExp=nodeIsRegExp?baseUnary(nodeIsRegExp):function(value){return isObjectLike(value)&&baseGetTag(value)==regexpTag};var isSet=nodeIsSet?baseUnary(nodeIsSet):function(value){return isObjectLike(value)&&getTag(value)==setTag};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}var isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):function(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[baseGetTag(value)]};var lt=createRelationalOperation(baseLt),lte=createRelationalOperation((function(value,other){return value<=other}));function toArray(value){if(!value)return[];if(isArrayLike(value))return isString(value)?stringToArray(value):copyArray(value);if(symIterator&&value[symIterator])return function(iterator){for(var data,result=[];!(data=iterator.next()).done;)result.push(data.value);return result}(value[symIterator]());var tag=getTag(value);return(tag==mapTag?mapToArray:tag==setTag?setToArray:values)(value)}function toFinite(value){return value?Infinity===(value=toNumber(value))||-Infinity===value?17976931348623157e292*(value<0?-1:1):value==value?value:0:0===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,4294967295):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=baseTrim(value);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 toString(value){return null==value?"":baseToString(value)}var assign=createAssigner((function(object,source){if(isPrototype(source)||isArrayLike(source))copyObject(source,keys(source),object);else 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);var defaults=baseRest((function(object,sources){object=Object(object);var index=-1,length=sources.length,guard=length>2?sources[2]:undefined;for(guard&&isIterateeCall(sources[0],sources[1],guard)&&(length=1);++index1),path})),copyObject(object,getAllKeysIn(object),result),isDeep&&(result=baseClone(result,7,customOmitClone));for(var length=paths.length;length--;)baseUnset(result,paths[length]);return result}));var pick=flatRest((function(object,paths){return null==object?{}:function(object,paths){return basePickBy(object,paths,(function(value,path){return hasIn(object,path)}))}(object,paths)}));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])}))}var toPairs=createToPairs(keys),toPairsIn=createToPairs(keysIn);function values(object){return null==object?[]:baseValues(object,keys(object))}var camelCase=createCompounder((function(result,word,index){return word=word.toLowerCase(),result+(index?capitalize(word):word)}));function capitalize(string){return upperFirst(toString(string).toLowerCase())}function deburr(string){return(string=toString(string))&&string.replace(reLatin,deburrLetter).replace(reComboMark,"")}var 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");var snakeCase=createCompounder((function(result,word,index){return result+(index?"_":"")+word.toLowerCase()}));var startCase=createCompounder((function(result,word,index){return result+(index?" ":"")+upperFirst(word)}));var upperCase=createCompounder((function(result,word,index){return result+(index?" ":"")+word.toUpperCase()})),upperFirst=createCaseFirst("toUpperCase");function words(string,pattern,guard){return string=toString(string),undefined===(pattern=guard?undefined:pattern)?function(string){return reHasUnicodeWord.test(string)}(string)?function(string){return string.match(reUnicodeWord)||[]}(string):function(string){return string.match(reAsciiWord)||[]}(string):string.match(pattern)||[]}var 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}));function constant(value){return function(){return value}}var flow=createFlow(),flowRight=createFlow(!0);function identity(value){return value}function iteratee(func){return baseIteratee("function"==typeof func?func:baseClone(func,1))}var 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)}}));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 noop(){}var over=createOver(arrayMap),overEvery=createOver(arrayEvery),overSome=createOver(arraySome);function property(path){return isKey(path)?baseProperty(toKey(path)):function(path){return function(object){return baseGet(object,path)}}(path)}var range=createRange(),rangeRight=createRange(!0);function stubArray(){return[]}function stubFalse(){return!1}var add=createMathOperation((function(augend,addend){return augend+addend}),0),ceil=createRound("ceil"),divide=createMathOperation((function(dividend,divisor){return dividend/divisor}),1),floor=createRound("floor");var source,multiply=createMathOperation((function(multiplier,multiplicand){return multiplier*multiplicand}),1),round=createRound("round"),subtract=createMathOperation((function(minuend,subtrahend){return minuend-subtrahend}),0);return lodash.after=function(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)}},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=function(){if(!arguments.length)return[];var value=arguments[0];return isArray(value)?value:[value]},lodash.chain=chain,lodash.chunk=function(array,size,guard){size=(guard?isIterateeCall(array,size,guard):undefined===size)?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));indexlength?0:length+start),(end=void 0===end||end>length?length:toInteger(end))<0&&(end+=length),end=start>end?0:toLength(end);start>>0)?(string=toString(string))&&("string"==typeof separator||null!=separator&&!isRegExp(separator))&&!(separator=baseToString(separator))&&hasUnicode(string)?castSlice(stringToArray(string),0,limit):string.split(separator,limit):[]},lodash.spread=function(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)}))},lodash.tail=function(array){var length=null==array?0:array.length;return length?baseSlice(array,1,length):[]},lodash.take=function(array,n,guard){return array&&array.length?baseSlice(array,0,(n=guard||undefined===n?1:toInteger(n))<0?0:n):[]},lodash.takeRight=function(array,n,guard){var length=null==array?0:array.length;return length?baseSlice(array,(n=length-(n=guard||undefined===n?1:toInteger(n)))<0?0:n,length):[]},lodash.takeRightWhile=function(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),!1,!0):[]},lodash.takeWhile=function(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3)):[]},lodash.tap=function(value,interceptor){return interceptor(value),value},lodash.throttle=function(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})},lodash.thru=thru,lodash.toArray=toArray,lodash.toPairs=toPairs,lodash.toPairsIn=toPairsIn,lodash.toPath=function(value){return isArray(value)?arrayMap(value,toKey):isSymbol(value)?[value]:copyArray(stringToPath(toString(value)))},lodash.toPlainObject=toPlainObject,lodash.transform=function(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},lodash.unary=function(func){return ary(func,1)},lodash.union=union,lodash.unionBy=unionBy,lodash.unionWith=unionWith,lodash.uniq=function(array){return array&&array.length?baseUniq(array):[]},lodash.uniqBy=function(array,iteratee){return array&&array.length?baseUniq(array,getIteratee(iteratee,2)):[]},lodash.uniqWith=function(array,comparator){return comparator="function"==typeof comparator?comparator:undefined,array&&array.length?baseUniq(array,undefined,comparator):[]},lodash.unset=function(object,path){return null==object||baseUnset(object,path)},lodash.unzip=unzip,lodash.unzipWith=unzipWith,lodash.update=function(object,path,updater){return null==object?object:baseUpdate(object,path,castFunction(updater))},lodash.updateWith=function(object,path,updater,customizer){return customizer="function"==typeof customizer?customizer:undefined,null==object?object:baseUpdate(object,path,castFunction(updater),customizer)},lodash.values=values,lodash.valuesIn=function(object){return null==object?[]:baseValues(object,keysIn(object))},lodash.without=without,lodash.words=words,lodash.wrap=function(value,wrapper){return partial(castFunction(wrapper),value)},lodash.xor=xor,lodash.xorBy=xorBy,lodash.xorWith=xorWith,lodash.zip=zip,lodash.zipObject=function(props,values){return baseZipObject(props||[],values||[],assignValue)},lodash.zipObjectDeep=function(props,values){return baseZipObject(props||[],values||[],baseSet)},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=function(number,lower,upper){return undefined===upper&&(upper=lower,lower=undefined),undefined!==upper&&(upper=(upper=toNumber(upper))==upper?upper:0),undefined!==lower&&(lower=(lower=toNumber(lower))==lower?lower:0),baseClamp(toNumber(number),lower,upper)},lodash.clone=function(value){return baseClone(value,4)},lodash.cloneDeep=function(value){return baseClone(value,5)},lodash.cloneDeepWith=function(value,customizer){return baseClone(value,5,customizer="function"==typeof customizer?customizer:undefined)},lodash.cloneWith=function(value,customizer){return baseClone(value,4,customizer="function"==typeof customizer?customizer:undefined)},lodash.conformsTo=function(object,source){return null==source||baseConformsTo(object,source,keys(source))},lodash.deburr=deburr,lodash.defaultTo=function(value,defaultValue){return null==value||value!=value?defaultValue:value},lodash.divide=divide,lodash.endsWith=function(string,target,position){string=toString(string),target=baseToString(target);var length=string.length,end=position=undefined===position?length:baseClamp(toInteger(position),0,length);return(position-=target.length)>=0&&string.slice(position,end)==target},lodash.eq=eq,lodash.escape=function(string){return(string=toString(string))&&reHasUnescapedHtml.test(string)?string.replace(reUnescapedHtml,escapeHtmlChar):string},lodash.escapeRegExp=function(string){return(string=toString(string))&&reHasRegExpChar.test(string)?string.replace(reRegExpChar,"\\$&"):string},lodash.every=function(collection,predicate,guard){var func=isArray(collection)?arrayEvery:baseEvery;return guard&&isIterateeCall(collection,predicate,guard)&&(predicate=undefined),func(collection,getIteratee(predicate,3))},lodash.find=find,lodash.findIndex=findIndex,lodash.findKey=function(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwn)},lodash.findLast=findLast,lodash.findLastIndex=findLastIndex,lodash.findLastKey=function(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwnRight)},lodash.floor=floor,lodash.forEach=forEach,lodash.forEachRight=forEachRight,lodash.forIn=function(object,iteratee){return null==object?object:baseFor(object,getIteratee(iteratee,3),keysIn)},lodash.forInRight=function(object,iteratee){return null==object?object:baseForRight(object,getIteratee(iteratee,3),keysIn)},lodash.forOwn=function(object,iteratee){return object&&baseForOwn(object,getIteratee(iteratee,3))},lodash.forOwnRight=function(object,iteratee){return object&&baseForOwnRight(object,getIteratee(iteratee,3))},lodash.get=get,lodash.gt=gt,lodash.gte=gte,lodash.has=function(object,path){return null!=object&&hasPath(object,path,baseHas)},lodash.hasIn=hasIn,lodash.head=head,lodash.identity=identity,lodash.includes=function(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},lodash.indexOf=function(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)},lodash.inRange=function(number,start,end){return start=toFinite(start),undefined===end?(end=start,start=0):end=toFinite(end),function(number,start,end){return number>=nativeMin(start,end)&&number=-9007199254740991&&value<=9007199254740991},lodash.isSet=isSet,lodash.isString=isString,lodash.isSymbol=isSymbol,lodash.isTypedArray=isTypedArray,lodash.isUndefined=function(value){return undefined===value},lodash.isWeakMap=function(value){return isObjectLike(value)&&getTag(value)==weakMapTag},lodash.isWeakSet=function(value){return isObjectLike(value)&&"[object WeakSet]"==baseGetTag(value)},lodash.join=function(array,separator){return null==array?"":nativeJoin.call(array,separator)},lodash.kebabCase=kebabCase,lodash.last=last,lodash.lastIndexOf=function(array,value,fromIndex){var length=null==array?0:array.length;if(!length)return-1;var index=length;return undefined!==fromIndex&&(index=(index=toInteger(fromIndex))<0?nativeMax(length+index,0):nativeMin(index,length-1)),value==value?function(array,value,fromIndex){for(var index=fromIndex+1;index--;)if(array[index]===value)return index;return index}(array,value,index):baseFindIndex(array,baseIsNaN,index,!0)},lodash.lowerCase=lowerCase,lodash.lowerFirst=lowerFirst,lodash.lt=lt,lodash.lte=lte,lodash.max=function(array){return array&&array.length?baseExtremum(array,identity,baseGt):undefined},lodash.maxBy=function(array,iteratee){return array&&array.length?baseExtremum(array,getIteratee(iteratee,2),baseGt):undefined},lodash.mean=function(array){return baseMean(array,identity)},lodash.meanBy=function(array,iteratee){return baseMean(array,getIteratee(iteratee,2))},lodash.min=function(array){return array&&array.length?baseExtremum(array,identity,baseLt):undefined},lodash.minBy=function(array,iteratee){return array&&array.length?baseExtremum(array,getIteratee(iteratee,2),baseLt):undefined},lodash.stubArray=stubArray,lodash.stubFalse=stubFalse,lodash.stubObject=function(){return{}},lodash.stubString=function(){return""},lodash.stubTrue=function(){return!0},lodash.multiply=multiply,lodash.nth=function(array,n){return array&&array.length?baseNth(array,toInteger(n)):undefined},lodash.noConflict=function(){return root._===this&&(root._=oldDash),this},lodash.noop=noop,lodash.now=now,lodash.pad=function(string,length,chars){string=toString(string);var strLength=(length=toInteger(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)},lodash.padEnd=function(string,length,chars){string=toString(string);var strLength=(length=toInteger(length))?stringSize(string):0;return length&&strLengthupper){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)},lodash.reduce=function(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduce:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEach)},lodash.reduceRight=function(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduceRight:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEachRight)},lodash.repeat=function(string,n,guard){return n=(guard?isIterateeCall(string,n,guard):undefined===n)?1:toInteger(n),baseRepeat(toString(string),n)},lodash.replace=function(){var args=arguments,string=toString(args[0]);return args.length<3?string:string.replace(args[1],args[2])},lodash.result=function(object,path,defaultValue){var index=-1,length=(path=castPath(path,object)).length;for(length||(length=1,object=undefined);++index9007199254740991)return[];var index=4294967295,length=nativeMin(n,4294967295);n-=4294967295;for(var result=baseTimes(length,iteratee=getIteratee(iteratee));++index=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(undefined===separator)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,undefined===newEnd?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},lodash.unescape=function(string){return(string=toString(string))&&reHasEscapedHtml.test(string)?string.replace(reEscapedHtml,unescapeHtmlChar):string},lodash.uniqueId=function(prefix){var id=++idCounter;return toString(prefix)+id},lodash.upperCase=upperCase,lodash.upperFirst=upperFirst,lodash.each=forEach,lodash.eachRight=forEachRight,lodash.first=head,mixin(lodash,(source={},baseForOwn(lodash,(function(func,methodName){hasOwnProperty.call(lodash.prototype,methodName)||(source[methodName]=func)})),source),{chain:!1}),lodash.VERSION="4.17.21",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=undefined===n?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,4294967295),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=1==type||3==type;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)),undefined!==end&&(result=(end=toInteger(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(4294967295)},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+"";hasOwnProperty.call(realNames,key)||(realNames[key]=[]),realNames[key].push({name:methodName,func:lodashFunc})}})),realNames[createHybrid(undefined,2).name]=[{name:"wrapper",func:undefined}],LazyWrapper.prototype.clone=function(){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},LazyWrapper.prototype.reverse=function(){if(this.__filtered__){var result=new LazyWrapper(this);result.__dir__=-1,result.__filtered__=!0}else(result=this.clone()).__dir__*=-1;return result},LazyWrapper.prototype.value=function(){var array=this.__wrapped__.value(),dir=this.__dir__,isArr=isArray(array),isRight=dir<0,arrLength=isArr?array.length:0,view=function(start,end,transforms){var index=-1,length=transforms.length;for(;++index=this.__values__.length;return{done:done,value:done?undefined:this.__values__[this.__index__++]}},lodash.prototype.plant=function(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},lodash.prototype.reverse=function(){var value=this.__wrapped__;if(value instanceof LazyWrapper){var wrapped=value;return this.__actions__.length&&(wrapped=new LazyWrapper(this)),(wrapped=wrapped.reverse()).__actions__.push({func:thru,args:[reverse],thisArg:undefined}),new LodashWrapper(wrapped,this.__chain__)}return this.thru(reverse)},lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=function(){return baseWrapperValue(this.__wrapped__,this.__actions__)},lodash.prototype.first=lodash.prototype.head,symIterator&&(lodash.prototype[symIterator]=function(){return this}),lodash}();freeModule?((freeModule.exports=_)._=_,freeExports._=_):root._=_}).call(commonjsGlobal)}));const landscapeMargins={top:1800,right:1440,bottom:1800,left:1440,header:720,footer:720,gutter:0},portraitMargins={top:1440,right:1800,bottom:1440,left:1800,header:720,footer:720,gutter:0},defaultDocumentOptions={orientation:"portrait",margins:lodash.cloneDeep(portraitMargins),title:"",subject:"",creator:"html-to-docx",keywords:["html-to-docx"],description:"",lastModifiedBy:"html-to-docx",revision:1,createdAt:new Date,modifiedAt:new Date,headerType:"default",header:!1,footerType:"default",footer:!1,font:"Times New Roman",fontSize:22,complexScriptFontSize:22,table:{row:{cantSplit:!1}},pageNumber:!1,skipFirstHeaderFooter:!1,lineNumber:!1,lineNumberOptions:{countBy:1,start:0,restart:"continuous"}},paragraphBordersObject={top:{size:0,spacing:3,color:"FFFFFF"},left:{size:0,spacing:3,color:"FFFFFF"},bottom:{size:0,spacing:3,color:"FFFFFF"},right:{size:0,spacing:3,color:"FFFFFF"}},colorlessColors=["transparent","auto"],verticalAlignValues=["top","middle","bottom"],documentRelsXML=`\n \n\n \n \n \n \n \n \n`,relsXML=`\n \n\n \n \n \n \n`,fontTableXML=`\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n`,settingsXML=`\n \n\n \n \n \n \n \n \n`,webSettingsXML=`\n \n\n \n \n`;let pool,poolOffset,nanoid=(size=21)=>{var bytes;bytes=size-=0,!pool||pool.lengthpool.length&&(crypto.randomFillSync(pool),poolOffset=0),poolOffset+=bytes;let id="";for(let i=poolOffset-size;i=this.concurrency))if(0!==this.jobs.length){var self=this,job=this.jobs.shift(),once=!0,session=this.session,timeoutId=null,didTimeout=!1,resultIndex=null,timeout=job.hasOwnProperty("timeout")?job.timeout:this.timeout;timeout&&(timeoutId=setTimeout((function(){didTimeout=!0,self.listeners("timeout").length>0?self.emit("timeout",next,job):next()}),timeout),this.timers[timeoutId]=timeoutId),this.results&&(resultIndex=this.results.length,this.results[resultIndex]=null),this.pending++,self.emit("start",job);var promise=job(next);promise&&promise.then&&"function"==typeof promise.then&&promise.then((function(result){return next(null,result)})).catch((function(err){return next(err||!0)})),this.running&&this.jobs.length>0&&this.start()}else 0===this.pending&&done.call(this);function next(err,result){once&&self.session===session&&(once=!1,self.pending--,null!==timeoutId&&(delete self.timers[timeoutId],clearTimeout(timeoutId)),err?self.emit("error",err,job):!1===didTimeout&&(null!==resultIndex&&(self.results[resultIndex]=Array.prototype.slice.call(arguments,1)),self.emit("success",result,job)),self.session===session&&(0===self.pending&&0===self.jobs.length?done.call(self):self.running&&self.start()))}},Queue.prototype.stop=function(){this.running=!1},Queue.prototype.end=function(err){clearTimers.call(this),this.jobs.length=0,this.pending=0,done.call(this,err)},queue.default=_default;var bmp=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.BMP=void 0,exports.BMP={validate:buffer=>"BM"===buffer.toString("ascii",0,2),calculate:buffer=>({height:Math.abs(buffer.readInt32LE(22)),width:buffer.readUInt32LE(18)})}}));unwrapExports(bmp),bmp.BMP;var ico=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ICO=void 0;function getSizeFromOffset(buffer,offset){const value=buffer.readUInt8(offset);return 0===value?256:value}function getImageSize(buffer,imageIndex){const offset=6+16*imageIndex;return{height:getSizeFromOffset(buffer,offset+1),width:getSizeFromOffset(buffer,offset)}}exports.ICO={validate:buffer=>0===buffer.readUInt16LE(0)&&1===buffer.readUInt16LE(2),calculate(buffer){const nbImages=buffer.readUInt16LE(4),imageSize=getImageSize(buffer,0);if(1===nbImages)return imageSize;const imgs=[imageSize];for(let imageIndex=1;imageIndex0===buffer.readUInt16LE(0)&&2===buffer.readUInt16LE(2),calculate:buffer=>ico.ICO.calculate(buffer)}}));unwrapExports(cur),cur.CUR;var dds=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.DDS=void 0,exports.DDS={validate:buffer=>542327876===buffer.readUInt32LE(0),calculate:buffer=>({height:buffer.readUInt32LE(12),width:buffer.readUInt32LE(16)})}}));unwrapExports(dds),dds.DDS;var gif=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.GIF=void 0;const gifRegexp=/^GIF8[79]a/;exports.GIF={validate(buffer){const signature=buffer.toString("ascii",0,6);return gifRegexp.test(signature)},calculate:buffer=>({height:buffer.readUInt16LE(8),width:buffer.readUInt16LE(6)})}}));unwrapExports(gif),gif.GIF;var icns=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ICNS=void 0;const ICON_TYPE_SIZE={ICON:32,"ICN#":32,"icm#":16,icm4:16,icm8:16,"ics#":16,ics4:16,ics8:16,is32:16,s8mk:16,icp4:16,icl4:32,icl8:32,il32:32,l8mk:32,icp5:32,ic11:32,ich4:48,ich8:48,ih32:48,h8mk:48,icp6:64,ic12:32,it32:128,t8mk:128,ic07:128,ic08:256,ic13:256,ic09:512,ic14:512,ic10:1024};function readImageHeader(buffer,imageOffset){const imageLengthOffset=imageOffset+4;return[buffer.toString("ascii",imageOffset,imageLengthOffset),buffer.readUInt32BE(imageLengthOffset)]}function getImageSize(type){const size=ICON_TYPE_SIZE[type];return{width:size,height:size,type:type}}exports.ICNS={validate:buffer=>"icns"===buffer.toString("ascii",0,4),calculate(buffer){const bufferLength=buffer.length,fileLength=buffer.readUInt32BE(4);let imageOffset=8,imageHeader=readImageHeader(buffer,imageOffset),imageSize=getImageSize(imageHeader[0]);if(imageOffset+=imageHeader[1],imageOffset===fileLength)return imageSize;const result={height:imageSize.height,images:[imageSize],width:imageSize.width};for(;imageOffset"ff4fff51"===buffer.toString("hex",0,4),calculate:buffer=>({height:buffer.readUInt32BE(12),width:buffer.readUInt32BE(8)})}}));unwrapExports(j2c),j2c.J2C;var jp2=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.JP2=void 0;const BoxTypes_ftyp="66747970",BoxTypes_jp2h="6a703268",BoxTypes_jp__="6a502020",BoxTypes_rreq="72726571",parseIHDR=box=>({height:box.readUInt32BE(4),width:box.readUInt32BE(8)});exports.JP2={validate(buffer){const signature=buffer.toString("hex",4,8),signatureLength=buffer.readUInt32BE(0);if(signature!==BoxTypes_jp__||signatureLength<1)return!1;const ftypeBoxStart=signatureLength+4,ftypBoxLength=buffer.readUInt32BE(signatureLength);return buffer.slice(ftypeBoxStart,ftypeBoxStart+ftypBoxLength).toString("hex",0,4)===BoxTypes_ftyp},calculate(buffer){const signatureLength=buffer.readUInt32BE(0);let offset=signatureLength+4+buffer.readUInt16BE(signatureLength+2);switch(buffer.toString("hex",offset,offset+4)){case BoxTypes_rreq:return offset=offset+4+4+(box=>{const unit=box.readUInt8(0);let offset=1+2*unit;return offset=offset+2+box.readUInt16BE(offset)*(2+unit),offset+2+box.readUInt16BE(offset)*(16+unit)})(buffer.slice(offset+4)),parseIHDR(buffer.slice(offset+8,offset+24));case BoxTypes_jp2h:return parseIHDR(buffer.slice(offset+8,offset+24));default:throw new TypeError("Unsupported header found: "+buffer.toString("ascii",offset,offset+4))}}}}));unwrapExports(jp2),jp2.JP2;var readUInt_1=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.readUInt=void 0,exports.readUInt=function(buffer,bits,offset,isBigEndian){return offset=offset||0,buffer["readUInt"+bits+(isBigEndian?"BE":"LE")].call(buffer,offset)}}));unwrapExports(readUInt_1),readUInt_1.readUInt;var jpg=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.JPG=void 0;function isEXIF(buffer){return"45786966"===buffer.toString("hex",2,6)}function extractSize(buffer,index){return{height:buffer.readUInt16BE(index),width:buffer.readUInt16BE(index+2)}}function validateExifBlock(buffer,index){const exifBlock=buffer.slice(2,index),byteAlign=exifBlock.toString("hex",6,8),isBigEndian="4d4d"===byteAlign;if(isBigEndian||"4949"===byteAlign)return function(exifBlock,isBigEndian){const idfDirectoryEntries=(0,readUInt_1.readUInt)(exifBlock,16,14,isBigEndian);for(let directoryEntryNumber=0;directoryEntryNumberexifBlock.length)return;const block=exifBlock.slice(start,end);if(274===(0,readUInt_1.readUInt)(block,16,0,isBigEndian)){if(3!==(0,readUInt_1.readUInt)(block,16,2,isBigEndian))return;if(1!==(0,readUInt_1.readUInt)(block,32,4,isBigEndian))return;return(0,readUInt_1.readUInt)(block,16,8,isBigEndian)}}}(exifBlock,isBigEndian)}function validateBuffer(buffer,index){if(index>buffer.length)throw new TypeError("Corrupt JPG, exceeded buffer limits");if(255!==buffer[index])throw new TypeError("Invalid JPG, marker table corrupted")}exports.JPG={validate:buffer=>"ffd8"===buffer.toString("hex",0,2),calculate(buffer){let orientation,next;for(buffer=buffer.slice(4);buffer.length;){const i=buffer.readUInt16BE(0);if(isEXIF(buffer)&&(orientation=validateExifBlock(buffer,i)),validateBuffer(buffer,i),next=buffer[i+1],192===next||193===next||194===next){const size=extractSize(buffer,i+5);return orientation?{height:size.height,orientation:orientation,width:size.width}:size}buffer=buffer.slice(i+2)}throw new TypeError("Invalid JPG, no size found")}}}));unwrapExports(jpg),jpg.JPG;var ktx=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.KTX=void 0;exports.KTX={validate:buffer=>"KTX 11"===buffer.toString("ascii",1,7),calculate:buffer=>({height:buffer.readUInt32LE(40),width:buffer.readUInt32LE(36)})}}));unwrapExports(ktx),ktx.KTX;var png=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.PNG=void 0;exports.PNG={validate(buffer){if("PNG\r\n\n"===buffer.toString("ascii",1,8)){let chunkName=buffer.toString("ascii",12,16);if("CgBI"===chunkName&&(chunkName=buffer.toString("ascii",28,32)),"IHDR"!==chunkName)throw new TypeError("Invalid PNG");return!0}return!1},calculate:buffer=>"CgBI"===buffer.toString("ascii",12,16)?{height:buffer.readUInt32BE(36),width:buffer.readUInt32BE(32)}:{height:buffer.readUInt32BE(20),width:buffer.readUInt32BE(16)}}}));unwrapExports(png),png.PNG;var pnm=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.PNM=void 0;const PNMTypes={P1:"pbm/ascii",P2:"pgm/ascii",P3:"ppm/ascii",P4:"pbm",P5:"pgm",P6:"ppm",P7:"pam",PF:"pfm"},Signatures=Object.keys(PNMTypes),handlers={default:lines=>{let dimensions=[];for(;lines.length>0;){const line=lines.shift();if("#"!==line[0]){dimensions=line.split(" ");break}}if(2===dimensions.length)return{height:parseInt(dimensions[1],10),width:parseInt(dimensions[0],10)};throw new TypeError("Invalid PNM")},pam:lines=>{const size={};for(;lines.length>0;){const line=lines.shift();if(line.length>16||line.charCodeAt(0)>128)continue;const[key,value]=line.split(" ");if(key&&value&&(size[key.toLowerCase()]=parseInt(value,10)),size.height&&size.width)break}if(size.height&&size.width)return{height:size.height,width:size.width};throw new TypeError("Invalid PAM")}};exports.PNM={validate(buffer){const signature=buffer.toString("ascii",0,2);return Signatures.includes(signature)},calculate(buffer){const signature=buffer.toString("ascii",0,2),type=PNMTypes[signature],lines=buffer.toString("ascii",3).split(/[\r\n]+/);return(handlers[type]||handlers.default)(lines)}}}));unwrapExports(pnm),pnm.PNM;var psd=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.PSD=void 0,exports.PSD={validate:buffer=>"8BPS"===buffer.toString("ascii",0,4),calculate:buffer=>({height:buffer.readUInt32BE(14),width:buffer.readUInt32BE(18)})}}));unwrapExports(psd),psd.PSD;var svg=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.SVG=void 0;const svgReg=/"']|"[^"]*"|'[^']*')*>/,extractorRegExps={height:/\sheight=(['"])([^%]+?)\1/,root:svgReg,viewbox:/\sviewBox=(['"])(.+?)\1/i,width:/\swidth=(['"])([^%]+?)\1/},units={in:96,cm:96/2.54,em:16,ex:8,m:96/2.54*100,mm:96/2.54/10,pc:96/72/12,pt:96/72,px:1},unitsReg=new RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(units).join("|")})?$`);function parseLength(len){const m=unitsReg.exec(len);if(m)return Math.round(Number(m[1])*(units[m[2]]||1))}function parseViewbox(viewbox){const bounds=viewbox.split(" ");return{height:parseLength(bounds[3]),width:parseLength(bounds[2])}}exports.SVG={validate(buffer){const str=String(buffer);return svgReg.test(str)},calculate(buffer){const root=buffer.toString("utf8").match(extractorRegExps.root);if(root){const attrs=function(root){const width=root.match(extractorRegExps.width),height=root.match(extractorRegExps.height),viewbox=root.match(extractorRegExps.viewbox);return{height:height&&parseLength(height[2]),viewbox:viewbox&&parseViewbox(viewbox[2]),width:width&&parseLength(width[2])}}(root[0]);if(attrs.width&&attrs.height)return function(attrs){return{height:attrs.height,width:attrs.width}}(attrs);if(attrs.viewbox)return function(attrs,viewbox){const ratio=viewbox.width/viewbox.height;return attrs.width?{height:Math.floor(attrs.width/ratio),width:attrs.width}:attrs.height?{height:attrs.height,width:Math.floor(attrs.height*ratio)}:{height:viewbox.height,width:viewbox.width}}(attrs,attrs.viewbox)}throw new TypeError("Invalid SVG")}}}));unwrapExports(svg),svg.SVG;var tiff=createCommonjsModule((function(module,exports){function readValue(buffer,isBigEndian){const low=(0,readUInt_1.readUInt)(buffer,16,8,isBigEndian);return((0,readUInt_1.readUInt)(buffer,16,10,isBigEndian)<<16)+low}function nextTag(buffer){if(buffer.length>24)return buffer.slice(12)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TIFF=void 0;const signatures=["49492a00","4d4d002a"];exports.TIFF={validate:buffer=>signatures.includes(buffer.toString("hex",0,4)),calculate(buffer,filepath){if(!filepath)throw new TypeError("Tiff doesn't support buffer");const isBigEndian="BE"===function(buffer){const signature=buffer.toString("ascii",0,2);return"II"===signature?"LE":"MM"===signature?"BE":void 0}(buffer),ifdBuffer=function(buffer,filepath,isBigEndian){const ifdOffset=(0,readUInt_1.readUInt)(buffer,32,4,isBigEndian);let bufferSize=1024;const fileSize=fs.statSync(filepath).size;ifdOffset+bufferSize>fileSize&&(bufferSize=fileSize-ifdOffset-10);const endBuffer=Buffer.alloc(bufferSize),descriptor=fs.openSync(filepath,"r");return fs.readSync(descriptor,endBuffer,0,bufferSize,ifdOffset),fs.closeSync(descriptor),endBuffer.slice(2)}(buffer,filepath,isBigEndian),tags=function(buffer,isBigEndian){const tags={};let temp=buffer;for(;temp&&temp.length;){const code=(0,readUInt_1.readUInt)(temp,16,0,isBigEndian),type=(0,readUInt_1.readUInt)(temp,16,2,isBigEndian),length=(0,readUInt_1.readUInt)(temp,32,4,isBigEndian);if(0===code)break;1!==length||3!==type&&4!==type||(tags[code]=readValue(temp,isBigEndian)),temp=nextTag(temp)}return tags}(ifdBuffer,isBigEndian),width=tags[256],height=tags[257];if(!width||!height)throw new TypeError("Invalid Tiff. Missing tags");return{height:height,width:width}}}}));unwrapExports(tiff),tiff.TIFF;var webp=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.WEBP=void 0,exports.WEBP={validate(buffer){const riffHeader="RIFF"===buffer.toString("ascii",0,4),webpHeader="WEBP"===buffer.toString("ascii",8,12),vp8Header="VP8"===buffer.toString("ascii",12,15);return riffHeader&&webpHeader&&vp8Header},calculate(buffer){const chunkHeader=buffer.toString("ascii",12,16);if(buffer=buffer.slice(20,30),"VP8X"===chunkHeader){const extendedHeader=buffer[0],validEnd=0==(1&extendedHeader);if(0==(192&extendedHeader)&&validEnd)return function(buffer){return{height:1+buffer.readUIntLE(7,3),width:1+buffer.readUIntLE(4,3)}}(buffer);throw new TypeError("Invalid WebP")}if("VP8 "===chunkHeader&&47!==buffer[0])return function(buffer){return{height:16383&buffer.readInt16LE(8),width:16383&buffer.readInt16LE(6)}}(buffer);const signature=buffer.toString("hex",3,6);if("VP8L"===chunkHeader&&"9d012a"!==signature)return function(buffer){return{height:1+((15&buffer[4])<<10|buffer[3]<<2|(192&buffer[2])>>6),width:1+((63&buffer[2])<<8|buffer[1])}}(buffer);throw new TypeError("Invalid WebP")}}}));unwrapExports(webp),webp.WEBP;var types=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.typeHandlers=void 0,exports.typeHandlers={bmp:bmp.BMP,cur:cur.CUR,dds:dds.DDS,gif:gif.GIF,icns:icns.ICNS,ico:ico.ICO,j2c:j2c.J2C,jp2:jp2.JP2,jpg:jpg.JPG,ktx:ktx.KTX,png:png.PNG,pnm:pnm.PNM,psd:psd.PSD,svg:svg.SVG,tiff:tiff.TIFF,webp:webp.WEBP}}));unwrapExports(types),types.typeHandlers;var detector_1=createCommonjsModule((function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.detector=void 0;const keys=Object.keys(types.typeHandlers),firstBytes={56:"psd",66:"bmp",68:"dds",71:"gif",73:"tiff",77:"tiff",82:"webp",105:"icns",137:"png",255:"jpg"};exports.detector=function(buffer){const byte=buffer[0];if(byte in firstBytes){const type=firstBytes[byte];if(type&&types.typeHandlers[type].validate(buffer))return type}return keys.find((key=>types.typeHandlers[key].validate(buffer)))}}));unwrapExports(detector_1),detector_1.detector;var dist=createCommonjsModule((function(module,exports){var __awaiter=commonjsGlobal&&commonjsGlobal.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){var value;result.done?resolve(result.value):(value=result.value,value instanceof P?value:new P((function(resolve){resolve(value)}))).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.types=exports.setConcurrency=exports.disableTypes=exports.disableFS=exports.imageSize=void 0;const queue$1=new queue.default({concurrency:100,autostart:!0}),globalOptions={disabledFS:!1,disabledTypes:[]};function lookup(buffer,filepath){const type=(0,detector_1.detector)(buffer);if(void 0!==type){if(globalOptions.disabledTypes.indexOf(type)>-1)throw new TypeError("disabled file type: "+type);if(type in types.typeHandlers){const size=types.typeHandlers[type].calculate(buffer,filepath);if(void 0!==size)return size.type=type,size}}throw new TypeError("unsupported file type: "+type+" (file: "+filepath+")")}function imageSize(input,callback){if(Buffer.isBuffer(input))return lookup(input);if("string"!=typeof input||globalOptions.disabledFS)throw new TypeError("invalid invocation. input should be a Buffer");const filepath=path.resolve(input);if("function"!=typeof callback){const buffer=function(filepath){const descriptor=fs.openSync(filepath,"r");try{const{size:size}=fs.fstatSync(descriptor);if(size<=0)throw new Error("Empty file");const bufferSize=Math.min(size,524288),buffer=Buffer.alloc(bufferSize);return fs.readSync(descriptor,buffer,0,bufferSize,0),buffer}finally{fs.closeSync(descriptor)}}(filepath);return lookup(buffer,filepath)}queue$1.push((()=>function(filepath){return __awaiter(this,void 0,void 0,(function*(){const handle=yield fs.promises.open(filepath,"r");try{const{size:size}=yield handle.stat();if(size<=0)throw new Error("Empty file");const bufferSize=Math.min(size,524288),buffer=Buffer.alloc(bufferSize);return yield handle.read(buffer,0,bufferSize,0),buffer}finally{yield handle.close()}}))}(filepath).then((buffer=>process.nextTick(callback,null,lookup(buffer,filepath)))).catch(callback)))}module.exports=exports=imageSize,exports.default=imageSize,exports.imageSize=imageSize;exports.disableFS=v=>{globalOptions.disabledFS=v};exports.disableTypes=types=>{globalOptions.disabledTypes=types};exports.setConcurrency=c=>{queue$1.concurrency=c},exports.types=Object.keys(types.typeHandlers)})),sizeOf=unwrapExports(dist);dist.types,dist.setConcurrency,dist.disableTypes,dist.disableFS,dist.imageSize;const rgbRegex=/rgb\((\d+),\s*([\d.]+),\s*([\d.]+)\)/i,hslRegex=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/i,hexRegex=/#([0-9A-F]{6})/i,hex3Regex=/#([0-9A-F])([0-9A-F])([0-9A-F])/i,rgbToHex=(red,green,blue)=>[red,green,blue].map((x=>1===(x=parseInt(x).toString(16)).length?`0${x}`:x)).join(""),pixelRegex=/([\d.]+)px/i,percentageRegex=/([\d.]+)%/i,pointRegex=/([\d.]+)pt/i,cmRegex=/([\d.]+)cm/i,inchRegex=/([\d.]+)in/i,pixelToEMU=pixelValue=>Math.round(9525*pixelValue),EMUToTWIP=EMUValue=>Math.round(EMUValue/635),pointToTWIP=pointValue=>Math.round(20*pointValue),pointToHIP=pointValue=>Math.round(2*pointValue),pixelToTWIP=pixelValue=>EMUToTWIP(pixelToEMU(pixelValue)),pixelToHIP=pixelValue=>{return TWIPValue=EMUToTWIP(pixelToEMU(pixelValue)),Math.round(TWIPValue/10);var TWIPValue},inchToTWIP=inchValue=>pointToTWIP((inchValue=>Math.round(72*inchValue))(inchValue)),pixelToPoint=pixelValue=>{return HIPValue=pixelToHIP(pixelValue),Math.round(HIPValue/2);var HIPValue},pointToEIP=PointValue=>Math.round(8*PointValue),vNodeHasChildren=vNode=>vNode&&vNode.children&&Array.isArray(vNode.children)&&vNode.children.length,fixupColorCode=colorCodeString=>{if(Object.prototype.hasOwnProperty.call(colorNames,colorCodeString.toLowerCase())){const[red,green,blue]=colorNames[colorCodeString.toLowerCase()];return rgbToHex(red,green,blue)}if(rgbRegex.test(colorCodeString)){const matchedParts=colorCodeString.match(rgbRegex),red=matchedParts[1],green=matchedParts[2],blue=matchedParts[3];return rgbToHex(red,green,blue)}if(hslRegex.test(colorCodeString)){const matchedParts=colorCodeString.match(hslRegex);return((hue,saturation,luminosity)=>{let red,green,blue;if(hue/=360,luminosity/=100,0==(saturation/=100))red=green=blue=luminosity;else{const hue2rgb=(p,q,t)=>(t<0&&(t+=1),t>1&&(t-=1),t<1/6?p+6*(q-p)*t:t<.5?q:t<2/3?p+(q-p)*(2/3-t)*6:p),q=luminosity<.5?luminosity*(1+saturation):luminosity+saturation-luminosity*saturation,p=2*luminosity-q;red=hue2rgb(p,q,hue+1/3),green=hue2rgb(p,q,hue),blue=hue2rgb(p,q,hue-1/3)}return[red,green,blue].map((x=>{const hex=Math.round(255*x).toString(16);return 1===hex.length?`0${hex}`:hex})).join("")})(matchedParts[1],matchedParts[2],matchedParts[3])}if(hexRegex.test(colorCodeString)){return colorCodeString.match(hexRegex)[1]}if(hex3Regex.test(colorCodeString)){const matchedParts=colorCodeString.match(hex3Regex);return((red,green,blue)=>[red,green,blue].map((x=>`${x}${x}`)).join(""))(matchedParts[1],matchedParts[2],matchedParts[3])}return"000000"},buildRunFontFragment=(fontName="Times New Roman")=>fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","rFonts").att("@w","ascii",fontName).att("@w","hAnsi",fontName).up(),buildShading=colorCode=>fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","shd").att("@w","val","clear").att("@w","fill",colorCode).up(),buildHighlight=(color="yellow")=>fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","highlight").att("@w","val",color).up(),buildVertAlign=(type="baseline")=>fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","vertAlign").att("@w","val",type).up(),buildBold=()=>fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","b").up(),buildItalics=()=>fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","i").up(),buildUnderline=(type="single")=>fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","u").att("@w","val",type).up(),buildBorder=(borderSide="top",borderSize=0,borderSpacing=0,borderColor=fixupColorCode("black"),borderStroke="single")=>fragment({namespaceAlias:{w:namespaces_w}}).ele("@w",borderSide).att("@w","val",borderStroke).att("@w","sz",borderSize).att("@w","space",borderSpacing).att("@w","color",borderColor).up(),buildTextElement=text=>fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","t").att("@xml","space","preserve").txt(text).up(),buildRunProperties=attributes=>{const runPropertiesFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","rPr");return attributes&&attributes.constructor===Object&&Object.keys(attributes).forEach((key=>{switch(key){case"strong":runPropertiesFragment.import(buildBold());break;case"i":runPropertiesFragment.import(buildItalics());break;case"u":runPropertiesFragment.import(buildUnderline());break;case"sub":runPropertiesFragment.import(buildVertAlign("subscript"));break;case"sup":runPropertiesFragment.import(buildVertAlign("superscript"));break;case"color":runPropertiesFragment.import((colorCode=attributes[key],fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","color").att("@w","val",colorCode).up()));break;case"backgroundColor":runPropertiesFragment.import(buildShading(attributes[key]));break;case"fontSize":runPropertiesFragment.import((fontSize=attributes[key],fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","sz").att("@w","val",fontSize).up()));break;case"hyperlink":runPropertiesFragment.import(((type="Hyperlink")=>fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","rStyle").att("@w","val",type).up())("Hyperlink"));break;case"highlightColor":runPropertiesFragment.import(buildHighlight(attributes[key]));break;case"font":runPropertiesFragment.import(buildRunFontFragment("Courier"))}var fontSize,colorCode})),runPropertiesFragment.up(),runPropertiesFragment},buildTextFormatting=vNode=>{switch(vNode.tagName){case"strong":case"b":return buildBold();case"em":case"i":return buildItalics();case"ins":case"u":return buildUnderline();case"strike":case"del":case"s":return fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","strike").att("@w","val",!0).up();case"sub":return buildVertAlign("subscript");case"sup":return buildVertAlign("superscript");case"mark":return buildHighlight();case"code":return buildHighlight("lightGray");case"pre":return buildRunFontFragment("Courier")}},buildRun=(vNode,attributes)=>{const runFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","r"),runPropertiesFragment=buildRunProperties(lodash.cloneDeep(attributes));if(isVnode(vNode)&&["span","strong","b","em","i","u","ins","strike","del","s","sub","sup","mark","blockquote","code","pre"].includes(vNode.tagName)){const runFragmentsArray=[];let vNodes=[vNode],tempAttributes=lodash.cloneDeep(attributes),tempRunFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","r");for(;vNodes.length;){const tempVNode=vNodes.shift();if(isVtext(tempVNode)){const textFragment=buildTextElement(tempVNode.text),tempRunPropertiesFragment=buildRunProperties({...attributes,...tempAttributes});tempRunFragment.import(tempRunPropertiesFragment),tempRunFragment.import(textFragment),runFragmentsArray.push(tempRunFragment),tempAttributes=lodash.cloneDeep(attributes),tempRunFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","r")}else if(isVnode(tempVNode)&&["strong","b","em","i","u","ins","strike","del","s","sub","sup","mark","code","pre"].includes(tempVNode.tagName)){switch(tempAttributes={},tempVNode.tagName){case"strong":case"b":tempAttributes.strong=!0;break;case"i":tempAttributes.i=!0;break;case"u":tempAttributes.u=!0;break;case"sub":tempAttributes.sub=!0;break;case"sup":tempAttributes.sup=!0}const formattingFragment=buildTextFormatting(tempVNode);runPropertiesFragment.import(formattingFragment)}tempVNode.children&&tempVNode.children.length&&(tempVNode.children.length>1&&(attributes={...attributes,...tempAttributes}),vNodes=tempVNode.children.slice().concat(vNodes))}if(runFragmentsArray.length)return runFragmentsArray}if(runFragment.import(runPropertiesFragment),isVtext(vNode)){const textFragment=buildTextElement(vNode.text);runFragment.import(textFragment)}else if(attributes&&"picture"===attributes.type){const{type:type,inlineOrAnchored:inlineOrAnchored,...otherAttributes}=attributes,imageFragment=buildDrawing(inlineOrAnchored,type,otherAttributes);runFragment.import(imageFragment)}else if(isVnode(vNode)&&"br"===vNode.tagName){const lineBreakFragment=((type="textWrapping")=>fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","br").att("@w","type",type).up())();runFragment.import(lineBreakFragment)}return runFragment.up(),runFragment},fixupLineHeight=(lineHeight,fontSize)=>{if(isNaN(lineHeight))return 240;if(fontSize){return HIPValue=+lineHeight*fontSize,Math.round(10*HIPValue)}return 240*+lineHeight;var HIPValue},fixupFontSize$1=fontSizeString=>{if(pointRegex.test(fontSizeString)){const matchedParts=fontSizeString.match(pointRegex);return pointToHIP(matchedParts[1])}if(pixelRegex.test(fontSizeString)){const matchedParts=fontSizeString.match(pixelRegex);return pixelToHIP(matchedParts[1])}},fixupMargin=marginString=>{if(pointRegex.test(marginString)){const matchedParts=marginString.match(pointRegex);return pointToTWIP(matchedParts[1])}if(pixelRegex.test(marginString)){const matchedParts=marginString.match(pixelRegex);return pixelToTWIP(matchedParts[1])}},buildRunOrRuns=(vNode,attributes)=>{if(isVnode(vNode)&&"span"===vNode.tagName){let runFragments=[];for(let index=0;index{if(isVnode(vNode)&&"a"===vNode.tagName){const relationshipId=docxDocumentInstance.createDocumentRelationships(docxDocumentInstance.relationshipFilename,"hyperlink",vNode.properties&&vNode.properties.href?vNode.properties.href:""),hyperlinkFragment=fragment({namespaceAlias:{w:namespaces_w,r:namespaces_r}}).ele("@w","hyperlink").att("@r","id",`rId${relationshipId}`),modifiedAttributes={...attributes};modifiedAttributes.hyperlink=!0;const runFragments=buildRunOrRuns(vNode.children[0],modifiedAttributes);if(Array.isArray(runFragments))for(let index=0;index("justify"===horizontalAlignment&&(horizontalAlignment="both"),fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","jc").att("@w","val",horizontalAlignment).up()),buildParagraphProperties=attributes=>{const paragraphPropertiesFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","pPr");if(attributes&&attributes.constructor===Object){Object.keys(attributes).forEach((key=>{switch(key){case"numbering":const{levelId:levelId,numberingId:numberingId}=attributes[key],numberingPropertiesFragment=((levelId,numberingId)=>fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","numPr").ele("@w","ilvl").att("@w","val",String(levelId)).up().ele("@w","numId").att("@w","val",String(numberingId)).up().up())(levelId,numberingId);paragraphPropertiesFragment.import(numberingPropertiesFragment),delete attributes.numbering;break;case"textAlign":const horizontalAlignmentFragment=buildHorizontalAlignment(attributes[key]);paragraphPropertiesFragment.import(horizontalAlignmentFragment),delete attributes.textAlign;break;case"backgroundColor":if("block"===attributes.display){const shadingFragment=buildShading(attributes[key]);paragraphPropertiesFragment.import(shadingFragment);const paragraphBorderFragment=(()=>{const paragraphBorderFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","pBdr"),bordersObject=lodash.cloneDeep(paragraphBordersObject);return Object.keys(bordersObject).forEach((borderName=>{if(bordersObject[borderName]){const{size:size,spacing:spacing,color:color}=bordersObject[borderName],borderFragment=buildBorder(borderName,size,spacing,color);paragraphBorderFragment.import(borderFragment)}})),paragraphBorderFragment.up(),paragraphBorderFragment})();paragraphPropertiesFragment.import(paragraphBorderFragment),delete attributes.backgroundColor}break;case"paragraphStyle":const pStyleFragment=((style="Normal")=>fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","pStyle").att("@w","val",style).up())(attributes.paragraphStyle);paragraphPropertiesFragment.import(pStyleFragment),delete attributes.paragraphStyle;break;case"indentation":const indentationFragment=(({left:left,right:right})=>{const indentationFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","ind");return left&&indentationFragment.att("@w","left",left),right&&indentationFragment.att("@w","right",right),indentationFragment.up(),indentationFragment})(attributes[key]);paragraphPropertiesFragment.import(indentationFragment),delete attributes.indentation}}));const spacingFragment=((lineSpacing,beforeSpacing,afterSpacing)=>{const spacingFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","spacing");return lineSpacing&&spacingFragment.att("@w","line",lineSpacing),beforeSpacing&&spacingFragment.att("@w","before",beforeSpacing),afterSpacing&&spacingFragment.att("@w","after",afterSpacing),spacingFragment.att("@w","lineRule","exact").up(),spacingFragment})(attributes.lineHeight,attributes.beforeSpacing,attributes.afterSpacing);delete attributes.lineHeight,delete attributes.beforeSpacing,delete attributes.afterSpacing,paragraphPropertiesFragment.import(spacingFragment)}return paragraphPropertiesFragment.up(),paragraphPropertiesFragment},computeImageDimensions=(vNode,attributes)=>{const{maximumWidth:maximumWidth,originalWidth:originalWidth,originalHeight:originalHeight}=attributes,aspectRatio=originalWidth/originalHeight,maximumWidthInEMU=(TWIPValue=maximumWidth,Math.round(635*TWIPValue));var TWIPValue;let modifiedHeight,modifiedWidth,originalWidthInEMU=pixelToEMU(originalWidth),originalHeightInEMU=pixelToEMU(originalHeight);if(originalWidthInEMU>maximumWidthInEMU&&(originalWidthInEMU=maximumWidthInEMU,originalHeightInEMU=Math.round(originalWidthInEMU/aspectRatio)),vNode.properties&&vNode.properties.style){if(vNode.properties.style.width)if("auto"!==vNode.properties.style.width){if(pixelRegex.test(vNode.properties.style.width))modifiedWidth=pixelToEMU(vNode.properties.style.width.match(pixelRegex)[1]);else if(percentageRegex.test(vNode.properties.style.width)){const percentageValue=vNode.properties.style.width.match(percentageRegex)[1];modifiedWidth=Math.round(percentageValue/100*originalWidthInEMU)}}else vNode.properties.style.height&&"auto"===vNode.properties.style.height&&(modifiedWidth=originalWidthInEMU,modifiedHeight=originalHeightInEMU);if(vNode.properties.style.height)if("auto"!==vNode.properties.style.height){if(pixelRegex.test(vNode.properties.style.height))modifiedHeight=pixelToEMU(vNode.properties.style.height.match(pixelRegex)[1]);else if(percentageRegex.test(vNode.properties.style.height)){const percentageValue=vNode.properties.style.width.match(percentageRegex)[1];modifiedHeight=Math.round(percentageValue/100*originalHeightInEMU),modifiedWidth||(modifiedWidth=Math.round(modifiedHeight*aspectRatio))}}else modifiedWidth?modifiedHeight||(modifiedHeight=Math.round(modifiedWidth/aspectRatio)):(modifiedHeight=originalHeightInEMU,modifiedWidth=originalWidthInEMU);modifiedWidth&&!modifiedHeight?modifiedHeight=Math.round(modifiedWidth/aspectRatio):modifiedHeight&&!modifiedWidth&&(modifiedWidth=Math.round(modifiedHeight*aspectRatio))}else modifiedWidth=originalWidthInEMU,modifiedHeight=originalHeightInEMU;attributes.width=modifiedWidth,attributes.height=modifiedHeight},buildParagraph=(vNode,attributes,docxDocumentInstance)=>{const paragraphFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","p"),modifiedAttributes={...attributes};if(isVnode(vNode)&&vNode.properties&&vNode.properties.style){if(vNode.properties.style.color&&!colorlessColors.includes(vNode.properties.style.color)&&(modifiedAttributes.color=fixupColorCode(vNode.properties.style.color)),vNode.properties.style["background-color"]&&!colorlessColors.includes(vNode.properties.style["background-color"])&&(modifiedAttributes.backgroundColor=fixupColorCode(vNode.properties.style["background-color"])),vNode.properties.style["vertical-align"]&&verticalAlignValues.includes(vNode.properties.style["vertical-align"])&&(modifiedAttributes.verticalAlign=vNode.properties.style["vertical-align"]),vNode.properties.style["text-align"]&&["left","right","center","justify"].includes(vNode.properties.style["text-align"])&&(modifiedAttributes.textAlign=vNode.properties.style["text-align"]),vNode.properties.style["font-weight"]&&"bold"===vNode.properties.style["font-weight"]&&(modifiedAttributes.strong=vNode.properties.style["font-weight"]),vNode.properties.style["font-size"]&&(modifiedAttributes.fontSize=fixupFontSize$1(vNode.properties.style["font-size"])),vNode.properties.style["line-height"]&&(modifiedAttributes.lineHeight=fixupLineHeight(vNode.properties.style["line-height"],vNode.properties.style["font-size"]?fixupFontSize$1(vNode.properties.style["font-size"]):null)),vNode.properties.style["margin-left"]||vNode.properties.style["margin-right"]){const leftMargin=fixupMargin(vNode.properties.style["margin-left"]),rightMargin=fixupMargin(vNode.properties.style["margin-right"]),indentation={};leftMargin&&(indentation.left=leftMargin),rightMargin&&(indentation.right=rightMargin),(leftMargin||rightMargin)&&(modifiedAttributes.indentation=indentation)}vNode.properties.style.display&&(modifiedAttributes.display=vNode.properties.style.display)}isVnode(vNode)&&"blockquote"===vNode.tagName?(modifiedAttributes.indentation={left:284},modifiedAttributes.textAlign="justify"):isVnode(vNode)&&"code"===vNode.tagName?modifiedAttributes.highlightColor="lightGray":isVnode(vNode)&&"pre"===vNode.tagName&&(modifiedAttributes.font="Courier");const paragraphPropertiesFragment=buildParagraphProperties(modifiedAttributes);if(paragraphFragment.import(paragraphPropertiesFragment),isVnode(vNode)&&vNodeHasChildren(vNode))if(["span","strong","b","em","i","u","ins","strike","del","s","sub","sup","mark","a","code","pre"].includes(vNode.tagName)){const runOrHyperlinkFragments=buildRunOrHyperLink(vNode,modifiedAttributes,docxDocumentInstance);if(Array.isArray(runOrHyperlinkFragments))for(let iteratorIndex=0;iteratorIndex{const tableCellPropertiesFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","tcPr");return attributes&&attributes.constructor===Object&&Object.keys(attributes).forEach((key=>{switch(key){case"backgroundColor":const shadingFragment=buildShading(attributes[key]);tableCellPropertiesFragment.import(shadingFragment),delete attributes.backgroundColor;break;case"verticalAlign":const verticalAlignmentFragment=("middle"===(verticalAlignment=attributes[key]).toLowerCase()&&(verticalAlignment="center"),fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","vAlign").att("@w","val",verticalAlignment).up());tableCellPropertiesFragment.import(verticalAlignmentFragment),delete attributes.verticalAlign;break;case"colSpan":const gridSpanFragment=(spanValue=attributes[key],fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","gridSpan").att("@w","val",spanValue).up());tableCellPropertiesFragment.import(gridSpanFragment),delete attributes.colSpan;break;case"tableCellBorder":const tableCellBorderFragment=(tableCellBorder=>{const tableCellBordersFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","tcBorders"),{color:color,stroke:stroke,...borders}=tableCellBorder;return Object.keys(borders).forEach((border=>{if(tableCellBorder[border]){const borderFragment=buildBorder(border,tableCellBorder[border],0,color,stroke);tableCellBordersFragment.import(borderFragment)}})),tableCellBordersFragment.up(),tableCellBordersFragment})(attributes[key]);tableCellPropertiesFragment.import(tableCellBorderFragment),delete attributes.tableCellBorder;break;case"rowSpan":const verticalMergeFragment=((verticalMerge="continue")=>fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","vMerge").att("@w","val",verticalMerge).up())(attributes[key]);tableCellPropertiesFragment.import(verticalMergeFragment),delete attributes.rowSpan}var spanValue,verticalAlignment})),tableCellPropertiesFragment.up(),tableCellPropertiesFragment},fixupTableCellBorder=(vNode,attributes)=>{if(Object.prototype.hasOwnProperty.call(vNode.properties.style,"border"))if("none"===vNode.properties.style.border||0===vNode.properties.style.border)attributes.tableCellBorder={};else{const[borderSize,borderStroke,borderColor]=cssBorderParser(vNode.properties.style.border);attributes.tableCellBorder={top:borderSize,left:borderSize,bottom:borderSize,right:borderSize,color:borderColor,stroke:borderStroke}}if(vNode.properties.style["border-top"]&&"0"===vNode.properties.style["border-top"])attributes.tableCellBorder={...attributes.tableCellBorder,top:0};else if(vNode.properties.style["border-top"]&&"0"!==vNode.properties.style["border-top"]){const[borderSize,borderStroke,borderColor]=cssBorderParser(vNode.properties.style["border-top"]);attributes.tableCellBorder={...attributes.tableCellBorder,top:borderSize,color:borderColor,stroke:borderStroke}}if(vNode.properties.style["border-left"]&&"0"===vNode.properties.style["border-left"])attributes.tableCellBorder={...attributes.tableCellBorder,left:0};else if(vNode.properties.style["border-left"]&&"0"!==vNode.properties.style["border-left"]){const[borderSize,borderStroke,borderColor]=cssBorderParser(vNode.properties.style["border-left"]);attributes.tableCellBorder={...attributes.tableCellBorder,left:borderSize,color:borderColor,stroke:borderStroke}}if(vNode.properties.style["border-bottom"]&&"0"===vNode.properties.style["border-bottom"])attributes.tableCellBorder={...attributes.tableCellBorder,bottom:0};else if(vNode.properties.style["border-bottom"]&&"0"!==vNode.properties.style["border-bottom"]){const[borderSize,borderStroke,borderColor]=cssBorderParser(vNode.properties.style["border-bottom"]);attributes.tableCellBorder={...attributes.tableCellBorder,bottom:borderSize,color:borderColor,stroke:borderStroke}}if(vNode.properties.style["border-right"]&&"0"===vNode.properties.style["border-right"])attributes.tableCellBorder={...attributes.tableCellBorder,right:0};else if(vNode.properties.style["border-right"]&&"0"!==vNode.properties.style["border-right"]){const[borderSize,borderStroke,borderColor]=cssBorderParser(vNode.properties.style["border-right"]);attributes.tableCellBorder={...attributes.tableCellBorder,right:borderSize,color:borderColor,stroke:borderStroke}}},buildTableCell=(vNode,attributes,rowSpanMap,columnIndex,docxDocumentInstance)=>{const tableCellFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","tc"),modifiedAttributes={...attributes};if(isVnode(vNode)&&vNode.properties){if(vNode.properties.rowSpan)rowSpanMap.set(columnIndex.index,{rowSpan:vNode.properties.rowSpan-1,colSpan:0}),modifiedAttributes.rowSpan="restart";else{const previousSpanObject=rowSpanMap.get(columnIndex.index);rowSpanMap.set(columnIndex.index,Object.assign({},previousSpanObject,{rowSpan:0,colSpan:previousSpanObject&&previousSpanObject.colSpan||0}))}if(vNode.properties.colSpan||vNode.properties.style&&vNode.properties.style["column-span"]){modifiedAttributes.colSpan=vNode.properties.colSpan||vNode.properties.style&&vNode.properties.style["column-span"];const previousSpanObject=rowSpanMap.get(columnIndex.index);rowSpanMap.set(columnIndex.index,Object.assign({},previousSpanObject,{colSpan:parseInt(modifiedAttributes.colSpan)||0})),columnIndex.index+=parseInt(modifiedAttributes.colSpan)-1}vNode.properties.style&&(vNode.properties.style.color&&!colorlessColors.includes(vNode.properties.style.color)&&(modifiedAttributes.color=fixupColorCode(vNode.properties.style.color)),vNode.properties.style["background-color"]&&!colorlessColors.includes(vNode.properties.style["background-color"])&&(modifiedAttributes.backgroundColor=fixupColorCode(vNode.properties.style["background-color"])),vNode.properties.style["vertical-align"]&&verticalAlignValues.includes(vNode.properties.style["vertical-align"])&&(modifiedAttributes.verticalAlign=vNode.properties.style["vertical-align"]),fixupTableCellBorder(vNode,modifiedAttributes))}const tableCellPropertiesFragment=buildTableCellProperties(modifiedAttributes);if(tableCellFragment.import(tableCellPropertiesFragment),vNodeHasChildren(vNode))for(let index=0;index{const rowSpanCellFragments=[];let spanObject=rowSpanMap.get(columnIndex.index);for(;spanObject&&spanObject.rowSpan;){const rowSpanCellFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","tc"),tableCellPropertiesFragment=buildTableCellProperties({...attributes,rowSpan:"continue",colSpan:spanObject.colSpan?spanObject.colSpan:0});rowSpanCellFragment.import(tableCellPropertiesFragment);const paragraphFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","p").up();rowSpanCellFragment.import(paragraphFragment),rowSpanCellFragment.up(),rowSpanCellFragments.push(rowSpanCellFragment),spanObject.rowSpan-1==0?rowSpanMap.delete(columnIndex.index):rowSpanMap.set(columnIndex.index,{rowSpan:spanObject.rowSpan-1,colSpan:spanObject.colSpan||0}),columnIndex.index+=spanObject.colSpan||1,spanObject=rowSpanMap.get(columnIndex.index)}return rowSpanCellFragments},buildTableRowProperties=attributes=>{const tableRowPropertiesFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","trPr");return attributes&&attributes.constructor===Object&&Object.keys(attributes).forEach((key=>{switch(key){case"tableRowHeight":const tableRowHeightFragment=(tableRowHeight=attributes[key],fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","trHeight").att("@w","val",tableRowHeight).att("@w","hRule","atLeast").up());tableRowPropertiesFragment.import(tableRowHeightFragment),delete attributes.tableRowHeight;break;case"rowCantSplit":if(attributes.rowCantSplit){const cantSplitFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","cantSplit").up();tableRowPropertiesFragment.import(cantSplitFragment),delete attributes.rowCantSplit}}var tableRowHeight})),tableRowPropertiesFragment.up(),tableRowPropertiesFragment},buildTableRow=(vNode,attributes,rowSpanMap,docxDocumentInstance)=>{const tableRowFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","tr"),modifiedAttributes={...attributes};isVnode(vNode)&&vNode.properties&&((vNode.properties.style&&vNode.properties.style.height||vNode.children[0]&&isVnode(vNode.children[0])&&vNode.children[0].properties.style&&vNode.children[0].properties.style.height)&&(modifiedAttributes.tableRowHeight=(rowHeightString=>{if(pointRegex.test(rowHeightString)){const matchedParts=rowHeightString.match(pointRegex);return pointToTWIP(matchedParts[1])}if(pixelRegex.test(rowHeightString)){const matchedParts=rowHeightString.match(pixelRegex);return pixelToTWIP(matchedParts[1])}})(vNode.properties.style&&vNode.properties.style.height||(vNode.children[0]&&isVnode(vNode.children[0])&&vNode.children[0].properties.style&&vNode.children[0].properties.style.height?vNode.children[0].properties.style.height:void 0))),vNode.properties.style&&fixupTableCellBorder(vNode,modifiedAttributes));const tableRowPropertiesFragment=buildTableRowProperties(modifiedAttributes);tableRowFragment.import(tableRowPropertiesFragment);const columnIndex={index:0};if(vNodeHasChildren(vNode)){const tableColumns=vNode.children.filter((childVNode=>["td","th"].includes(childVNode.tagName))),columnWidth=docxDocumentInstance.availableDocumentSpace/tableColumns.length;for(let index=0;indexfragment({namespaceAlias:{w:namespaces_w}}).ele("@w","gridCol").att("@w","w",String(gridWidth)),buildTableGrid=(vNode,attributes)=>{const tableGridFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","tblGrid");if(vNodeHasChildren(vNode)){const gridColumns=vNode.children.filter((childVNode=>"col"===childVNode.tagName)),gridWidth=attributes.maximumWidth/gridColumns.length;for(let index=0;index{const tableGridFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","tblGrid");if(vNodeHasChildren(vNode)){const numberOfGridColumns=vNode.children.reduce(((accumulator,childVNode)=>{const colSpan=childVNode.properties.colSpan||childVNode.properties.style&&childVNode.properties.style["column-span"];return accumulator+(colSpan?parseInt(colSpan):1)}),0),gridWidth=attributes.maximumWidth/numberOfGridColumns;for(let index=0;indexfragment({namespaceAlias:{w:namespaces_w}}).ele("@w",side).att("@w","type","dxa").att("@w","w",String(margin)).up(),buildTableProperties=attributes=>{const tablePropertiesFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","tblPr");attributes&&attributes.constructor===Object&&Object.keys(attributes).forEach((key=>{switch(key){case"tableBorder":const tableBordersFragment=(tableBorder=>{const tableBordersFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","tblBorders"),{color:color,stroke:stroke,...borders}=tableBorder;return Object.keys(borders).forEach((border=>{if(borders[border]){const borderFragment=buildBorder(border,borders[border],0,color,stroke);tableBordersFragment.import(borderFragment)}})),tableBordersFragment.up(),tableBordersFragment})(attributes[key]);tablePropertiesFragment.import(tableBordersFragment),delete attributes.tableBorder;break;case"tableCellSpacing":const tableCellSpacingFragment=((cellSpacing=0)=>fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","tblCellSpacing").att("@w","w",cellSpacing).att("@w","type","dxa").up())(attributes[key]);tablePropertiesFragment.import(tableCellSpacingFragment),delete attributes.tableCellSpacing;break;case"width":if(attributes[key]){const tableWidthFragment=(tableWidth=attributes[key],fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","tblW").att("@w","type","dxa").att("@w","w",String(tableWidth)).up());tablePropertiesFragment.import(tableWidthFragment)}delete attributes.width}var tableWidth}));const tableCellMarginFragment=(margin=>{const tableCellMarFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","tblCellMar");return["top","bottom"].forEach((side=>{const marginFragment=buildCellMargin(side,margin/2);tableCellMarFragment.import(marginFragment)})),["left","right"].forEach((side=>{const marginFragment=buildCellMargin(side,margin);tableCellMarFragment.import(marginFragment)})),tableCellMarFragment})(160);tablePropertiesFragment.import(tableCellMarginFragment);const alignmentFragment=buildHorizontalAlignment("center");return tablePropertiesFragment.import(alignmentFragment),tablePropertiesFragment.up(),tablePropertiesFragment},cssBorderParser=borderString=>{let[size,stroke,color]=borderString.split(" ");if(pointRegex.test(size)){const matchedParts=size.match(pointRegex);size=pointToEIP(matchedParts[1])}else if(pixelRegex.test(size)){const matchedParts=size.match(pixelRegex);pixelValue=matchedParts[1],size=pointToEIP(pixelToPoint(pixelValue))}var pixelValue;return stroke=stroke&&["dashed","dotted","double"].includes(stroke)?stroke:"single",color=color&&fixupColorCode(color).toUpperCase(),[size,stroke,color]},buildTable=(vNode,attributes,docxDocumentInstance)=>{const tableFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","tbl"),modifiedAttributes={...attributes};if(isVnode(vNode)&&vNode.properties){const tableAttributes=vNode.properties.attributes||{},tableStyles=vNode.properties.style||{},tableBorders={},tableCellBorders={};let minimumWidth,maximumWidth,width,[borderSize,borderStrike,borderColor]=[2,"single","000000"];if(isNaN(tableAttributes.border)||(borderSize=parseInt(tableAttributes.border,10)),tableStyles.border){const[cssSize,cssStroke,cssColor]=cssBorderParser(tableStyles.border);borderSize=cssSize||borderSize,borderColor=cssColor||borderColor,borderStrike=cssStroke||borderStrike}if(tableBorders.top=borderSize,tableBorders.bottom=borderSize,tableBorders.left=borderSize,tableBorders.right=borderSize,tableBorders.stroke=borderStrike,tableBorders.color=borderColor,"collapse"===tableStyles["border-collapse"]?(tableBorders.insideV=borderSize,tableBorders.insideH=borderSize):(tableBorders.insideV=0,tableBorders.insideH=0,tableCellBorders.top=1,tableCellBorders.bottom=1,tableCellBorders.left=1,tableCellBorders.right=1),modifiedAttributes.tableBorder=tableBorders,modifiedAttributes.tableCellSpacing=0,Object.keys(tableCellBorders).length&&(modifiedAttributes.tableCellBorder=tableCellBorders),pixelRegex.test(tableStyles["min-width"]))minimumWidth=pixelToTWIP(tableStyles["min-width"].match(pixelRegex)[1]);else if(percentageRegex.test(tableStyles["min-width"])){const percentageValue=tableStyles["min-width"].match(percentageRegex)[1];minimumWidth=Math.round(percentageValue/100*attributes.maximumWidth)}if(pixelRegex.test(tableStyles["max-width"]))pixelRegex.lastIndex=0,maximumWidth=pixelToTWIP(tableStyles["max-width"].match(pixelRegex)[1]);else if(percentageRegex.test(tableStyles["max-width"])){percentageRegex.lastIndex=0;const percentageValue=tableStyles["max-width"].match(percentageRegex)[1];maximumWidth=Math.round(percentageValue/100*attributes.maximumWidth)}if(pixelRegex.test(tableStyles.width))pixelRegex.lastIndex=0,width=pixelToTWIP(tableStyles.width.match(pixelRegex)[1]);else if(percentageRegex.test(tableStyles.width)){percentageRegex.lastIndex=0;const percentageValue=tableStyles.width.match(percentageRegex)[1];width=Math.round(percentageValue/100*attributes.maximumWidth)}width?(modifiedAttributes.width=width,maximumWidth&&(modifiedAttributes.width=Math.min(modifiedAttributes.width,maximumWidth)),minimumWidth&&(modifiedAttributes.width=Math.max(modifiedAttributes.width,minimumWidth))):minimumWidth&&(modifiedAttributes.width=minimumWidth),modifiedAttributes.width&&(modifiedAttributes.width=Math.min(modifiedAttributes.width,attributes.maximumWidth))}const tablePropertiesFragment=buildTableProperties(modifiedAttributes);tableFragment.import(tablePropertiesFragment);const rowSpanMap=new Map;if(vNodeHasChildren(vNode))for(let index=0;index{const graphicFrameTransformFragment=fragment({namespaceAlias:{a:namespaces_a}}).ele("@a","xfrm"),offsetFragment=fragment({namespaceAlias:{a:namespaces_a}}).ele("@a","off").att("x","0").att("y","0").up();graphicFrameTransformFragment.import(offsetFragment);const extentsFragment=(({width:width,height:height})=>fragment({namespaceAlias:{a:namespaces_a}}).ele("@a","ext").att("cx",width).att("cy",height).up())(attributes);return graphicFrameTransformFragment.import(extentsFragment),graphicFrameTransformFragment.up(),graphicFrameTransformFragment},buildShapeProperties=attributes=>{const shapeProperties=fragment({namespaceAlias:{pic:namespaces_pic}}).ele("@pic","spPr"),graphicFrameTransformFragment=buildGraphicFrameTransform(attributes);shapeProperties.import(graphicFrameTransformFragment);const presetGeometryFragment=fragment({namespaceAlias:{a:namespaces_a}}).ele("@a","prstGeom").att("prst","rect").up();return shapeProperties.import(presetGeometryFragment),shapeProperties.up(),shapeProperties},buildStretch=()=>{const stretchFragment=fragment({namespaceAlias:{a:namespaces_a}}).ele("@a","stretch"),fillRectFragment=fragment({namespaceAlias:{a:namespaces_a}}).ele("@a","fillRect").up();return stretchFragment.import(fillRectFragment),stretchFragment.up(),stretchFragment},buildBinaryLargeImageOrPictureFill=relationshipId=>{const binaryLargeImageOrPictureFillFragment=fragment({namespaceAlias:{pic:namespaces_pic}}).ele("@pic","blipFill"),binaryLargeImageOrPictureFragment=(relationshipId=>fragment({namespaceAlias:{a:namespaces_a,r:namespaces_r}}).ele("@a","blip").att("@r","embed",`rId${relationshipId}`).att("cstate","print").up())(relationshipId);binaryLargeImageOrPictureFillFragment.import(binaryLargeImageOrPictureFragment);const srcRectFragment=fragment({namespaceAlias:{a:namespaces_a}}).ele("@a","srcRect").att("b","0").att("l","0").att("r","0").att("t","0").up();binaryLargeImageOrPictureFillFragment.import(srcRectFragment);const stretchFragment=buildStretch();return binaryLargeImageOrPictureFillFragment.import(stretchFragment),binaryLargeImageOrPictureFillFragment.up(),binaryLargeImageOrPictureFillFragment},buildNonVisualPictureProperties=(pictureId,pictureNameWithExtension,pictureDescription)=>{const nonVisualPicturePropertiesFragment=fragment({namespaceAlias:{pic:namespaces_pic}}).ele("@pic","nvPicPr"),nonVisualDrawingPropertiesFragment=((pictureId,pictureNameWithExtension,pictureDescription="")=>fragment({namespaceAlias:{pic:namespaces_pic}}).ele("@pic","cNvPr").att("id",pictureId).att("name",pictureNameWithExtension).att("descr",pictureDescription).up())(pictureId,pictureNameWithExtension,pictureDescription);nonVisualPicturePropertiesFragment.import(nonVisualDrawingPropertiesFragment);const nonVisualPictureDrawingPropertiesFragment=fragment({namespaceAlias:{pic:namespaces_pic}}).ele("@pic","cNvPicPr").up();return nonVisualPicturePropertiesFragment.import(nonVisualPictureDrawingPropertiesFragment),nonVisualPicturePropertiesFragment.up(),nonVisualPicturePropertiesFragment},buildGraphicData=(graphicType,attributes)=>{const graphicDataFragment=fragment({namespaceAlias:{a:namespaces_a}}).ele("@a","graphicData").att("uri","http://schemas.openxmlformats.org/drawingml/2006/picture");if("picture"===graphicType){const pictureFragment=(({id:id,fileNameWithExtension:fileNameWithExtension,description:description,relationshipId:relationshipId,width:width,height:height})=>{const pictureFragment=fragment({namespaceAlias:{pic:namespaces_pic}}).ele("@pic","pic"),nonVisualPicturePropertiesFragment=buildNonVisualPictureProperties(id,fileNameWithExtension,description);pictureFragment.import(nonVisualPicturePropertiesFragment);const binaryLargeImageOrPictureFill=buildBinaryLargeImageOrPictureFill(relationshipId);pictureFragment.import(binaryLargeImageOrPictureFill);const shapeProperties=buildShapeProperties({width:width,height:height});return pictureFragment.import(shapeProperties),pictureFragment.up(),pictureFragment})(attributes);graphicDataFragment.import(pictureFragment)}return graphicDataFragment.up(),graphicDataFragment},buildGraphic=(graphicType,attributes)=>{const graphicFragment=fragment({namespaceAlias:{a:namespaces_a}}).ele("@a","graphic"),graphicDataFragment=buildGraphicData(graphicType,attributes);return graphicFragment.import(graphicDataFragment),graphicFragment.up(),graphicFragment},buildDrawingObjectNonVisualProperties=(pictureId,pictureName)=>fragment({namespaceAlias:{wp:namespaces_wp}}).ele("@wp","docPr").att("id",pictureId).att("name",pictureName).up(),buildEffectExtentFragment=()=>fragment({namespaceAlias:{wp:namespaces_wp}}).ele("@wp","effectExtent").att("b","0").att("l","0").att("r","0").att("t","0").up(),buildExtent=({width:width,height:height})=>fragment({namespaceAlias:{wp:namespaces_wp}}).ele("@wp","extent").att("cx",width).att("cy",height).up(),buildAnchoredDrawing=(graphicType,attributes)=>{const anchoredDrawingFragment=fragment({namespaceAlias:{wp:namespaces_wp}}).ele("@wp","anchor").att("distB","0").att("distL","0").att("distR","0").att("distT","0").att("relativeHeight","0").att("behindDoc","false").att("locked","true").att("layoutInCell","true").att("allowOverlap","false").att("simplePos","false"),simplePosFragment=fragment({namespaceAlias:{wp:namespaces_wp}}).ele("@wp","simplePos").att("x","0").att("y","0").up();anchoredDrawingFragment.import(simplePosFragment);const positionHFragment=fragment({namespaceAlias:{wp:namespaces_wp}}).ele("@wp","positionH").att("relativeFrom","column").ele("@wp","posOffset").txt("19050").up().up();anchoredDrawingFragment.import(positionHFragment);const positionVFragment=fragment({namespaceAlias:{wp:namespaces_wp}}).ele("@wp","positionV").att("relativeFrom","paragraph").ele("@wp","posOffset").txt("19050").up().up();anchoredDrawingFragment.import(positionVFragment);const extentFragment=buildExtent({width:attributes.width,height:attributes.height});anchoredDrawingFragment.import(extentFragment);const effectExtentFragment=buildEffectExtentFragment();anchoredDrawingFragment.import(effectExtentFragment);const wrapSquareFragment=fragment({namespaceAlias:{wp:namespaces_wp}}).ele("@wp","wrapSquare").att("wrapText","bothSides").att("distB","228600").att("distT","228600").att("distL","228600").att("distR","228600").up();anchoredDrawingFragment.import(wrapSquareFragment);const drawingObjectNonVisualPropertiesFragment=buildDrawingObjectNonVisualProperties(attributes.id,attributes.fileNameWithExtension);anchoredDrawingFragment.import(drawingObjectNonVisualPropertiesFragment);const graphicFragment=buildGraphic(graphicType,attributes);return anchoredDrawingFragment.import(graphicFragment),anchoredDrawingFragment.up(),anchoredDrawingFragment},buildDrawing=(inlineOrAnchored=!1,graphicType,attributes)=>{const drawingFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","drawing"),inlineOrAnchoredDrawingFragment=inlineOrAnchored?((graphicType,attributes)=>{const inlineDrawingFragment=fragment({namespaceAlias:{wp:namespaces_wp}}).ele("@wp","inline").att("distB","0").att("distL","0").att("distR","0").att("distT","0"),extentFragment=buildExtent({width:attributes.width,height:attributes.height});inlineDrawingFragment.import(extentFragment);const effectExtentFragment=buildEffectExtentFragment();inlineDrawingFragment.import(effectExtentFragment);const drawingObjectNonVisualPropertiesFragment=buildDrawingObjectNonVisualProperties(attributes.id,attributes.fileNameWithExtension);inlineDrawingFragment.import(drawingObjectNonVisualPropertiesFragment);const graphicFragment=buildGraphic(graphicType,attributes);return inlineDrawingFragment.import(graphicFragment),inlineDrawingFragment.up(),inlineDrawingFragment})(graphicType,attributes):buildAnchoredDrawing(graphicType,attributes);return drawingFragment.import(inlineOrAnchoredDrawingFragment),drawingFragment.up(),drawingFragment},convertHTML$1=HTMLToVDOM({VNode:vnode,VText:vtext}),buildImage=(docxDocumentInstance,vNode,maximumWidth=null)=>{let response=null;try{response=docxDocumentInstance.createMediaFile(decodeURIComponent(vNode.properties.src))}catch(error){}if(response){docxDocumentInstance.zip.folder("word").folder("media").file(response.fileNameWithExtension,Buffer.from(response.fileContent,"base64"),{createFolders:!1});const documentRelsId=docxDocumentInstance.createDocumentRelationships(docxDocumentInstance.relationshipFilename,"image",`media/${response.fileNameWithExtension}`,"Internal"),imageBuffer=Buffer.from(response.fileContent,"base64"),imageProperties=sizeOf(imageBuffer);return buildParagraph(vNode,{type:"picture",inlineOrAnchored:!0,relationshipId:documentRelsId,...response,maximumWidth:maximumWidth||docxDocumentInstance.availableDocumentSpace,originalWidth:imageProperties.width,originalHeight:imageProperties.height},docxDocumentInstance)}},buildList=(vNode,docxDocumentInstance,xmlFragment)=>{let vNodeObjects=[{node:vNode,level:0,type:vNode.tagName,numberingId:docxDocumentInstance.createNumbering(vNode.tagName,vNode.properties)}];for(;vNodeObjects.length;){const tempVNodeObject=vNodeObjects.shift();if(isVtext(tempVNodeObject.node)||isVnode(tempVNodeObject.node)&&!["ul","ol","li"].includes(tempVNodeObject.node.tagName)){const paragraphFragment=buildParagraph(tempVNodeObject.node,{numbering:{levelId:tempVNodeObject.level,numberingId:tempVNodeObject.numberingId}},docxDocumentInstance);xmlFragment.import(paragraphFragment)}if(tempVNodeObject.node.children&&tempVNodeObject.node.children.length&&["ul","ol","li"].includes(tempVNodeObject.node.tagName)){vNodeObjects=tempVNodeObject.node.children.reduce(((accumulator,childVNode)=>{if(["ul","ol"].includes(childVNode.tagName))accumulator.push({node:childVNode,level:tempVNodeObject.level+1,type:childVNode.tagName,numberingId:docxDocumentInstance.createNumbering(childVNode.tagName,childVNode.properties)});else if(accumulator.length>0&&isVnode(accumulator[accumulator.length-1].node)&&"p"===accumulator[accumulator.length-1].node.tagName.toLowerCase())accumulator[accumulator.length-1].node.children.push(childVNode);else{const paragraphVNode=new vnode("p",null,isVtext(childVNode)?[childVNode]:isVnode(childVNode)?"li"===childVNode.tagName.toLowerCase()?[...childVNode.children]:[childVNode]:[]);accumulator.push({node:isVnode(childVNode)?"li"===childVNode.tagName.toLowerCase()?childVNode:"p"!==childVNode.tagName.toLowerCase()?paragraphVNode:childVNode:paragraphVNode,level:tempVNodeObject.level,type:tempVNodeObject.type,numberingId:tempVNodeObject.numberingId})}return accumulator}),[]).concat(vNodeObjects)}}return[]};function convertVTreeToXML(docxDocumentInstance,vTree,xmlFragment){if(!vTree)return"";if(Array.isArray(vTree)&&vTree.length)for(let index=0;index{const contentTypesFragment=fragment({defaultNamespace:{ele:namespaces_contentTypes}}).ele("Override").att("PartName",`/word/${type}${object[`${type}Id`]}.xml`).att("ContentType",`application/vnd.openxmlformats-officedocument.wordprocessingml.${type}+xml`).up();contentTypesXML.root().import(contentTypesFragment)}))}function generateSectionReferenceXML(documentXML,documentSectionType,objects,isEnabled){if(isEnabled&&objects&&Array.isArray(objects)&&objects.length){const xmlFragment=fragment();objects.forEach((({relationshipId:relationshipId,type:type})=>{const objectFragment=fragment({namespaceAlias:{w:namespaces_w,r:namespaces_r}}).ele("@w",`${documentSectionType}Reference`).att("@r","id",`rId${relationshipId}`).att("@w","type",type).up();xmlFragment.import(objectFragment)})),documentXML.root().first().first().import(xmlFragment)}}function generateXMLString(xmlString){return create({encoding:"UTF-8",standalone:!0},xmlString).toString({prettyPrint:!0})}function generateSectionXML(vTree,type="header"){const sectionXML=create({encoding:"UTF-8",standalone:!0,namespaceAlias:{w:namespaces_w,ve:namespaces_ve,o:namespaces_o,r:namespaces_r,v:namespaces_v,wp:namespaces_wp,w10:namespaces_w10}}).ele("@w","header"===type?"hdr":"ftr"),XMLFragment=fragment();convertVTreeToXML(this,vTree,XMLFragment),"footer"===type&&"p"===XMLFragment.first().node.tagName&&this.pageNumber&&XMLFragment.first().import(fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","fldSimple").att("@w","instr","PAGE").ele("@w","r").up().up()),sectionXML.root().import(XMLFragment);const referenceName="header"===type?"Header":"Footer";return this[`last${referenceName}Id`]+=1,{[`${type}Id`]:this[`last${referenceName}Id`],[`${type}XML`]:sectionXML}}class DocxDocument{constructor(properties){this.zip=properties.zip,this.htmlString=properties.htmlString,this.orientation=properties.orientation;const isPortraitOrientation="portrait"===this.orientation;this.width=isPortraitOrientation?12240:15840,this.height=isPortraitOrientation?15840:12240;const marginsObject=properties.margins;this.margins=marginsObject&&Object.keys(marginsObject).length?marginsObject:isPortraitOrientation?portraitMargins:landscapeMargins,this.availableDocumentSpace=this.width-this.margins.left-this.margins.right,this.title=properties.title||"",this.subject=properties.subject||"",this.creator=properties.creator||"html-to-docx",this.keywords=properties.keywords||["html-to-docx"],this.description=properties.description||"",this.lastModifiedBy=properties.lastModifiedBy||"html-to-docx",this.revision=properties.revision||1,this.createdAt=properties.createdAt||new Date,this.modifiedAt=properties.modifiedAt||new Date,this.headerType=properties.headerType||"default",this.header=properties.header||!1,this.footerType=properties.footerType||"default",this.footer=properties.footer||!1,this.font=properties.font||"Times New Roman",this.fontSize=properties.fontSize||22,this.complexScriptFontSize=properties.complexScriptFontSize||22,this.tableRowCantSplit=properties.table&&properties.table.row&&properties.table.row.cantSplit||!1,this.pageNumber=properties.pageNumber||!1,this.skipFirstHeaderFooter=properties.skipFirstHeaderFooter||!1,this.lineNumber=properties.lineNumber?properties.lineNumberOptions:null,this.lastNumberingId=0,this.lastMediaId=0,this.lastHeaderId=0,this.lastFooterId=0,this.stylesObjects=[],this.numberingObjects=[],this.relationshipFilename="document",this.relationships=[{fileName:"document",lastRelsId:4,rels:[]}],this.mediaFiles=[],this.headerObjects=[],this.footerObjects=[],this.documentXML=null,this.generateContentTypesXML=this.generateContentTypesXML.bind(this),this.generateDocumentXML=this.generateDocumentXML.bind(this),this.generateCoreXML=this.generateCoreXML.bind(this),this.generateSettingsXML=this.generateSettingsXML.bind(this),this.generateWebSettingsXML=this.generateWebSettingsXML.bind(this),this.generateStylesXML=this.generateStylesXML.bind(this),this.generateFontTableXML=this.generateFontTableXML.bind(this),this.generateThemeXML=this.generateThemeXML.bind(this),this.generateNumberingXML=this.generateNumberingXML.bind(this),this.generateRelsXML=this.generateRelsXML.bind(this),this.createMediaFile=this.createMediaFile.bind(this),this.createDocumentRelationships=this.createDocumentRelationships.bind(this),this.generateHeaderXML=this.generateHeaderXML.bind(this),this.generateFooterXML=this.generateFooterXML.bind(this),this.generateSectionXML=generateSectionXML.bind(this)}generateContentTypesXML(){const contentTypesXML$1=create({encoding:"UTF-8",standalone:!0},'\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n');return generateContentTypesFragments(contentTypesXML$1,"header",this.headerObjects),generateContentTypesFragments(contentTypesXML$1,"footer",this.footerObjects),contentTypesXML$1.toString({prettyPrint:!0})}generateDocumentXML(){const documentXML=create({encoding:"UTF-8",standalone:!0},(width=this.width,height=this.height,orientation=this.orientation,margins=this.margins,`\n \n\n \n \n \n \n \n \n \n \n `));var width,height,orientation,margins;if(documentXML.root().first().import(this.documentXML),generateSectionReferenceXML(documentXML,"header",this.headerObjects,this.header),generateSectionReferenceXML(documentXML,"footer",this.footerObjects,this.footer),(this.header||this.footer)&&this.skipFirstHeaderFooter&&documentXML.root().first().first().import(fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","titlePg")),this.lineNumber){const{countBy:countBy,start:start,restart:restart}=this.lineNumber;documentXML.root().first().first().import(fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","lnNumType").att("@w","countBy",countBy).att("@w","start",start).att("@w","restart",restart))}return documentXML.toString({prettyPrint:!0})}generateCoreXML(){return generateXMLString(((title="",subject="",creator="html-to-docx",keywords=["html-to-docx"],description="",lastModifiedBy="html-to-docx",revision=1,createdAt=new Date,modifiedAt=new Date)=>`\n \n\n \n ${title}\n ${subject}\n ${creator}\n ${keywords&&Array.isArray(keywords)?`${keywords.join(", ")}`:""}\n ${description}\n ${lastModifiedBy}\n ${revision}\n ${createdAt instanceof Date?createdAt.toISOString():(new Date).toISOString()}\n ${modifiedAt instanceof Date?modifiedAt.toISOString():(new Date).toISOString()}\n \n `)(this.title,this.subject,this.creator,this.keywords,this.description,this.lastModifiedBy,this.revision,this.createdAt,this.modifiedAt))}generateSettingsXML(){return generateXMLString(settingsXML)}generateWebSettingsXML(){return generateXMLString(webSettingsXML)}generateStylesXML(){return generateXMLString(((font="Times New Roman",fontSize=22,complexScriptFontSize=22)=>`\n \n\n \n\t\n\t \n\t\t\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t\n\t \n\t \n\t\t\n\t\t \n\t\t\n\t \n\t\n\t\n\t \n\t \n\t\t\n\t\t\n\t \n\t\n\t\n\t \n\t \n\t \n\t \n\t \n\t \n\t\t\n\t\t\n\t\t\n\t\t\n\t \n\t \n\t\t\n\t\t\n\t\t\n\t \n\t\n\t\n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t\t\n\t\t\n\t\t\n\t\t\n\t \n\t \n\t\t\n\t\t\n\t\t\n\t \n\t\n\t\n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t\t\n\t\t\n\t\t\n\t\t\n\t \n\t \n\t\t\n\t\t\n\t\t\n\t \n\t\n\t\n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t\t\n\t\t\n\t\t\n\t\t\n\t \n\t \n\t\t\n\t\t\n\t\t\n\t \n\t\n\t\n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t\t\n\t\t\n\t\t\n\t\t\n\t \n\t \n\t\t\n\t \n\t\n\t\n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t\t\n\t\t\n\t\t\n\t\t\n\t \n\t \n\t\t\n\t\t\n\t\t\n\t \n\t\n \n `)(this.font,this.fontSize,this.complexScriptFontSize))}generateFontTableXML(){return generateXMLString(fontTableXML)}generateThemeXML(){return generateXMLString(((font="Times New Roman")=>`\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n`)(this.font))}generateNumberingXML(){const numberingXML=create({encoding:"UTF-8",standalone:!0},`\n \n\n \n \n `),abstractNumberingFragments=fragment(),numberingFragments=fragment();return this.numberingObjects.forEach((({numberingId:numberingId,type:type,properties:properties})=>{const abstractNumberingFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","abstractNum").att("@w","abstractNumId",String(numberingId));[...Array(8).keys()].forEach((level=>{const levelFragment=fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","lvl").att("@w","ilvl",level).ele("@w","start").att("@w","val","ol"===type?properties.attributes&&properties.attributes["data-start"]||1:"1").up().ele("@w","numFmt").att("@w","val","ol"===type?(listType=>{switch(listType){case"upper-roman":return"upperRoman";case"lower-roman":return"lowerRoman";case"upper-alpha":case"upper-alpha-bracket-end":return"upperLetter";case"lower-alpha":case"lower-alpha-bracket-end":return"lowerLetter";default:return"decimal"}})(properties.style&&properties.style["list-style-type"]):"bullet").up().ele("@w","lvlText").att("@w","val","ol"===type?((style,lvl)=>{if(!style)return`%${lvl+1}`;switch(style["list-style-type"]){case"upper-roman":case"lower-roman":case"upper-alpha":case"lower-alpha":case"decimal":default:return`%${lvl+1}.`;case"upper-alpha-bracket-end":case"lower-alpha-bracket-end":case"decimal-bracket-end":return`%${lvl+1})`;case"decimal-bracket":return`(%${lvl+1})`}})(properties.style,level):"").up().ele("@w","lvlJc").att("@w","val","left").up().ele("@w","pPr").ele("@w","tabs").ele("@w","tab").att("@w","val","num").att("@w","pos",720*(level+1)).up().up().ele("@w","ind").att("@w","left",720*(level+1)).att("@w","hanging",360).up().up().up();"ul"===type&&levelFragment.last().import(fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","rPr").ele("@w","rFonts").att("@w","ascii","Wingdings").att("@w","hAnsi","Wingdings").att("@w","hint","default").up().up()),abstractNumberingFragment.import(levelFragment)})),abstractNumberingFragment.up(),abstractNumberingFragments.import(abstractNumberingFragment),numberingFragments.import(fragment({namespaceAlias:{w:namespaces_w}}).ele("@w","num").att("@w","numId",String(numberingId)).ele("@w","abstractNumId").att("@w","val",String(numberingId)).up().up())})),numberingXML.root().import(abstractNumberingFragments),numberingXML.root().import(numberingFragments),numberingXML.toString({prettyPrint:!0})}appendRelationships(xmlFragment,relationships){relationships.forEach((({relationshipId:relationshipId,type:type,target:target,targetMode:targetMode})=>{xmlFragment.import(fragment({defaultNamespace:{ele:namespaces_relationship}}).ele("Relationship").att("Id",`rId${relationshipId}`).att("Type",type).att("Target",target).att("TargetMode",targetMode).up())}))}generateRelsXML(){return this.relationships.map((({fileName:fileName,rels:rels})=>{const xmlFragment=create({encoding:"UTF-8",standalone:!0},"document"===fileName?documentRelsXML:'\n \n\n \n \n');return this.appendRelationships(xmlFragment.root(),rels),{fileName:fileName,xmlString:xmlFragment.toString({prettyPrint:!0})}}))}createNumbering(type,properties){return this.lastNumberingId+=1,this.numberingObjects.push({numberingId:this.lastNumberingId,type:type,properties:properties}),this.lastNumberingId}createMediaFile(base64String){const matches=base64String.match(/^data:([A-Za-z-+\/]+);base64,(.+)$/);if(3!==matches.length)throw new Error("Invalid base64 string");const base64FileContent=matches[2],fileExtension="octet-stream"===matches[1].match(/\/(.*?)$/)[1]?"png":matches[1].match(/\/(.*?)$/)[1],fileNameWithExtension=`image-${nanoid()}.${fileExtension}`;return this.lastMediaId+=1,{id:this.lastMediaId,fileContent:base64FileContent,fileNameWithExtension:fileNameWithExtension}}createDocumentRelationships(fileName="document",type,target,targetMode="External"){let relationshipType,relationshipObject=this.relationships.find((relationship=>relationship.fileName===fileName)),lastRelsId=1;switch(relationshipObject?(lastRelsId=relationshipObject.lastRelsId+1,relationshipObject.lastRelsId=lastRelsId):(relationshipObject={fileName:fileName,lastRelsId:lastRelsId,rels:[]},this.relationships.push(relationshipObject)),type){case"hyperlink":relationshipType=namespaces_hyperlinks;break;case"image":relationshipType=namespaces_images;break;case"header":relationshipType=namespaces_headers;break;case"footer":relationshipType=namespaces_footers;break;case"theme":relationshipType=namespaces_themes}return relationshipObject.rels.push({relationshipId:lastRelsId,type:relationshipType,target:target,targetMode:targetMode}),lastRelsId}generateHeaderXML(vTree){return this.generateSectionXML(vTree,"header")}generateFooterXML(vTree){return this.generateSectionXML(vTree,"footer")}}const convertHTML=HTMLToVDOM({VNode:vnode,VText:vtext}),fixupMargins=margins=>{let normalizedMargins={};return"object"==typeof margins&&null!==margins?Object.keys(margins).forEach((key=>{if(pixelRegex.test(margins[key])){const matchedParts=margins[key].match(pixelRegex);normalizedMargins[key]=pixelToTWIP(matchedParts[1])}else if(cmRegex.test(margins[key])){const matchedParts=margins[key].match(cmRegex);normalizedMargins[key]=(cmValue=matchedParts[1],inchToTWIP((cmValue=>.3937008*cmValue)(cmValue)))}else if(inchRegex.test(margins[key])){const matchedParts=margins[key].match(inchRegex);normalizedMargins[key]=inchToTWIP(matchedParts[1])}else margins[key]?normalizedMargins[key]=margins[key]:normalizedMargins[key]=defaultDocumentOptions.margins[key];var cmValue})):normalizedMargins=null,normalizedMargins},normalizeDocumentOptions=documentOptions=>{const normalizedDocumentOptions={...documentOptions};return Object.keys(documentOptions).forEach((key=>{switch(key){case"margins":normalizedDocumentOptions.margins=fixupMargins(documentOptions[key]);break;case"fontSize":case"complexScriptFontSize":normalizedDocumentOptions[key]=(fontSize=>{let normalizedFontSize;if(pointRegex.test(fontSize)){const matchedParts=fontSize.match(pointRegex);normalizedFontSize=pointToHIP(matchedParts[1])}else normalizedFontSize=fontSize||null;return normalizedFontSize})(documentOptions[key])}})),normalizedDocumentOptions};function addFilesToContainer(zip,htmlString,suppliedDocumentOptions,headerHTMLString,footerHTMLString){const normalizedDocumentOptions=normalizeDocumentOptions(suppliedDocumentOptions),documentOptions=(options=defaultDocumentOptions,patch=normalizedDocumentOptions,{...options,...patch});var options,patch;documentOptions.header&&!headerHTMLString&&(headerHTMLString="

      "),documentOptions.footer&&!footerHTMLString&&(footerHTMLString="

      ");const docxDocument=new DocxDocument({zip:zip,htmlString:htmlString,...documentOptions});var docxDocumentInstance;if(docxDocument.documentXML=convertVTreeToXML(docxDocumentInstance=docxDocument,convertHTML$1(docxDocumentInstance.htmlString),fragment({namespaceAlias:{w:namespaces_w}})),zip.folder("_rels").file(".rels",create({encoding:"UTF-8",standalone:!0},relsXML).toString({prettyPrint:!0}),{createFolders:!1}),zip.folder("docProps").file("core.xml",docxDocument.generateCoreXML(),{createFolders:!1}),docxDocument.header&&headerHTMLString){const vTree=convertHTML(headerHTMLString);docxDocument.relationshipFilename="header1";const{headerId:headerId,headerXML:headerXML}=docxDocument.generateHeaderXML(vTree);docxDocument.relationshipFilename="document";const fileNameWithExt=`header${headerId}.xml`,relationshipId=docxDocument.createDocumentRelationships(docxDocument.relationshipFilename,"header",fileNameWithExt,"Internal");zip.folder("word").file(fileNameWithExt,headerXML.toString({prettyPrint:!0}),{createFolders:!1}),docxDocument.headerObjects.push({headerId:headerId,relationshipId:relationshipId,type:docxDocument.headerType})}if(docxDocument.footer&&footerHTMLString){const vTree=convertHTML(footerHTMLString);docxDocument.relationshipFilename="footer1";const{footerId:footerId,footerXML:footerXML}=docxDocument.generateFooterXML(vTree);docxDocument.relationshipFilename="document";const fileNameWithExt=`footer${footerId}.xml`,relationshipId=docxDocument.createDocumentRelationships(docxDocument.relationshipFilename,"footer",fileNameWithExt,"Internal");zip.folder("word").file(fileNameWithExt,footerXML.toString({prettyPrint:!0}),{createFolders:!1}),docxDocument.footerObjects.push({footerId:footerId,relationshipId:relationshipId,type:docxDocument.footerType})}docxDocument.createDocumentRelationships(docxDocument.relationshipFilename,"theme","theme/theme1.xml","Internal"),zip.folder("word").folder("theme").file("theme1.xml",docxDocument.generateThemeXML(),{createFolders:!1}),zip.folder("word").file("document.xml",docxDocument.generateDocumentXML(),{createFolders:!1}).file("fontTable.xml",docxDocument.generateFontTableXML(),{createFolders:!1}).file("styles.xml",docxDocument.generateStylesXML(),{createFolders:!1}).file("numbering.xml",docxDocument.generateNumberingXML(),{createFolders:!1}).file("settings.xml",docxDocument.generateSettingsXML(),{createFolders:!1}).file("webSettings.xml",docxDocument.generateWebSettingsXML(),{createFolders:!1});const relationshipXMLs=docxDocument.generateRelsXML();return relationshipXMLs&&Array.isArray(relationshipXMLs)&&relationshipXMLs.forEach((({fileName:fileName,xmlString:xmlString})=>{zip.folder("word").folder("_rels").file(`${fileName}.xml.rels`,xmlString,{createFolders:!1})})),zip.file("[Content_Types].xml",docxDocument.generateContentTypesXML(),{createFolders:!1}),zip}const minifyHTMLString=htmlString=>{try{if("string"==typeof htmlString||htmlString instanceof String){return htmlString.replace(/\n/g," ").replace(/\r/g," ").replace(/\r\n/g," ").replace(/[\t]+\[\t ]+\<").replace(/\>[\t ]+$/g,">")}throw new Error("invalid html string")}catch(error){return null}};async function generateContainer(htmlString,headerHTMLString,documentOptions={},footerHTMLString){const zip=new JSZip;let contentHTML=htmlString,headerHTML=headerHTMLString,footerHTML=footerHTMLString;htmlString&&(contentHTML=minifyHTMLString(contentHTML)),headerHTMLString&&(headerHTML=minifyHTMLString(headerHTML)),footerHTMLString&&(footerHTML=minifyHTMLString(footerHTML)),addFilesToContainer(zip,contentHTML,documentOptions,headerHTML,footerHTML);const buffer=await zip.generateAsync({type:"arraybuffer"});if(Object.prototype.hasOwnProperty.call(global,"Blob"))return new Blob([buffer],{type:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"});if(Object.prototype.hasOwnProperty.call(global,"Buffer"))return Buffer.from(new Uint8Array(buffer));throw new Error("Add blob support using a polyfill eg https://github.com/bjornstar/blob-polyfill")}export{generateContainer as default}; +//# sourceMappingURL=html-to-docx.esm.js.map diff --git a/front/public/cdn/html-to-docx/dist/html-to-docx.esm.js.map b/front/public/cdn/html-to-docx/dist/html-to-docx.esm.js.map new file mode 100644 index 0000000..5dfa792 --- /dev/null +++ b/front/public/cdn/html-to-docx/dist/html-to-docx.esm.js.map @@ -0,0 +1 @@ +{"version":3,"file":"html-to-docx.esm.js","sources":["../node_modules/virtual-dom/vnode/version.js","../node_modules/virtual-dom/vnode/is-vnode.js","../node_modules/virtual-dom/vnode/is-widget.js","../node_modules/virtual-dom/vnode/is-thunk.js","../node_modules/virtual-dom/vnode/is-vhook.js","../node_modules/virtual-dom/vnode/vnode.js","../node_modules/virtual-dom/vnode/vtext.js","../src/schemas/content-types.js","../src/namespaces.js","../node_modules/lodash/lodash.js","../src/constants.js","../src/schemas/document-rels.js","../src/schemas/rels.js","../src/schemas/font-table.js","../src/schemas/settings.js","../src/schemas/web-settings.js","../node_modules/nanoid/index.js","../node_modules/nanoid/url-alphabet/index.js","../node_modules/virtual-dom/vnode/is-vtext.js","../node_modules/inherits/inherits_browser.js","../node_modules/inherits/inherits.js","../node_modules/queue/index.js","../node_modules/image-size/dist/types/bmp.js","../node_modules/image-size/dist/types/ico.js","../node_modules/image-size/dist/types/cur.js","../node_modules/image-size/dist/types/dds.js","../node_modules/image-size/dist/types/gif.js","../node_modules/image-size/dist/types/icns.js","../node_modules/image-size/dist/types/j2c.js","../node_modules/image-size/dist/types/jp2.js","../node_modules/image-size/dist/readUInt.js","../node_modules/image-size/dist/types/jpg.js","../node_modules/image-size/dist/types/ktx.js","../node_modules/image-size/dist/types/png.js","../node_modules/image-size/dist/types/pnm.js","../node_modules/image-size/dist/types/psd.js","../node_modules/image-size/dist/types/svg.js","../node_modules/image-size/dist/types/tiff.js","../node_modules/image-size/dist/types/webp.js","../node_modules/image-size/dist/types.js","../node_modules/image-size/dist/detector.js","../node_modules/image-size/dist/index.js","../src/utils/color-conversion.js","../src/utils/unit-conversion.js","../src/utils/vnode.js","../src/helpers/xml-builder.js","../src/helpers/render-document-file.js","../src/docx-document.js","../src/schemas/document.template.js","../src/schemas/core.js","../src/schemas/styles.js","../src/schemas/theme.js","../src/schemas/numbering.js","../src/utils/list.js","../src/schemas/generic-rels.js","../src/html-to-docx.js","../index.js"],"sourcesContent":["module.exports = \"2\"\n","var version = require(\"./version\")\n\nmodule.exports = isVirtualNode\n\nfunction isVirtualNode(x) {\n return x && x.type === \"VirtualNode\" && x.version === version\n}\n","module.exports = isWidget\n\nfunction isWidget(w) {\n return w && w.type === \"Widget\"\n}\n","module.exports = isThunk\r\n\r\nfunction isThunk(t) {\r\n return t && t.type === \"Thunk\"\r\n}\r\n","module.exports = isHook\n\nfunction isHook(hook) {\n return hook &&\n (typeof hook.hook === \"function\" && !hook.hasOwnProperty(\"hook\") ||\n typeof hook.unhook === \"function\" && !hook.hasOwnProperty(\"unhook\"))\n}\n","var version = require(\"./version\")\nvar isVNode = require(\"./is-vnode\")\nvar isWidget = require(\"./is-widget\")\nvar isThunk = require(\"./is-thunk\")\nvar isVHook = require(\"./is-vhook\")\n\nmodule.exports = VirtualNode\n\nvar noProperties = {}\nvar noChildren = []\n\nfunction VirtualNode(tagName, properties, children, key, namespace) {\n this.tagName = tagName\n this.properties = properties || noProperties\n this.children = children || noChildren\n this.key = key != null ? String(key) : undefined\n this.namespace = (typeof namespace === \"string\") ? namespace : null\n\n var count = (children && children.length) || 0\n var descendants = 0\n var hasWidgets = false\n var hasThunks = false\n var descendantHooks = false\n var hooks\n\n for (var propName in properties) {\n if (properties.hasOwnProperty(propName)) {\n var property = properties[propName]\n if (isVHook(property) && property.unhook) {\n if (!hooks) {\n hooks = {}\n }\n\n hooks[propName] = property\n }\n }\n }\n\n for (var i = 0; i < count; i++) {\n var child = children[i]\n if (isVNode(child)) {\n descendants += child.count || 0\n\n if (!hasWidgets && child.hasWidgets) {\n hasWidgets = true\n }\n\n if (!hasThunks && child.hasThunks) {\n hasThunks = true\n }\n\n if (!descendantHooks && (child.hooks || child.descendantHooks)) {\n descendantHooks = true\n }\n } else if (!hasWidgets && isWidget(child)) {\n if (typeof child.destroy === \"function\") {\n hasWidgets = true\n }\n } else if (!hasThunks && isThunk(child)) {\n hasThunks = true;\n }\n }\n\n this.count = count + descendants\n this.hasWidgets = hasWidgets\n this.hasThunks = hasThunks\n this.hooks = hooks\n this.descendantHooks = descendantHooks\n}\n\nVirtualNode.prototype.version = version\nVirtualNode.prototype.type = \"VirtualNode\"\n","var version = require(\"./version\")\n\nmodule.exports = VirtualText\n\nfunction VirtualText(text) {\n this.text = String(text)\n}\n\nVirtualText.prototype.version = version\nVirtualText.prototype.type = \"VirtualText\"\n","const contentTypesXML = `\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n`;\n\nexport default contentTypesXML;\n","const namespaces = {\n a: 'http://schemas.openxmlformats.org/drawingml/2006/main',\n b: 'http://schemas.openxmlformats.org/officeDocument/2006/bibliography',\n cdr: 'http://schemas.openxmlformats.org/drawingml/2006/chartDrawing',\n dc: 'http://purl.org/dc/elements/1.1/',\n dcmitype: 'http://purl.org/dc/dcmitype/',\n dcterms: 'http://purl.org/dc/terms/',\n o: 'urn:schemas-microsoft-com:office:office',\n pic: 'http://schemas.openxmlformats.org/drawingml/2006/picture',\n r: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships',\n v: 'urn:schemas-microsoft-com:vml',\n ve: 'http://schemas.openxmlformats.org/markup-compatibility/2006',\n vt: 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes',\n w: 'http://schemas.openxmlformats.org/wordprocessingml/2006/main',\n w10: 'urn:schemas-microsoft-com:office:word',\n wp: 'http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing',\n wne: 'http://schemas.microsoft.com/office/word/2006/wordml',\n xsd: 'http://www.w3.org/2001/XMLSchema',\n xsi: 'http://www.w3.org/2001/XMLSchema-instance',\n numbering: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering',\n hyperlinks: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink',\n images: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image',\n styles: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles',\n headers: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/header',\n footers: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer',\n themes: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme',\n coreProperties: 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties',\n officeDocumentRelation:\n 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument',\n corePropertiesRelation:\n 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties',\n settingsRelation: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings',\n webSettingsRelation:\n 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings',\n sl: 'http://schemas.openxmlformats.org/schemaLibrary/2006/main',\n contentTypes: 'http://schemas.openxmlformats.org/package/2006/content-types',\n relationship: 'http://schemas.openxmlformats.org/package/2006/relationships',\n};\n\nexport default namespaces;\n","/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.21';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function',\n INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading whitespace. */\n var reTrimStart = /^\\s+/;\n\n /** Used to match a single whitespace character. */\n var reWhitespace = /\\s/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /**\n * Used to validate the `validate` option in `_.template` variable.\n *\n * Forbids characters which could potentially change the meaning of the function argument definition:\n * - \"(),\" (modification of function parameters)\n * - \"=\" (default value)\n * - \"[]{}\" (destructuring of function parameters)\n * - \"/\" (beginning of a comment)\n * - whitespace\n */\n var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n 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',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\n function baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\n function trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n var low = 0,\n high = array == null ? 0 : array.length;\n if (high === 0) {\n return 0;\n }\n\n value = iteratee(value);\n var valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '

      ' + func(text) + '

      ';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '

      fred, barney, & pebbles

      '\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': ' \ No newline at end of file diff --git a/front/src/views/rpt_design/datasetManger2.vue b/front/src/views/rpt_design/datasetManger2.vue index ad7044e..07aa8b4 100644 --- a/front/src/views/rpt_design/datasetManger2.vue +++ b/front/src/views/rpt_design/datasetManger2.vue @@ -38,7 +38,7 @@ -
      {{ds._name}}
      +
      {{ds._name}}
      @@ -48,6 +48,7 @@
      +
      {{action_target._name}} @@ -144,15 +145,15 @@ - +
      +
      - - @@ -171,6 +172,7 @@ +
      1){ - this.action_target._fields=JSON.stringify(data[0]) - ret= convert_array_to_json(data) - return ret + if(this.context?.report_result?.dataSet && this.context.report_result.dataSet[cur_ds._name]){ + let data=this.context.report_result.dataSet[cur_ds._name][this.action_target.__text||0] + if (data && data.length>1){ + this.action_target._fields=JSON.stringify(data[0]) + ret= convert_array_to_json(data) + return ret + } } } @@ -614,9 +618,11 @@ innerReport(); //设计好的报表页面选中有关单元格,复制粘贴到 save_data_for_init(){ if(this.context.report.template==undefined) this.context.report.template={} + let t_d={} + this.all_dataSet.filter(x=>x._dataSource!="memory").map(x=>t_d[x._name]=this.context.report_result.dataSet[x._name]) this.context.report.template.before_exec_script=` var _init_dataset_dict_= - ${ JSON.stringify(this.context.report_result.dataSet,null).replaceAll("{}",null).replaceAll("],[","],\n[")}; + ${ JSON.stringify(t_d,null).replaceAll("{}",null).replaceAll("],[","],\n[")}; ` this.$message({ message: '备份成功。下一次报表运算将会离线运行。你可以在设置(后端运行前脚本)中,删除相应备份数据,以恢复正常运行。', @@ -656,6 +662,12 @@ innerReport(); //设计好的报表页面选中有关单元格,复制粘贴到 }) }, + choose_ds(ds){ + if(ds.url_param && Array.isArray(ds.url_param)==false){ + ds.url_param=[ds.url_param] + } + this.action_target=ds + }, choose_file(file) { this.file = file.raw;//这是element的导入数据选择,必须要添加.raw才能获取,其他表单不需要 this.importExcel(this.file) diff --git a/front/src/views/rpt_design/design_index.vue b/front/src/views/rpt_design/design_index.vue index 5885492..5547cf7 100644 --- a/front/src/views/rpt_design/design_index.vue +++ b/front/src/views/rpt_design/design_index.vue @@ -1071,11 +1071,13 @@ export default { save_one(this.report) //console.info(x2jsone.js2xml({report:this.report})) }, - run_report(url){ + async run_report(url){ // console.log(url) this.save_fix() this.save_layout(this.layout_mode) save_one(this.report) + if(navigator?.clipboard) + await navigator.clipboard.writeText(url) let newA = document.createElement('a'); newA.target = '_blank'; newA.href = url; diff --git a/front/src/views/rpt_design/element/echarts.vue b/front/src/views/rpt_design/element/echarts.vue index 119b18f..c595d30 100644 --- a/front/src/views/rpt_design/element/echarts.vue +++ b/front/src/views/rpt_design/element/echarts.vue @@ -1151,7 +1151,7 @@ function map_option (self,_this,__valid_data__) { return res; }; //$.ajaxSettings.async = false; - function map_inner_exec(result) + function map_inner_exec(calc_cnt) { _this.geoCoordMap=JSON.parse(JSON.stringify(self.geoCoordMap)) @@ -1234,6 +1234,7 @@ function map_option (self,_this,__valid_data__) { layoutCenter: ["50%", "50%"], layoutSize: 1200, roam: self.option.roam, + regions:[], label: { show: true, fontSize: self.option.fontSize, @@ -1347,20 +1348,21 @@ function map_option (self,_this,__valid_data__) { if (_this.zoomData < 1) _this.zoomData = 1; }); let _myChart=_this.myChart - _this.myChart.setOption(option); + + _this.myChart.setOption(option,true);//重绘是true + + _this.myChart.resize(); eval("option=(function(option,myChart,_this){"+self.content+"\n return option})(option,_myChart,_this)") return option } if(window.echarts.getMap(_this.real_map_url())) - return map_inner_exec() + return map_inner_exec(0) else { - $.get(_this.real_map_url(),function(result){ + $.get(_this.real_map_url(),function(result){//map 方式,必须先下载注册地图再初始化myChart实例才行,否则会找不到地图 window.echarts.registerMap(_this.real_map_url(), result); - let option=map_inner_exec() - _this.myChart.setOption(option,true); - _this.myChart.resize(); - _this.myChart.setOption(option, true); + _this.myChart = echarts.init(_this.$refs.main);// 不重新初始话的话,会报错 echarts.vue?3bfd:1356 TypeError: Cannot read properties of undefined (reading 'regions') + let option=map_inner_exec(0) }) return {} diff --git a/front/src/views/rpt_design/element/luckySheetProxy.vue b/front/src/views/rpt_design/element/luckySheetProxy.vue index 9aaf5c1..fc001e0 100644 --- a/front/src/views/rpt_design/element/luckySheetProxy.vue +++ b/front/src/views/rpt_design/element/luckySheetProxy.vue @@ -263,7 +263,7 @@ export default { sortArr?.off('click',this.sortFunc) } if(this.TABLEOBJ==null) - this.$set(this,'TABLEOBJ',new ResultGrid2HtmlTable2(cur_grid,this.$el,this.self,_this.context.report_result.footer2,_this.context.report_result.defaultsetting)) + this.$set(this,'TABLEOBJ',new ResultGrid2HtmlTable2(cur_grid,this.$el,this.self,_this.context.report_result.defaultsetting)) this.pager_height=this.TABLEOBJ!=undefined && (parseInt(this.self.page_size)<=this.TABLEOBJ.total() )?32:0 this.html_table=this.TABLEOBJ.show(this.cur_page,this.self.page_size) @@ -288,19 +288,29 @@ export default { target.scrollTop=_this.scrollTop // 设置表头的行高和主体表的行高一致 $(`#reportDiv${_this.gridName}Top tr`).each(function() { - let main_td_arr=$(this).find("td") - $.each( $(`#reportDiv${_this.gridName}TopLeft tr[data-n=${this.dataset['n']}]`).find("td") - ,function(i,val){// 每个对应的单元格都设置行高 - $(val).height( $(main_td_arr[i]).height() ) - }) + //if(!this.param_grid.auto_line_height || this.defaultsetting.cr_auto_line_height!='true') + $(`#reportDiv${_this.gridName}TopLeft tr[data-n=${this.dataset['n']}]`).height( $(this).height() ) + cur_grid.rowlenArr[this.dataset['n']]=$(this).height() //设置真正行高到原始数组,pdf 生成时就可以使用了 }) $(`#reportDiv${_this.gridName} tr`).each(function() { - let main_td_arr=$(this).find("td") - $.each( $(`#reportDiv${_this.gridName}Left tr[data-n=${this.dataset['n']}]`).find("td") - ,function(i,val){ - $(val).height( $(main_td_arr[i]).height() ) - }) + $(`#reportDiv${_this.gridName}Left tr[data-n=${this.dataset['n']}]`).height( $(this).height() ) + cur_grid.rowlenArr[this.dataset['n']]=$(this).height() //设置真正行高到原始数组,pdf 生成时就可以使用了 }) + + //$(`#reportDiv${_this.gridName}Top tr`).each(function() { + // let main_td_arr=$(this).find("td") + // $.each( $(`#reportDiv${_this.gridName}TopLeft tr[data-n=${this.dataset['n']}]`).find("td") + // ,function(i,val){// 每个对应的单元格都设置行高 + // $(val).height( $(main_td_arr[i]).height() ) + // }) + //}) + //$(`#reportDiv${_this.gridName} tr`).each(function() { + // let main_td_arr=$(this).find("td") + // $.each( $(`#reportDiv${_this.gridName}Left tr[data-n=${this.dataset['n']}]`).find("td") + // ,function(i,val){ + // $(val).height( $(main_td_arr[i]).height() ) + // }) + //}) //点击,发送数据到clickedEle $(`#reportDiv${_this.gridName} .cr-table__body tr`).unbind() @@ -633,13 +643,18 @@ export default { }//end if } function buildReport(){ + if (String.prototype.replaceAll===undefined){ + String.prototype.replaceAll = function(s1, s2) { + return this.replace(new RegExp(s1, "gm"), s2); + } + } luckysheet.create({ container: 'report',lang: 'zh',forceCalculation:false,showsheetbar:false, showstatisticBarConfig:{count: false, view: false, zoom: false, }, enableAddBackTop:false,enableAddRow:false,sheetFormulaBar:false, showinfobar:false, data:[${sheet_data}], - hook:{rangeSelect:selectChange, + hook:{rangeSelect:selectChange, updated:lucky_updated, cellUpdateBefore:cellUpdateBefore, rangePasteBefore:rangePasteBefore, diff --git a/front/src/views/rpt_design/element/mixins.js b/front/src/views/rpt_design/element/mixins.js index 627cadc..2b11d29 100644 --- a/front/src/views/rpt_design/element/mixins.js +++ b/front/src/views/rpt_design/element/mixins.js @@ -133,6 +133,38 @@ export default { ds=test_data return ds.slice(from,to) }, + findElelment(name,prop_dict){ + if(this.context?.report_result){ + let ret=this.context?.report_result.layout.concat( + this.context?.report_result.layout_hidden||[]).filter(x=>x.element.gridName==name) + if(ret!=null) + return Object.assign({}, ret[0].element,prop_dict||{}) + } + }, + find_item(item){ + if(this.context.mode!='design' || this.selectWidget.type=='layout') + return false; + if(this.selectWidget.type=='layout_item' && item.i==this.selectWidget.item_i) + { + return true; + } + if(item==this.selectWidget || item.element==this.selectWidget) + { + return true; + } + let children=item.element?.children?.column || item.children?.column + if(children) + { + for(let one in children){ + let in_child=this.find_item(children[one]) + if(in_child) + { + return true; + } + } + } + return false; + }, /** * 刷新机制:context.clickedEle 中存放每个元素的点击数据 * 在点击grid或report或图等元素时,需要设置 clickedEle.然后调用click_fresh,参数为点击元素的选中数据p_data diff --git a/front/src/views/rpt_design/list.vue b/front/src/views/rpt_design/list.vue index 89f9396..af7dc8f 100644 --- a/front/src/views/rpt_design/list.vue +++ b/front/src/views/rpt_design/list.vue @@ -67,7 +67,8 @@
      - + - - + + + + + + + + x._name==[this.action_target._dataSetName_kyz])){ this.action_target._dataSetName_kyz='' } diff --git a/front/src/views/rpt_design/preview.vue b/front/src/views/rpt_design/preview.vue index fbc1500..052f9b2 100644 --- a/front/src/views/rpt_design/preview.vue +++ b/front/src/views/rpt_design/preview.vue @@ -22,6 +22,14 @@ + + + +
      @@ -65,8 +73,13 @@ :prop="one.name" :rules="result.defaultsetting.cr_front_validate=='true' && one.allowSpace=='False'? {required: true, message: '请选择', trigger: 'change' } :null"> +
    1. + 全选 + 全不选 +
    2. +
    3. + 全选 + 全不选 +
    4. @@ -95,7 +113,7 @@ @@ -112,7 +130,7 @@ - 查询 + 查询 @@ -169,6 +187,7 @@ export default { grpId:this.grpId, event:{}, queryForm:this.queryForm, + rpt_this:this, allElementSet:this.context.allElementSet, clickedEle:this.clickedEle, //不放到这里,会导致动态runtime-template重算,如果是有滚动行的,会每次都重新跑到顶部 @@ -185,6 +204,8 @@ export default { name_lable_map:{}, paper_setting_dialogVisible:false, pdf_output_dialogVisible:false, + dync_item_dialogVisible:false, + dync_item:{}, preview_dialogVisible:false, previewFormParam:{}, queryForm:{}, @@ -258,7 +279,7 @@ export default { let datauri = URL.createObjectURL(pdf_data) document.getElementById("pdf_output").data =datauri }, - submit(){ + validate_submit(){ let _this=this _this.$refs.form.validate((valid) => { if (valid) { @@ -274,6 +295,9 @@ export default { } }); }, + submit(){ + preview_one(this,false) + }, change_param(param_name){ let _this=this if(this.context.report_result.param_liandong?.includes(param_name)){ diff --git a/front/src/views/rpt_design/runApp.vue b/front/src/views/rpt_design/runApp.vue index dc42a01..211856c 100644 --- a/front/src/views/rpt_design/runApp.vue +++ b/front/src/views/rpt_design/runApp.vue @@ -20,7 +20,13 @@
      - + + + @@ -48,6 +54,10 @@ +
    5. + 全选 + 全不选 +
    6. +
    7. + 全选 + 全不选 +
    8. @@ -76,7 +90,7 @@ 小数据量(带格式) 大数据量(无格式) + PDF预览 @@ -157,11 +172,8 @@
      {{one.prompt}}
      - {{item[0]}} + {{item[0]}}
      @@ -209,7 +221,7 @@ import {convert_array_to_json,arrayToTree,seriesLoadScripts,load_css_file,waterm import install_component from './install_component' import dyncTemplate from './element/dyncTemplate.vue' import paperSetting from './paperSetting.vue' -import {exceljs_inner_exec,xlsxjs_inner_exec} from './utils/export_excel.js' +import {exceljs_inner_exec,xlsxjs_inner_exec,docx_inner_exec} from './utils/export_excel.js' export default { name: 'App', //CellReportFormDesign components:{dyncTemplate,widgetForm,paperSetting}, @@ -313,6 +325,8 @@ export default { big_screen_scale:100, big_screen_scale_x:100, big_screen_scale_y:100, + dync_item_dialogVisible:false, + dync_item:{}, paperSetting:{pageSize_name:'A5',} } }, @@ -446,14 +460,9 @@ export default { loadingInstance.close(); },100); }) - }, - export_excel(){ - let _this=this - //seriesLoadScripts('cdn/exceljs/exceljs.min.js',null,function (){ - // exceljs_inner_exec(_this.result) - //}) - seriesLoadScripts('cdn/xlsx/dist/xlsx.full.min.js',null,function (){ - xlsxjs_inner_exec(_this,_this.name_lable_map) + else if(command=="docx") + seriesLoadScripts('cdn/html-to-docx/dist/html-to-docx.umd.js',null,function (){ + docx_inner_exec(_this,_this.name_lable_map) }) }, async export_pdf(){ diff --git a/front/src/views/rpt_design/templateManger.vue b/front/src/views/rpt_design/templateManger.vue index 0ccf335..929ec47 100644 --- a/front/src/views/rpt_design/templateManger.vue +++ b/front/src/views/rpt_design/templateManger.vue @@ -14,15 +14,14 @@ style="height:100%" v-model="one.val" :options="{tabSize: 4, mode: one.mode, - styleActiveLine: true,lineWrapping: true, + styleActiveLine: true,lineWrapping: true,lineNumbers: true,line: true, theme: 'cobalt',showCursorWhenSelecting: true, cursorBlinkRate:0 }" @ready="editor_ready(one.name)" /> - + @@ -56,6 +55,11 @@ + + + + + @@ -145,15 +149,16 @@ export default { return { data_ready:false, //['notebook','before_exec_script','footer2','luckysheet_conditionformat',] - tab_value:"notebook", + tab_value:"before_exec_script", tmp_css:{'BACKGROUND-COLOR':'#FFF','COLOR':'#000','FONT-SIZE':'11','FONT':'微软雅黑','layout_mode':'','border_box':'div', 'show_form':'true',layout_row_height:"30",layout_colNum:24,layout_margin:"10",layout_pan_height:"100%",'row_col_gutter':'10' - ,'firstNoQuery':'false' + ,'firstNoQuery':'false','cr_front_validate':'false' }, temp_props:[ - {'name':'notebook','mode':"javascript",'label':'记事本','val':"11"}, + {'name':'before_exec_script','mode':"javascript",'label':'后端运行前脚本','val':"11"}, {'name':'footer2','mode':"javascript",'label':'前端页面css和js脚本','val':"22"}, + {'name':'notebook','mode':"javascript",'label':'记事本','val':"11"}, ], action_name:"", dialogVisible:false, diff --git a/front/src/views/rpt_design/utils/export_excel.js b/front/src/views/rpt_design/utils/export_excel.js index 062ce79..ab73324 100644 --- a/front/src/views/rpt_design/utils/export_excel.js +++ b/front/src/views/rpt_design/utils/export_excel.js @@ -72,7 +72,7 @@ function find_style(tbl,rowNo,colNo,cur_tbl_class_dict){ let default_css function parse_elelment(x_ele){ let ccc,i_idx - let ret={'font':{},'alignment':{},'border':{},'fill':{}}; + let ret={'font':{},'alignment':{wrapText: true},'border':{},'fill':{}}; x_ele.split(";").forEach(element => { if(element=="") return @@ -220,11 +220,15 @@ export async function exceljs_inner_exec(_this,name_lable_map){ const row = ws.getRow(line_no+1)// 从1 开始计数,设置行高 row.height= (cur_table.rowlenArr[line_no]??cur_table.rowlenArr["default"] )*72/96 for(let one_cell of one_line){ + console.info(one_cell) //one_line.forEach(async (one_cell) => { - if(col_no>=column_nums) + if(col_no>=column_nums){ + col_no++ continue + } if(tableBitFlag[line_no].get(col_no)) { + col_no++ continue; } tableBitFlag[line_no].set(col_no ,1) @@ -396,3 +400,25 @@ export async function exceljs_inner_exec(_this,name_lable_map){ "这里是下载的文件名" + ".xlsx"); } +import ResultGrid2HtmlTable2 from './resultGrid2HtmlTable.js' +export async function docx_inner_exec(_this,name_lable_map){ + let ws ,title,one_obj,htmlString + Object.keys( name_lable_map).forEach(one => { + one_obj=name_lable_map[one] + if(one_obj.component=="luckySheetProxy"){ + if (_this.result.data[one].type== "common"){ + let cur_grid=_this.result.data[one] + let TABLEOBJ=new ResultGrid2HtmlTable2(cur_grid,{clientWidth:10000000},{no_use_parent_css:true,fit:false,page_size:10000},_this.result.defaultsetting) + htmlString=TABLEOBJ.show(1,10000) + } + } + }); + const fileBuffer = await HTMLtoDOCX(htmlString, null, { + table: { row: { cantSplit: true } }, + footer: true, + pageNumber: true, + }); + + saveAs(new Blob([s2ab(fileBuffer)], { type: "application/octet-stream"}), + "这里是下载的文件名" + ".docx"); +} \ No newline at end of file diff --git a/front/src/views/rpt_design/utils/resultGrid2HtmlTable.js b/front/src/views/rpt_design/utils/resultGrid2HtmlTable.js index 63ee4be..3e7754e 100644 --- a/front/src/views/rpt_design/utils/resultGrid2HtmlTable.js +++ b/front/src/views/rpt_design/utils/resultGrid2HtmlTable.js @@ -213,12 +213,12 @@ function build_col_arr(s_col,e_col){ return ret } export default class ResultGrid2HtmlTable{ - constructor(param_grid,el,setting,footer2,defaultsetting){ + constructor(param_grid,el,setting,defaultsetting){ let {name,tableData,extend_lines,rowlenArr,hyperlink,conditionformat, columnlenArr,styles,loc_style,colName_lines,my_sort,columns, config_merge,reportDefaultCss,optimize,abs_to_design} ={...param_grid} this.el=el - this.footer2=footer2 + this.sort_col={"col":-1,"isAsc":0} this.setting=setting this.defaultsetting=defaultsetting @@ -569,8 +569,9 @@ export default class ResultGrid2HtmlTable{ row_type='isComment' else row_type='isComment isAfterExtend' + let row_h=rowlenArr[rowNo]??rowlenArr["default"] sb.append(``) + style='display:${(row_h==0 || (row_pr&& row_pr!=0 ) )?'none':'table-row'}; height:${row_h}px' >`) rowData.forEach((cell,colNo)=>{ if(false== col_arr.includes(colNo)){ @@ -615,7 +616,7 @@ export default class ResultGrid2HtmlTable{ disp=`` }//max-height:${max_height-1}px; let style=`style="max-width:${max_width*this.ratio-4}px;width:${max_width*this.ratio-4}px;` - if(!this.setting.auto_line_height || this.defaultsetting.cr_auto_line_height=='true') + if(!this.param_grid.auto_line_height ) style=style+`max-height:${max_height-1}px;`// 不能设置height,否则就不会上下居中了 style=style+'"' if(this.optimize && cell_sort!=undefined){ diff --git a/front/src/views/rpt_design/utils/util.js b/front/src/views/rpt_design/utils/util.js index 72006a5..9fe3dac 100644 --- a/front/src/views/rpt_design/utils/util.js +++ b/front/src/views/rpt_design/utils/util.js @@ -191,7 +191,10 @@ export const build_chart_data=function (ds_name_source,report_result,clickedEle_ ds_name=ds_name.length>1?ds_name[1]:ds_name[0] let real_data if(ds_name_source.startsWith("数据集")){ - real_data= JSON.parse(JSON.stringify(report_result.dataSet[ds_name][0])) + if(report_result.dataSet[ds_name]) + real_data= JSON.parse(JSON.stringify(report_result.dataSet[ds_name][0])) + else + return [[],[],[]]; } else if(ds_name_source.startsWith("元素")){ let cur_grid=report_result.data[ds_name] @@ -1287,32 +1290,38 @@ export function randomRgbColor() { //随机生成RGB颜色 } import {request} from 'axios' import x2js from 'x2js' -export function call_server_func(func_name,func_params,_this,get_post='post') { - let data=new FormData(); - data.append("__call_func",JSON.stringify({func_name,func_params})) - let run_url - if(["preview","design"].includes( _this.mode) || ["preview","design"].includes( _this.context?.mode)){ +function getUrl(_this,data){ + if(typeof(_this)=="string") + return _this + else if(["preview","design"].includes( _this.mode) || ["preview","design"].includes( _this.context?.mode)){ const x2jsone=new x2js(); //实例 data.append("_content", x2jsone.js2xml({report:_this.context.report}) ) data.append("reportName", _this.context.report.reportName) let grpId=_this.context.report.reportName.split(":")[0] - run_url=`${baseUrl}/design/preview${grpId==0?"":":"+grpId}` + return `${baseUrl}/design/preview${grpId==0?"":":"+grpId}` } - else if(_this.mode=="run"| _this.context?.mode=="run"){ + else if(_this.mode=="run"| _this.context?.mode=="run"){ if(window.location.pathname.endsWith("run.html")) - run_url=`${baseUrl}/run:${window.location.hash.substring(1)}` + return `${baseUrl}/run:${window.location.hash.substring(1)}` else// if(window.location.pathname.endsWith("run")) - run_url=window.location.href + return window.location.href } - //if(get_post=='post') - return request({ - method: 'post', - data, - url: run_url, - withCredentials: true - }) +} +export function call_server_func(func_name,func_params,_this,get_post='post') { + let data=new FormData(); + data.append("__call_func",JSON.stringify({func_name,func_params})) + let run_url=getUrl(_this,data) + if(run_url) + return request({method: 'post',data,url: run_url,withCredentials: true + }) + else{ + return new Promise((resolve,reject) => { + reject(`call_server_func 远程调用${func_name},没有定义url`); + }) + } } window.cellreport.call_server_func=call_server_func + export { designGrid2LuckySheet,luckySheet2ReportGrid,resultGrid2LuckySheet, loadFile,watermark