(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[110],{"4K8j":function(t,e,n){"use strict";n.r(e);var i=n("ZZRV"),r=n.n(i),s=n("dQ5l"),h="item\tgraph\nmyserver1.cpu.load5\tmyserver1.cpu.load\nmyserver1.cpu.load15\tmyserver1.cpu.load",a="item\tgraph\r\nmyserver1.cpu.load5\tmyserver1.cpu.load\r\nmyserver1.cpu.load15\tmyserver1.cpu.load\r\n";e["default"]=function(){return r.a.createElement(s["a"],{output:h,actual_output:a})}},TVoq:function(t,e,n){},bSzW:function(t,e){var n=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},i=-1,r=1,s=0;n.Diff=function(t,e){return[t,e]},n.prototype.diff_main=function(t,e,i,r){"undefined"==typeof r&&(r=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var h=r;if(null==t||null==e)throw new Error("Null input. (diff_main)");if(t==e)return t?[new n.Diff(s,t)]:[];"undefined"==typeof i&&(i=!0);var a=i,f=this.diff_commonPrefix(t,e),l=t.substring(0,f);t=t.substring(f),e=e.substring(f),f=this.diff_commonSuffix(t,e);var g=t.substring(t.length-f);t=t.substring(0,t.length-f),e=e.substring(0,e.length-f);var o=this.diff_compute_(t,e,a,h);return l&&o.unshift(new n.Diff(s,l)),g&&o.push(new n.Diff(s,g)),this.diff_cleanupMerge(o),o},n.prototype.diff_compute_=function(t,e,h,a){var f;if(!t)return[new n.Diff(r,e)];if(!e)return[new n.Diff(i,t)];var l=t.length>e.length?t:e,g=t.length>e.length?e:t,o=l.indexOf(g);if(-1!=o)return f=[new n.Diff(r,l.substring(0,o)),new n.Diff(s,g),new n.Diff(r,l.substring(o+g.length))],t.length>e.length&&(f[0][0]=f[2][0]=i),f;if(1==g.length)return[new n.Diff(i,t),new n.Diff(r,e)];var c=this.diff_halfMatch_(t,e);if(c){var u=c[0],p=c[1],d=c[2],_=c[3],b=c[4],v=this.diff_main(u,d,h,a),m=this.diff_main(p,_,h,a);return v.concat([new n.Diff(s,b)],m)}return h&&t.length>100&&e.length>100?this.diff_lineMode_(t,e,a):this.diff_bisect_(t,e,a)},n.prototype.diff_lineMode_=function(t,e,h){var a=this.diff_linesToChars_(t,e);t=a.chars1,e=a.chars2;var f=a.lineArray,l=this.diff_main(t,e,!1,h);this.diff_charsToLines_(l,f),this.diff_cleanupSemantic(l),l.push(new n.Diff(s,""));var g=0,o=0,c=0,u="",p="";while(g=1&&c>=1){l.splice(g-o-c,o+c),g=g-o-c;for(var d=this.diff_main(u,p,!1,h),_=d.length-1;_>=0;_--)l.splice(g,0,d[_]);g+=d.length}c=0,o=0,u="",p="";break}g++}return l.pop(),l},n.prototype.diff_bisect_=function(t,e,s){for(var h=t.length,a=e.length,f=Math.ceil((h+a)/2),l=f,g=2*f,o=new Array(g),c=new Array(g),u=0;us)break;for(var y=-w+_;y<=w-b;y+=2){var x=l+y;A=y==-w||y!=w&&o[x-1]h)b+=2;else if(M>a)_+=2;else if(d){var D=l+p-y;if(D>=0&&D=k)return this.diff_bisectSplit_(t,e,A,M,s)}}}for(var E=-w+v;E<=w-m;E+=2){D=l+E;k=E==-w||E!=w&&c[D-1]h)m+=2;else if(S>a)v+=2;else if(!d){x=l+p-E;if(x>=0&&x=k)return this.diff_bisectSplit_(t,e,A,M,s)}}}}return[new n.Diff(i,t),new n.Diff(r,e)]},n.prototype.diff_bisectSplit_=function(t,e,n,i,r){var s=t.substring(0,n),h=e.substring(0,i),a=t.substring(n),f=e.substring(i),l=this.diff_main(s,h,!1,r),g=this.diff_main(a,f,!1,r);return l.concat(g)},n.prototype.diff_linesToChars_=function(t,e){var n=[],i={};function r(t){var e="",r=0,h=-1,a=n.length;while(hi?t=t.substring(n-i):ne.length?t:e,i=t.length>e.length?e:t;if(n.length<4||2*i.length=t.length?[i,s,h,a,g]:null}var h,a,f,l,g,o=s(n,i,Math.ceil(n.length/4)),c=s(n,i,Math.ceil(n.length/2));if(!o&&!c)return null;h=c?o&&o[4].length>c[4].length?o:c:o,t.length>e.length?(a=h[0],f=h[1],l=h[2],g=h[3]):(l=h[0],g=h[1],a=h[2],f=h[3]);var u=h[4];return[a,f,l,g,u]},n.prototype.diff_cleanupSemantic=function(t){var e=!1,h=[],a=0,f=null,l=0,g=0,o=0,c=0,u=0;while(l0?h[a-1]:-1,g=0,o=0,c=0,u=0,f=null,e=!0)),l++;e&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),l=1;while(l=b?(_>=p.length/2||_>=d.length/2)&&(t.splice(l,0,new n.Diff(s,d.substring(0,_))),t[l-1][1]=p.substring(0,p.length-_),t[l+1][1]=d.substring(_),l++):(b>=p.length/2||b>=d.length/2)&&(t.splice(l,0,new n.Diff(s,p.substring(0,b))),t[l-1][0]=r,t[l-1][1]=d.substring(0,d.length-b),t[l+1][0]=i,t[l+1][1]=p.substring(b),l++),l++}l++}},n.prototype.diff_cleanupSemanticLossless=function(t){function e(t,e){if(!t||!e)return 6;var i=t.charAt(t.length-1),r=e.charAt(0),s=i.match(n.nonAlphaNumericRegex_),h=r.match(n.nonAlphaNumericRegex_),a=s&&i.match(n.whitespaceRegex_),f=h&&r.match(n.whitespaceRegex_),l=a&&i.match(n.linebreakRegex_),g=f&&r.match(n.linebreakRegex_),o=l&&t.match(n.blanklineEndRegex_),c=g&&e.match(n.blanklineStartRegex_);return o||c?5:l||g?4:s&&!a&&f?3:a||f?2:s||h?1:0}var i=1;while(i=u&&(u=p,g=r,o=h,c=a)}t[i-1][1]!=g&&(g?t[i-1][1]=g:(t.splice(i-1,1),i--),t[i][1]=o,c?t[i+1][1]=c:(t.splice(i+1,1),i--))}i++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(t){var e=!1,h=[],a=0,f=null,l=0,g=!1,o=!1,c=!1,u=!1;while(l0?h[a-1]:-1,c=u=!1),e=!0)),l++;e&&this.diff_cleanupMerge(t)},n.prototype.diff_cleanupMerge=function(t){t.push(new n.Diff(s,""));var e,h=0,a=0,f=0,l="",g="";while(h1?(0!==a&&0!==f&&(e=this.diff_commonPrefix(g,l),0!==e&&(h-a-f>0&&t[h-a-f-1][0]==s?t[h-a-f-1][1]+=g.substring(0,e):(t.splice(0,0,new n.Diff(s,g.substring(0,e))),h++),g=g.substring(e),l=l.substring(e)),e=this.diff_commonSuffix(g,l),0!==e&&(t[h][1]=g.substring(g.length-e)+t[h][1],g=g.substring(0,g.length-e),l=l.substring(0,l.length-e))),h-=a+f,t.splice(h,a+f),l.length&&(t.splice(h,0,new n.Diff(i,l)),h++),g.length&&(t.splice(h,0,new n.Diff(r,g)),h++),h++):0!==h&&t[h-1][0]==s?(t[h-1][1]+=t[h][1],t.splice(h,1)):h++,f=0,a=0,l="",g="";break}""===t[t.length-1][1]&&t.pop();var o=!1;h=1;while(he)break;a=s,f=h}return t.length!=n&&t[n][0]===i?f:f+(e-a)},n.prototype.diff_prettyHtml=function(t){for(var e=[],n=/&/g,h=//g,f=/\n/g,l=0;l");switch(g){case r:e[l]=''+c+"";break;case i:e[l]=''+c+"";break;case s:e[l]=""+c+"";break}}return e.join("")},n.prototype.diff_text1=function(t){for(var e=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(e),r=this;function s(t,i){var s=t/e.length,h=Math.abs(n-i);return r.Match_Distance?s+h/r.Match_Distance:h?1:s}var h=this.Match_Threshold,a=t.indexOf(e,n);-1!=a&&(h=Math.min(s(0,a),h),a=t.lastIndexOf(e,n+e.length),-1!=a&&(h=Math.min(s(0,a),h)));var f,l,g=1<=p;b--){var v=i[t.charAt(b-1)];if(_[b]=0===u?(_[b+1]<<1|1)&v:(_[b+1]<<1|1)&v|(o[b+1]|o[b])<<1|1|o[b+1],_[b]&g){var m=s(u,b-1);if(m<=h){if(h=m,a=b-1,!(a>n))break;p=Math.max(1,2*n-a)}}}if(s(u+1,n)>h)break;o=_}return a},n.prototype.match_alphabet_=function(t){for(var e={},n=0;n2&&(this.diff_cleanupSemantic(f),this.diff_cleanupEfficiency(f));else if(t&&"object"==typeof t&&"undefined"==typeof e&&"undefined"==typeof h)f=t,a=this.diff_text1(f);else if("string"==typeof t&&e&&"object"==typeof e&&"undefined"==typeof h)a=t,f=e;else{if("string"!=typeof t||"string"!=typeof e||!h||"object"!=typeof h)throw new Error("Unknown call format to patch_make.");a=t,f=h}if(0===f.length)return[];for(var l=[],g=new n.patch_obj,o=0,c=0,u=0,p=a,d=a,_=0;_=2*this.Patch_Margin&&o&&(this.patch_addContext_(g,p),l.push(g),g=new n.patch_obj,o=0,p=d,c=u);break}b!==r&&(c+=v.length),b!==i&&(u+=v.length)}return o&&(this.patch_addContext_(g,p),l.push(g)),l},n.prototype.patch_deepCopy=function(t){for(var e=[],i=0;ithis.Match_MaxBits?(l=this.match_main(e,c.substring(0,this.Match_MaxBits),o),-1!=l&&(u=this.match_main(e,c.substring(c.length-this.Match_MaxBits),o+c.length-this.Match_MaxBits),(-1==u||l>=u)&&(l=-1))):l=this.match_main(e,c,o),-1==l)a[f]=!1,h-=t[f].length2-t[f].length1;else if(a[f]=!0,h=l-o,g=-1==u?e.substring(l,l+c.length):e.substring(l,u+this.Match_MaxBits),c==g)e=e.substring(0,l)+this.diff_text2(t[f].diffs)+e.substring(l+c.length);else{var p=this.diff_main(c,g,!1);if(c.length>this.Match_MaxBits&&this.diff_levenshtein(p)/c.length>this.Patch_DeleteThreshold)a[f]=!1;else{this.diff_cleanupSemanticLossless(p);for(var d,_=0,b=0;ba[0][1].length){var f=e-a[0][1].length;a[0][1]=i.substring(a[0][1].length)+a[0][1],h.start1-=f,h.start2-=f,h.length1+=f,h.length2+=f}if(h=t[t.length-1],a=h.diffs,0==a.length||a[a.length-1][0]!=s)a.push(new n.Diff(s,i)),h.length1+=e,h.length2+=e;else if(e>a[a.length-1][1].length){f=e-a[a.length-1][1].length;a[a.length-1][1]+=i.substring(0,f),h.length1+=f,h.length2+=f}return i},n.prototype.patch_splitMax=function(t){for(var e=this.Match_MaxBits,h=0;h2*e?(o.length1+=p.length,f+=p.length,c=!1,o.diffs.push(new n.Diff(u,p)),a.diffs.shift()):(p=p.substring(0,e-o.length1-this.Patch_Margin),o.length1+=p.length,f+=p.length,u===s?(o.length2+=p.length,l+=p.length):c=!1,o.diffs.push(new n.Diff(u,p)),p==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(p.length))}g=this.diff_text2(o.diffs),g=g.substring(g.length-this.Patch_Margin);var d=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);""!==d&&(o.length1+=d.length,o.length2+=d.length,0!==o.diffs.length&&o.diffs[o.diffs.length-1][0]===s?o.diffs[o.diffs.length-1][1]+=d:o.diffs.push(new n.Diff(s,d))),c||t.splice(++h,0,o)}}},n.prototype.patch_toText=function(t){for(var e=[],n=0;n/g,s=t[0],h=t[1]||"",f=h.replace(n,"&").replace(i,"<").replace(r,">"),l=!f.trim();if("oldStr"===e)switch(s){case a["DIFF_DELETE"]:return"")+f+"";case a["DIFF_EQUAL"]:return""+f+""}else switch(s){case a["DIFF_INSERT"]:return"")+f+"";case a["DIFF_EQUAL"]:return""+f+""}}e["a"]=function(t){var e=t.output,n=t.actual_output,r=Object(s["useReducer"])(o,g),a=Object(i["a"])(r,2),f=a[0],u=a[1];return Object(s["useEffect"])((function(){var t=l.diff_main(e||"",n||"");l.diff_cleanupEfficiency(t);var i=t.map((function(t){return c(t,"oldStr")})).join(""),r=t.map((function(t){return c(t,"newStr")})).join("");u({type:"init",payload:{oldStr:i,newStr:r}})}),[e,n]),h.a.createElement("div",{className:"diff-panel-container"},h.a.createElement("div",{dangerouslySetInnerHTML:{__html:f.oldStr}}),h.a.createElement("div",{dangerouslySetInnerHTML:{__html:f.newStr}}))}}}]);