diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 0000000..1f743a8 --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +json-diff-kit.js.org diff --git a/docs/index.css b/docs/index.css new file mode 100644 index 0000000..2012c5a --- /dev/null +++ b/docs/index.css @@ -0,0 +1,405 @@ +html, +body { + margin: 0; + padding: 0; + background: #f2f4f6; + font-family: sans-serif; + font-size: 14px; +} +code { + background: #f9f2f4; + color: #c7254e; + padding: 0 4px; +} +a, +a:visited { + color: #2196f3; +} +[disabled] { + cursor: not-allowed; +} +.json-diff-viewer { + border-collapse: collapse; + border-spacing: 0; + table-layout: fixed; + width: 100%; +} +.json-diff-viewer tr { + vertical-align: top; +} +.json-diff-viewer tr .line-add { + background: #a5d6a7; +} +.json-diff-viewer tr .line-remove { + background: #ef9a9a; +} +.json-diff-viewer tr .line-modify { + background: #ffe082; +} +.json-diff-viewer tr:hover td { + position: relative; +} +.json-diff-viewer tr:hover td::before { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.05); + content: ''; + pointer-events: none; +} +.json-diff-viewer tr.expand-line { + text-align: center; +} +.json-diff-viewer tr.expand-line td { + padding: 4px 0; +} +.json-diff-viewer tr.expand-line:hover td:before { + background: transparent; +} +.json-diff-viewer tr.expand-line .has-lines-before { + border-bottom: 1px solid; +} +.json-diff-viewer tr.expand-line .has-lines-after { + border-top: 1px solid; +} +.json-diff-viewer tr.expand-line button { + margin: 0 0.5em; + padding: 0; + color: #2196f3; + font-family: sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; + font-size: 12px; + border: none; + background: transparent; + user-select: none; + cursor: pointer; +} +.json-diff-viewer tr.expand-line button:hover { + text-decoration: underline; +} +.json-diff-viewer td { + padding: 1px; + font-size: 0; +} +.json-diff-viewer td.line-number { + border-right: 1px solid; + box-sizing: content-box; + font-family: monospace; + font-size: 14px; + padding: 0 8px; + text-align: right; + user-select: none; +} +.json-diff-viewer pre { + margin: 0; + font-size: 12px; + line-height: 16px; + overflow: hidden; + white-space: pre-wrap; + word-break: break-all; +} +.json-diff-viewer pre .inline-diff-add { + background: rgba(0, 0, 0, 0.08); + text-decoration: underline; + word-break: break-all; +} +.json-diff-viewer pre .inline-diff-remove { + background: rgba(0, 0, 0, 0.08); + text-decoration: line-through; + word-break: break-all; +} +.json-diff-viewer-virtual pre { + white-space: pre; + overflow-x: auto; +} +.json-diff-viewer-virtual pre::-webkit-scrollbar { + display: none; +} +.json-diff-viewer.json-diff-viewer-theme-monokai { + background: #272822; + color: #f8f8f2; +} +.json-diff-viewer.json-diff-viewer-theme-monokai .line-number { + color: #999999; +} +.json-diff-viewer.json-diff-viewer-theme-monokai tr:hover { + background: #3e3d32; +} +.json-diff-viewer.json-diff-viewer-theme-monokai tr .line-add { + background: #004400; +} +.json-diff-viewer.json-diff-viewer-theme-monokai tr .line-remove { + background: #440000; +} +.json-diff-viewer.json-diff-viewer-theme-monokai tr .line-modify { + background: #444400; +} +.json-diff-viewer.json-diff-viewer-theme-monokai .string { + color: #e6db74; +} +.json-diff-viewer.json-diff-viewer-theme-monokai .number, +.json-diff-viewer.json-diff-viewer-theme-monokai .boolean, +.json-diff-viewer.json-diff-viewer-theme-monokai .null { + color: #ae81ff; +} +.json-diff-viewer.json-diff-viewer-theme-monokai .key { + color: #f92672; +} +.playground { + display: flex; + height: 100vh; + background: #fff; +} +.playground .layout-left, +.playground .layout-right { + display: flex; + flex-direction: column; + box-sizing: border-box; +} +.playground .layout-left { + flex: 0 0 300px; + border-right: 1px solid #ecf0f4; + padding: 0 16px; + overflow-y: auto; +} +.playground .layout-left::-webkit-scrollbar { + display: none; +} +.playground .layout-left .logo { + display: flex; + justify-content: center; + align-items: center; + padding: 24px 0 8px; + font-size: 24px; + font-weight: 500; +} +.playground .layout-left .back { + background: #000; + color: #fff; + padding: 8px 16px; + border-radius: 4px; + text-align: center; + cursor: pointer; +} +.playground .layout-left .back:hover { + background: #333; + text-decoration: underline; +} +.playground .layout-left .config { + margin-top: 16px; +} +.playground .layout-left .config legend { + color: rgba(0, 0, 0, 0.5); + margin: 16px 0 8px; +} +.playground .layout-left .config label { + display: flex; + align-items: center; + margin-bottom: 8px; +} +.playground .layout-left .config label > span:first-child { + margin-right: auto; +} +.playground .layout-left .config label input, +.playground .layout-left .config label select { + height: 20px; + box-sizing: border-box; + font-size: 14px; + max-width: 120px; +} +.playground .layout-left .config label input[type=checkbox] { + margin: 0; +} +.playground .layout-left pre { + margin: 0 -16px; + padding: 8px 16px; + background: #f5f6f9; + font-size: 12px; +} +.playground .layout-left .statistics { + position: sticky; + bottom: 0; + margin: auto -16px 0; + padding: 16px; + display: flex; + background: #fff; +} +.playground .layout-right { + flex: 1; +} +.playground .layout-right .title { + padding: 8px 16px; + color: rgba(0, 0, 0, 0.5); +} +.playground .layout-right .title .control-button { + margin-left: 4px; + padding: 0 4px; + cursor: pointer; +} +.playground .layout-right .title .control-button:hover { + text-decoration: underline; +} +.playground .layout-right .loading, +.playground .layout-right .error { + margin-left: 8px; +} +.playground .layout-right .error { + color: red; +} +.playground .layout-right .inputs, +.playground .layout-right .results { + flex: 1; +} +.playground .layout-right .inputs { + display: flex; + border-top: 1px solid #ecf0f4; + border-bottom: 1px solid #ecf0f4; +} +.playground .layout-right .inputs textarea { + position: relative; + flex: 1; + height: 100%; + padding: 16px; + box-sizing: border-box; + font-size: 12px; + line-height: 1.5; + border: none; + outline: none; + resize: none; + font-family: monospace; + transition: all 0.3s; +} +.playground .layout-right .inputs textarea:first-child { + border-right: 1px solid #ecf0f4; +} +.playground .layout-right .inputs textarea:focus { + z-index: 1; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); +} +.playground .layout-right .inputs:focus-within textarea { + border-color: transparent; +} +.playground .layout-right .results { + position: relative; + overflow-y: auto; + border-top: 1px solid #ecf0f4; +} +.playground .layout-right.layout-right-fullscreen .title:first-child, +.playground .layout-right.layout-right-fullscreen .inputs { + display: none; +} +.token.operator { + background: none; +} +.demo-root { + background: #fff; + box-shadow: 0 0 30px rgba(0, 0, 0, 0.01); + box-sizing: border-box; + max-width: 1200px; + margin: auto; + padding: 1em 2em; + position: relative; + width: 100%; +} +.demo-root .statistics img { + margin-right: 8px; +} +.demo-root .banner { + display: inline-block; + padding: 8px 16px; + border-radius: 4px; + background: #000; + color: #fff; + cursor: pointer; +} +.demo-root .banner:hover { + background: #333; + text-decoration: underline; +} +.demo-root blockquote { + margin: 0 0 1em; + line-height: 24px; +} +.demo-root .diff-config form, +.demo-root .view-config form { + overflow: hidden; +} +.demo-root .diff-config form > label, +.demo-root .view-config form > label { + display: flex; + align-items: center; + margin-right: 8px; + padding: 0 4px; + border-radius: 4px; + user-select: none; + font-weight: bold; + background: #e5e6e9; +} +.demo-root .diff-config form > label span, +.demo-root .view-config form > label span { + font-weight: normal; + margin-left: 1em; +} +.demo-root .diff-config form > label input, +.demo-root .view-config form > label input, +.demo-root .diff-config form > label select, +.demo-root .view-config form > label select { + margin-left: 8px; +} +.demo-root .diff-config form > label input[type=number], +.demo-root .view-config form > label input[type=number] { + min-width: 8em; +} +.demo-root .diff-result .json-diff-viewer { + border: 1px solid; + border-radius: 4px; + box-sizing: border-box; + margin-top: 1em; + padding: 1em; +} +.demo-root .demo-footer { + border-top: 1px dashed; + margin: 4em 0 0; + padding: 2em 0; + text-align: center; +} +.label-wrapper { + position: relative; + margin-right: 4px; +} +.label-question-mark { + display: inline-flex; + justify-content: center; + align-items: center; + width: 16px; + height: 16px; + box-sizing: border-box; + border: 1px solid; + border-radius: 50%; + font-size: 12px; + cursor: pointer; +} +.label-tip { + display: none; +} +.label-wrapper:hover .label-question-mark { + background: #000; + border-color: #000; + color: #fff; +} +.label-wrapper:hover .label-tip { + display: block; + position: absolute; + top: 100%; + width: 268px; + padding: 8px 16px; + box-sizing: border-box; + background-color: #fff; + border-radius: 4px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); + line-height: 1.5; + color: #333; + font-size: 12px; + z-index: 1; +} diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..5567083 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,11 @@ + + + + JSON Diff Kit Playground + + + +
+ + + diff --git a/docs/index.js b/docs/index.js new file mode 100644 index 0000000..32eefd8 --- /dev/null +++ b/docs/index.js @@ -0,0 +1,350 @@ +(function (factory) { + typeof define === 'function' && define.amd ? define(factory) : + factory(); +})((function () { 'use strict'; + + function __$styleInject(css) { + if (!css) return; + + if (typeof window == 'undefined') return; + var style = document.createElement('style'); + style.setAttribute('media', 'screen'); + + style.innerHTML = css; + document.head.appendChild(style); + return css; + } + + var react = {exports: {}}; + + var react_production_min = {}; + + var getOwnPropertySymbols=Object.getOwnPropertySymbols;var hasOwnProperty$9=Object.prototype.hasOwnProperty;var propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(val){if(val===null||val===undefined){throw new TypeError("Object.assign cannot be called with null or undefined")}return Object(val)}function shouldUseNative(){try{if(!Object.assign){return false}var test1=new String("abc");test1[5]="de";if(Object.getOwnPropertyNames(test1)[0]==="5"){return false}var test2={};for(var i=0;i<10;i++){test2["_"+String.fromCharCode(i)]=i;}var order2=Object.getOwnPropertyNames(test2).map(function(n){return test2[n]});if(order2.join("")!=="0123456789"){return false}var test3={};"abcdefghijklmnopqrst".split("").forEach(function(letter){test3[letter]=letter;});if(Object.keys(Object.assign({},test3)).join("")!=="abcdefghijklmnopqrst"){return false}return true}catch(err){return false}}var objectAssign=shouldUseNative()?Object.assign:function(target,source){var from;var to=toObject(target);var symbols;for(var s=1;s=E};k=function(){};exports.unstable_forceFrameRate=function(a){0>a||125>>1,e=a[d];if(void 0!==e&&0I(n,c))void 0!==r&&0>I(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>I(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function I(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var L=[],M=[],N=1,O=null,P=3,Q=!1,R=!1,S=!1;function T(a){for(var b=J(M);null!==b;){if(null===b.callback)K(M);else if(b.startTime<=a)K(M),b.sortIndex=b.expirationTime,H(L,b);else break;b=J(M);}}function U(a){S=!1;T(a);if(!R)if(null!==J(L))R=!0,f(V);else {var b=J(M);null!==b&&g(U,b.startTime-a);}}function V(a,b){R=!1;S&&(S=!1,h());Q=!0;var c=P;try{T(b);for(O=J(L);null!==O&&(!(O.expirationTime>b)||a&&!exports.unstable_shouldYield());){var d=O.callback;if("function"===typeof d){O.callback=null;P=O.priorityLevel;var e=d(O.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?O.callback=e:O===J(L)&&K(L);T(b);}else K(L);O=J(L);}if(null!==O)var m=!0;else {var n=J(M);null!==n&&g(U,n.startTime-b);m=!1;}return m}finally{O=null,P=c,Q=!1;}}var W=k;exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null;};exports.unstable_continueExecution=function(){R||Q||(R=!0,f(V));};exports.unstable_getCurrentPriorityLevel=function(){return P};exports.unstable_getFirstCallbackNode=function(){return J(L)};exports.unstable_next=function(a){switch(P){case 1:case 2:case 3:var b=3;break;default:b=P;}var c=P;P=b;try{return a()}finally{P=c;}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=W;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3;}var c=P;P=a;try{return b()}finally{P=c;}};exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0d?(a.sortIndex=c,H(M,a),null===J(L)&&a===J(M)&&(S?h():S=!0,g(U,c-d))):(a.sortIndex=e,H(L,a),R||Q||(R=!0,f(V)));return a};exports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;try{return a.apply(this,arguments)}finally{P=c;}}};})(scheduler_production_min); + + {scheduler.exports=scheduler_production_min;} + + var aa=react.exports,m=objectAssign,r=scheduler.exports;function y(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;cb}return !1}function B(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g;}var D={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1,!1);});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1,!1);});["contentEditable","draggable","spellCheck","value"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1,!1);});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1,!1);});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1,!1);});["checked","multiple","muted","selected"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1,!1);});["capture","download"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1,!1);});["cols","rows","size","span"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1,!1);});["rowSpan","start"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1,!1);});var oa=/[\-:]([a-z])/g;function pa(a){return a[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,null,!1,!1);});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1);});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1);});["tabIndex","crossOrigin"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1,!1);});D.xlinkHref=new B("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0,!0);});function qa(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2h||e[g]!==f[h])return "\n"+e[g].replace(" at new "," at ");while(1<=g&&0<=h)}break}}}finally{Oa=!1,Error.prepareStackTrace=c;}return (a=a?a.displayName||a.name:"")?Na(a):""}function Qa(a){switch(a.tag){case 5:return Na(a.type);case 16:return Na("Lazy");case 13:return Na("Suspense");case 19:return Na("SuspenseList");case 0:case 2:case 15:return a=Pa(a.type,!1),a;case 11:return a=Pa(a.type.render,!1),a;case 22:return a=Pa(a.type._render,!1),a;case 1:return a=Pa(a.type,!0),a;default:return ""}}function Ra(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ua:return "Fragment";case ta:return "Portal";case xa:return "Profiler";case wa:return "StrictMode";case Ba:return "Suspense";case Ca:return "SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case za:return (a.displayName||"Context")+".Consumer";case ya:return (a._context.displayName||"Context")+".Provider";case Aa:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case Da:return Ra(a.type);case Fa:return Ra(a._render);case Ea:b=a._payload;a=a._init;try{return Ra(a(b))}catch(c){}}return null}function Sa(a){switch(typeof a){case"boolean":case"number":case"object":case"string":case"undefined":return a;default:return ""}}function Ta(a){var b=a.type;return (a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}function Ua(a){var b=Ta(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a);}});Object.defineProperty(a,b,{enumerable:c.enumerable});return {getValue:function(){return d},setValue:function(a){d=""+a;},stopTracking:function(){a._valueTracker=null;delete a[b];}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a));}function Wa(a){if(!a)return !1;var b=a._valueTracker;if(!b)return !0;var c=b.getValue();var d="";a&&(d=Ta(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function Ya(a,b){var c=b.checked;return m({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value};}function $a(a,b){b=b.checked;null!=b&&qa(a,"checked",b,!1);}function ab(a,b){$a(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c;}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?bb(a,b.type,c):b.hasOwnProperty("defaultValue")&&bb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked);}function cb(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b;}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c);}function bb(a,b,c){if("number"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c);}function db(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a);});return b}function eb(a,b){a=m({children:void 0},b);if(b=db(b.children))a.children=b;return a}function fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e=c.length))throw Error(y(93));c=c[0];}b=c;}null==b&&(b="");c=b;}a._wrapperState={initialValue:Sa(c)};}function ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d);}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b);}var kb={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function lb(a){switch(a){case"svg":return "http://www.w3.org/2000/svg";case"math":return "http://www.w3.org/1998/Math/MathML";default:return "http://www.w3.org/1999/xhtml"}}function mb(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?lb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}var nb,ob=function(a){return "undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)});}:a}(function(a,b){if(a.namespaceURI!==kb.svg||"innerHTML"in a)a.innerHTML=b;else {nb=nb||document.createElement("div");nb.innerHTML=""+b.valueOf().toString()+"";for(b=nb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild);}});function pb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b;}var qb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rb=["Webkit","ms","Moz","O"];Object.keys(qb).forEach(function(a){rb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qb[b]=qb[a];});});function sb(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||qb.hasOwnProperty(a)&&qb[a]?(""+b).trim():b+"px"}function tb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=sb(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e;}}var ub=m({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vb(a,b){if(b){if(ub[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(y(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(y(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML))throw Error(y(61))}if(null!=b.style&&"object"!==typeof b.style)throw Error(y(62))}}function wb(a,b){if(-1===a.indexOf("-"))return "string"===typeof b.is;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return !1;default:return !0}}function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;function Bb(a){if(a=Cb(a)){if("function"!==typeof yb)throw Error(y(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b));}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a;}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;ad?0:1<c;c++)b.push(a);return b}function $c(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Vc(b);a[b]=c;}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd=Math.LN2;function ad(a){return 0===a?32:31-(bd(a)/cd|0)|0}var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function gd(a,b,c,d){Kb||Ib();var e=hd,f=Kb;Kb=!0;try{Hb(e,a,b,c,d);}finally{(Kb=f)||Mb();}}function id(a,b,c,d){ed(dd,hd.bind(null,a,b,c,d));}function hd(a,b,c,d){if(fd){var e;if((e=0===(b&4))&&0=be),ee=String.fromCharCode(32),fe=!1;function ge(a,b){switch(a){case"keyup":return -1!==$d.indexOf(b.keyCode);case"keydown":return 229!==b.keyCode;case"keypress":case"mousedown":case"focusout":return !0;default:return !1}}function he(a){a=a.detail;return "object"===typeof a&&"data"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case"compositionend":return he(b);case"keypress":if(32!==b.which)return null;fe=!0;return ee;case"textInput":return a=b.data,a===ee&&fe?null:a;default:return null}}function ke(a,b){if(ie)return "compositionend"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return {node:c,offset:b-a};a=d;}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode;}c=void 0;}c=Ke(c);}}function Me(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Me(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function Ne(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href;}catch(d){c=!1;}if(c)a=b.contentWindow;else break;b=Xa(a.document);}return b}function Oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}var Pe=fa&&"documentMode"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;function Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,"selectionStart"in d&&Oe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Je(Se,d)||(Se=d,d=oe(Re,"onSelect"),0Af||(a.current=zf[Af],zf[Af]=null,Af--);}function I(a,b){Af++;zf[Af]=a.current;a.current=b;}var Cf={},M=Bf(Cf),N=Bf(!1),Df=Cf;function Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Ff(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Gf(){H(N);H(M);}function Hf(a,b,c){if(M.current!==Cf)throw Error(y(168));I(M,b);I(N,c);}function If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(y(108,Ra(b)||"Unknown",e));return m({},c,d)}function Jf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Cf;Df=M.current;I(M,a);I(N,N.current);return !0}function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(y(169));c?(a=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=a,H(N),H(M),I(M,a)):H(N);I(N,c);}var Lf=null,Mf=null,Nf=r.unstable_runWithPriority,Of=r.unstable_scheduleCallback,Pf=r.unstable_cancelCallback,Qf=r.unstable_shouldYield,Rf=r.unstable_requestPaint,Sf=r.unstable_now,Tf=r.unstable_getCurrentPriorityLevel,Uf=r.unstable_ImmediatePriority,Vf=r.unstable_UserBlockingPriority,Wf=r.unstable_NormalPriority,Xf=r.unstable_LowPriority,Yf=r.unstable_IdlePriority,Zf={},$f=void 0!==Rf?Rf:function(){},ag=null,bg=null,cg=!1,dg=Sf(),O=1e4>dg?Sf:function(){return Sf()-dg};function eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y(332))}}function fg(a){switch(a){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y(332))}}function gg(a,b){a=fg(a);return Nf(a,b)}function hg(a,b,c){a=fg(a);return Of(a,b,c)}function ig(){if(null!==bg){var a=bg;bg=null;Pf(a);}jg();}function jg(){if(!cg&&null!==ag){cg=!0;var a=0;try{var b=ag;gg(99,function(){for(;az?(q=u,u=null):q=u.sibling;var n=p(e,u,h[z],k);if(null===n){null===u&&(u=q);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,z);null===t?l=n:t.sibling=n;t=n;u=q;}if(z===h.length)return c(e,u),l;if(null===u){for(;zz?(q=u,u=null):q=u.sibling;var w=p(e,u,n.value,k);if(null===w){null===u&&(u=q);break}a&&u&&null===w.alternate&&b(e,u);g=f(w,g,z);null===t?l=w:t.sibling=w;t=w;u=q;}if(n.done)return c(e,u),l;if(null===u){for(;!n.done;z++,n=h.next())n=A(e,n.value,k),null!==n&&(g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);return l}for(u=d(e,u);!n.done;z++,n=h.next())n=C(u,e,z,n.value,k),null!==n&&(a&&null!==n.alternate&&u.delete(null===n.key?z:n.key),g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);a&&u.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===ua&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case sa:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ua){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);d=e(k,f.props);d.ref=Qg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling;}f.type===ua?(d=Xg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Vg(f.type,f.key,f.props,null,a.mode,h),h.ref=Qg(a,d,f),h.return=a,a=h);}return g(a);case ta:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else {c(a,d);break}else b(a,d);d=d.sibling;}d=Wg(f,a.mode,h);d.return=a;a=d;}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ug(f,a.mode,h),d.return=a,a=d),g(a);if(Pg(f))return x(a,d,f,h);if(La(f))return w(a,d,f,h);l&&Rg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y(152,Ra(a.type)||"Component"))}return c(a,d)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch=Bf($g);function dh(a){if(a===$g)throw Error(y(174));return a}function eh(a,b){I(ch,b);I(bh,a);I(ah,$g);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:mb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=mb(b,a);}H(ah);I(ah,b);}function fh(){H(ah);H(bh);H(ch);}function gh(a){dh(ch.current);var b=dh(ah.current);var c=mb(b,a.type);b!==c&&(I(bh,a),I(ah,c));}function hh(a){bh.current===a&&(H(ah),H(bh));}var P=Bf(0);function ih(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return;}b.sibling.return=b.return;b=b.sibling;}return null}var jh=null,kh=null,lh=!1;function mh(a,b){var c=nh(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c;}function oh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return !1;default:return !1}}function ph(a){if(lh){var b=kh;if(b){var c=b;if(!oh(a,b)){b=rf(c.nextSibling);if(!b||!oh(a,b)){a.flags=a.flags&-1025|2;lh=!1;jh=a;return}mh(jh,c);}jh=a;kh=rf(b.firstChild);}else a.flags=a.flags&-1025|2,lh=!1,jh=a;}}function qh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;jh=a;}function rh(a){if(a!==jh)return !1;if(!lh)return qh(a),lh=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!nf(b,a.memoizedProps))for(b=kh;b;)mh(a,b),b=rf(b.nextSibling);qh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(y(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){kh=rf(a.nextSibling);break a}b--;}else "$"!==c&&"$!"!==c&&"$?"!==c||b++;}a=a.nextSibling;}kh=null;}}else kh=jh?rf(a.stateNode.nextSibling):null;return !0}function sh(){kh=jh=null;lh=!1;}var th=[];function uh(){for(var a=0;af))throw Error(y(301));f+=1;T=S=null;b.updateQueue=null;vh.current=Fh;a=c(d,e);}while(zh)}vh.current=Gh;b=null!==S&&null!==S.next;xh=0;T=S=R=null;yh=!1;if(b)throw Error(y(300));return a}function Hh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T}function Ih(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null;}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else {if(null===a)throw Error(y(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a;}return T}function Jh(a,b){return "function"===typeof b?b(a):b}function Kh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g;}d.baseQueue=e=f;c.pending=null;}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((xh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else {var n={lane:l,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;R.lanes|=l;Dg|=l;}k=k.next;}while(null!==k&&k!==e)null===h?f=d:h.next=g;He(d,b.memoizedState)||(ug=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d;}return [b.memoizedState,c.dispatch]}function Lh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e)He(f,b.memoizedState)||(ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f;}return [f,d]}function Mh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(xh&a)===a)b._workInProgressVersionPrimary=d,th.push(b);if(a)return c(b._source);th.push(b);throw Error(y(350))}function Nh(a,b,c,d){var e=U;if(null===e)throw Error(y(349));var f=b._getVersion,g=f(b._source),h=vh.current,k=h.useState(function(){return Mh(e,b,c)}),l=k[1],n=k[0];k=T;var A=a.memoizedState,p=A.refs,C=p.getSnapshot,x=A.source;A=A.subscribe;var w=R;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=l;var a=f(b._source);if(!He(g,a)){a=c(b._source);He(n,a)||(l(a),a=Ig(w),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=e.entanglements,h=a;0c?98:c,function(){a(!0);});gg(97",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[wf]=b;a[xf]=d;Bi(a,b,!1,!1);b.stateNode=a;g=wb(c,d);switch(c){case"dialog":G("cancel",a);G("close",a);e=d;break;case"iframe":case"object":case"embed":G("load",a);e=d;break;case"video":case"audio":for(e=0;eJi&&(b.flags|=64,f=!0,Fi(d,!1),b.lanes=33554432);}else {if(!f)if(a=ih(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Fi(d,!0),null===d.tail&&"hidden"===d.tailMode&&!g.alternate&&!lh)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*O()-d.renderingStartTime>Ji&&1073741824!==c&&(b.flags|=64,f=!0,Fi(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g);}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=O(),c.sibling=null,b=P.current,I(P,f?b&1|2:b&1),c):null;case 23:case 24:return Ki(),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&"unstable-defer-without-hiding"!==d.mode&&(b.flags|=4),null}throw Error(y(156,b.tag))}function Li(a){switch(a.tag){case 1:Ff(a.type)&&Gf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,a):null;case 3:fh();H(N);H(M);uh();b=a.flags;if(0!==(b&64))throw Error(y(285));a.flags=b&-4097|64;return a;case 5:return hh(a),null;case 13:return H(P),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return H(P),null;case 4:return fh(),null;case 10:return rg(a),null;case 23:case 24:return Ki(),null;default:return null}}function Mi(a,b){try{var c="",d=b;do c+=Qa(d),d=d.return;while(d)var e=c;}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack;}return {value:a,source:b,stack:e}}function Ni(a,b){try{console.error(b.value);}catch(c){setTimeout(function(){throw c});}}var Oi="function"===typeof WeakMap?WeakMap:Map;function Pi(a,b,c){c=zg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Qi||(Qi=!0,Ri=d);Ni(a,b);};return c}function Si(a,b,c){c=zg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){Ni(a,b);return d(e)};}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===Ti?Ti=new Set([this]):Ti.add(this),Ni(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""});});return c}var Ui="function"===typeof WeakSet?WeakSet:Set;function Vi(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null);}catch(c){Wi(a,c);}else b.current=null;}function Xi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:lg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b;}return;case 3:b.flags&256&&qf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(y(163))}function Yi(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d();}a=a.next;}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Zi(c,a),$i(c,a));a=d;}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:lg(c.type,b.memoizedProps),a.componentDidUpdate(d,b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Eg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode;}Eg(c,b,a);}return;case 5:a=c.stateNode;null===b&&c.flags&4&&mf(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Cc(c))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(y(163))}function aj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,"function"===typeof d.setProperty?d.setProperty("display","none","important"):d.display="none";else {d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null;d.style.display=sb("display",e);}}else if(6===c.tag)c.stateNode.nodeValue=b?"":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===a)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return;}c.sibling.return=c.return;c=c.sibling;}}function bj(a,b){if(Mf&&"function"===typeof Mf.onCommitFiberUnmount)try{Mf.onCommitFiberUnmount(Lf,b);}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Zi(b,c);else {d=b;try{e();}catch(f){Wi(d,f);}}c=c.next;}while(c!==a)}break;case 1:Vi(b);a=b.stateNode;if("function"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount();}catch(f){Wi(b,f);}break;case 5:Vi(b);break;case 4:cj(a,b);}}function dj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null;}function ej(a){return 5===a.tag||3===a.tag||4===a.tag}function fj(a){a:{for(var b=a.return;null!==b;){if(ej(b))break a;b=b.return;}throw Error(y(160))}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(y(161))}c.flags&16&&(pb(b,""),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ej(c.return)){c=null;break a}c=c.return;}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child;}if(!(c.flags&2)){c=c.stateNode;break a}}d?gj(a,c,b):hj(a,c,b);}function gj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=jf));else if(4!==d&&(a=a.child,null!==a))for(gj(a,b,c),a=a.sibling;null!==a;)gj(a,b,c),a=a.sibling;}function hj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(hj(a,b,c),a=a.sibling;null!==a;)hj(a,b,c),a=a.sibling;}function cj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(y(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return;}d=!0;}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(bj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else {if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return;}k.sibling.return=k.return;k=k.sibling;}f?(g=e,h=c.stateNode,8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode);}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(bj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1);}c.sibling.return=c.return;c=c.sibling;}}function ij(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[xf]=d;"input"===a&&"radio"===d.type&&null!=d.name&&$a(c,d);wb(a,e);b=wb(a,d);for(e=0;ee&&(e=g);c&=~f;}c=e;c=O()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*nj(c/1960))-c;if(10 component higher in the tree to provide a loading indicator or placeholder to display.");}5!==V&&(V=2);k=Mi(k,h);p=g;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var J=Pi(p,f,b);Bg(p,J);break a;case 1:f=k;var K=p.type,Q=p.stateNode;if(0===(p.flags&64)&&("function"===typeof K.getDerivedStateFromError||null!==Q&&"function"===typeof Q.componentDidCatch&&(null===Ti||!Ti.has(Q)))){p.flags|=4096;b&=-b;p.lanes|=b;var L=Si(p,f,b);Bg(p,L);break a}}p=p.return;}while(null!==p)}Zj(c);}catch(va){b=va;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}function Pj(){var a=oj.current;oj.current=Gh;return null===a?Gh:a}function Tj(a,b){var c=X;X|=16;var d=Pj();U===a&&W===b||Qj(a,b);do try{ak();break}catch(e){Sj(a,e);}while(1)qg();X=c;oj.current=d;if(null!==Y)throw Error(y(261));U=null;W=0;return V}function ak(){for(;null!==Y;)bk(Y);}function Rj(){for(;null!==Y&&!Qf();)bk(Y);}function bk(a){var b=ck(a.alternate,a,qj);a.memoizedProps=a.pendingProps;null===b?Zj(a):Y=b;pj.current=null;}function Zj(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=Gi(c,b,qj);if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(qj&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d;}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1g&&(h=g,g=J,J=h),h=Le(t,J),f=Le(t,g),h&&f&&(1!==v.rangeCount||v.anchorNode!==h.node||v.anchorOffset!==h.offset||v.focusNode!==f.node||v.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),v.removeAllRanges(),J>g?(v.addRange(q),v.extend(f.node,f.offset)):(q.setEnd(f.node,f.offset),v.addRange(q))))));q=[];for(v=t;v=v.parentNode;)1===v.nodeType&&q.push({element:v,left:v.scrollLeft,top:v.scrollTop});"function"===typeof t.focus&&t.focus();for(t=0;tO()-jj?Qj(a,0):uj|=c);Mj(a,b);}function lj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===eg()?1:2:(0===Gj&&(Gj=tj),b=Yc(62914560&~Gj),0===b&&(b=4194304)));c=Hg();a=Kj(a,b);null!==a&&($c(a,b,c),Mj(a,c));}var ck;ck=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||N.current)ug=!0;else if(0!==(c&d))ug=0!==(a.flags&16384)?!0:!1;else {ug=!1;switch(b.tag){case 3:ri(b);sh();break;case 5:gh(b);break;case 1:Ff(b.type)&&Jf(b);break;case 4:eh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;I(mg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return ti(a,b,c);I(P,P.current&1);b=hi(a,b,c);return null!==b?b.sibling:null}I(P,P.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ai(a,b,c);b.flags|=64;}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);I(P,P.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,mi(a,b,c)}return hi(a,b,c)}else ug=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Ef(b,M.current);tg(b,c);e=Ch(null,b,d,a,e,c);b.flags|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(Ff(d)){var f=!0;Jf(b);}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;xg(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&Gg(b,d,g,a);e.updater=Kg;b.stateNode=e;e._reactInternals=b;Og(b,d,a,c);b=qi(null,b,d,!0,f,c);}else b.tag=0,fi(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=hk(e);a=lg(e,a);switch(f){case 0:b=li(null,b,e,a,c);break a;case 1:b=pi(null,b,e,a,c);break a;case 11:b=gi(null,b,e,a,c);break a;case 14:b=ii(null,b,e,lg(e.type,a),d,c);break a}throw Error(y(306,e,""))}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),li(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),pi(a,b,d,e,c);case 3:ri(b);d=b.updateQueue;if(null===a||null===d)throw Error(y(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;yg(a,b);Cg(b,d,null,c);d=b.memoizedState.element;if(d===e)sh(),b=hi(a,b,c);else {e=b.stateNode;if(f=e.hydrate)kh=rf(b.stateNode.containerInfo.firstChild),jh=b,f=lh=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e=wait||timeSinceLastCall<0||maxing&&timeSinceLastInvoke>=maxWait}function timerExpired(){var time=now();if(shouldInvoke(time)){return trailingEdge(time)}timerId=setTimeout(timerExpired,remainingWait(time));}function trailingEdge(time){timerId=undefined;if(trailing&&lastArgs){return invokeFunc(time)}lastArgs=lastThis=undefined;return result}function cancel(){if(timerId!==undefined){clearTimeout(timerId);}lastInvokeTime=0;lastArgs=lastCallTime=lastThis=timerId=undefined;}function flush(){return timerId===undefined?result:trailingEdge(now())}function debounced(){var time=now(),isInvoking=shouldInvoke(time);lastArgs=arguments;lastThis=this;lastCallTime=time;if(isInvoking){if(timerId===undefined){return leadingEdge(lastCallTime)}if(maxing){clearTimeout(timerId);timerId=setTimeout(timerExpired,wait);return invokeFunc(lastCallTime)}}if(timerId===undefined){timerId=setTimeout(timerExpired,wait);}return result}debounced.cancel=cancel;debounced.flush=flush;return debounced}var debounce_1=debounce; + + const concat=(a,b,prependEach=false)=>{if(!Array.isArray(a)||!Array.isArray(b)){throw new Error("Both arguments should be arrays.")}const lenA=a.length;const lenB=b.length;const len=lenA+lenB;const result=new Array(len);if(prependEach){for(let i=0;i{if(typeof value!=="object"||value===null){return false}if(map.has(value)){return true}map.set(value,true);if(Array.isArray(value)){for(let i=0;i{if(!obj||typeof obj!=="object"){return JSON.stringify(obj,replacer,space)}const t=depth<1?'"..."':Array.isArray(obj)?`[${obj.map(v=>stringify(v,replacer,space,depth-1)).join(",")}]`:`{${Object.keys(obj).map(k=>`"${k}": ${stringify(obj[k],replacer,space,depth-1)}`).join(", ")}}`;return JSON.stringify(JSON.parse(t),replacer,space)}; + + const formatValue=(value,depth=Infinity,pretty=false)=>{if(Number.isNaN(value)||value===null){return "null"}if(Array.isArray(value)||typeof value==="object"){return stringify(value,undefined,pretty?1:undefined,depth)}if(typeof value==="string"){return stringify(value)}return stringify(value)}; + + const getOrderByType=value=>{if(typeof value==="boolean"){return 0}if(typeof value==="number"){return 1}if(typeof value==="string"){return 2}if(value===null){return 3}if(Array.isArray(value)){return 4}if(typeof value==="object"){return 5}return -1};const cmp=(a,b,options)=>{const orderByTypeA=getOrderByType(a);const orderByTypeB=getOrderByType(b);if(orderByTypeA!==orderByTypeB){return orderByTypeA-orderByTypeB}if(a===null&&b===null||Array.isArray(a)&&Array.isArray(b)||orderByTypeA===5&&orderByTypeB===5){return 0}switch(typeof a){case"number":return a-b;case"string":if(options==null?void 0:options.ignoreCase){a=a.toLowerCase();b=b.toLowerCase();}return ab?1:0;case"boolean":return +a-+b}return 0}; + + const getType=value=>{if(Array.isArray(value)){return "array"}if(value===null){return "null"}return typeof value}; + + const prettyAppendLines=(linesLeft,linesRight,keyLeft,keyRight,valueLeft,valueRight,level,options)=>{const valueCmpOptions={ignoreCase:options.ignoreCase};const _resultLeft=formatValue(valueLeft,options.maxDepth,true).split("\n");const _resultRight=formatValue(valueRight,options.maxDepth,true).split("\n");if(cmp(valueLeft,valueRight,valueCmpOptions)!==0){if(options.showModifications){const maxLines=Math.max(_resultLeft.length,_resultRight.length);for(let i=_resultLeft.length;i{return arr.sort((a,b)=>cmp(a,b,{ignoreCase:options.ignoreCaseForKey}))}; + + const diffObject=(lhs,rhs,level=1,options,arrayDiffFunc)=>{if(level>(options.maxDepth||Infinity)){return [[{level,type:"equal",text:"..."}],[{level,type:"equal",text:"..."}]]}let linesLeft=[];let linesRight=[];if(lhs===null&&rhs===null||lhs===undefined&&rhs===undefined){return [linesLeft,linesRight]}else if(lhs===null||lhs===undefined){const addedLines=stringify(rhs,undefined,1).split("\n");for(let i=0;i-1}var _listCacheHas=listCacheHas$1; + + var assocIndexOf=_assocIndexOf;function listCacheSet$1(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){++this.size;data.push([key,value]);}else {data[index][1]=value;}return this}var _listCacheSet=listCacheSet$1; + + var listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++indexarrLength)){return false}var arrStacked=stack.get(array);var othStacked=stack.get(other);if(arrStacked&&othStacked){return arrStacked==other&&othStacked==array}var index=-1,result=true,seen=bitmask&COMPARE_UNORDERED_FLAG$1?new SetCache:undefined;stack.set(array,other);stack.set(other,array);while(++index-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER}var isLength_1=isLength$2; + + var baseGetTag$1=_baseGetTag,isLength$1=isLength_1,isObjectLike$1=isObjectLike_1;var argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag$1="[object Map]",numberTag="[object Number]",objectTag$2="[object Object]",regexpTag="[object RegExp]",setTag$1="[object Set]",stringTag="[object String]",weakMapTag$1="[object WeakMap]";var arrayBufferTag="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=true;typedArrayTags[argsTag$1]=typedArrayTags[arrayTag$1]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag$1]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag$1]=typedArrayTags[numberTag]=typedArrayTags[objectTag$2]=typedArrayTags[regexpTag]=typedArrayTags[setTag$1]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag$1]=false;function baseIsTypedArray$1(value){return isObjectLike$1(value)&&isLength$1(value.length)&&!!typedArrayTags[baseGetTag$1(value)]}var _baseIsTypedArray=baseIsTypedArray$1; + + function baseUnary$1(func){return function(value){return func(value)}}var _baseUnary=baseUnary$1; + + var _nodeUtil = {exports: {}}; + + (function(module,exports){var freeGlobal=_freeGlobal;var freeExports=exports&&!exports.nodeType&&exports;var freeModule=freeExports&&"object"=="object"&&module&&!module.nodeType&&module;var moduleExports=freeModule&&freeModule.exports===freeExports;var freeProcess=moduleExports&&freeGlobal.process;var nodeUtil=function(){try{var types=freeModule&&freeModule.require&&freeModule.require("util").types;if(types){return types}return freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch(e){}}();module.exports=nodeUtil;})(_nodeUtil,_nodeUtil.exports); + + var baseIsTypedArray=_baseIsTypedArray,baseUnary=_baseUnary,nodeUtil=_nodeUtil.exports;var nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray;var isTypedArray$2=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;var isTypedArray_1=isTypedArray$2; + + var baseTimes=_baseTimes,isArguments=isArguments_1,isArray$1=isArray_1,isBuffer$1=isBuffer$2.exports,isIndex=_isIndex,isTypedArray$1=isTypedArray_1;var objectProto$4=Object.prototype;var hasOwnProperty$3=objectProto$4.hasOwnProperty;function arrayLikeKeys$1(value,inherited){var isArr=isArray$1(value),isArg=!isArr&&isArguments(value),isBuff=!isArr&&!isArg&&isBuffer$1(value),isType=!isArr&&!isArg&&!isBuff&&isTypedArray$1(value),skipIndexes=isArr||isArg||isBuff||isType,result=skipIndexes?baseTimes(value.length,String):[],length=result.length;for(var key in value){if((inherited||hasOwnProperty$3.call(value,key))&&!(skipIndexes&&(key=="length"||isBuff&&(key=="offset"||key=="parent")||isType&&(key=="buffer"||key=="byteLength"||key=="byteOffset")||isIndex(key,length)))){result.push(key);}}return result}var _arrayLikeKeys=arrayLikeKeys$1; + + var objectProto$3=Object.prototype;function isPrototype$1(value){var Ctor=value&&value.constructor,proto=typeof Ctor=="function"&&Ctor.prototype||objectProto$3;return value===proto}var _isPrototype=isPrototype$1; + + function overArg$1(func,transform){return function(arg){return func(transform(arg))}}var _overArg=overArg$1; + + var overArg=_overArg;var nativeKeys$1=overArg(Object.keys,Object);var _nativeKeys=nativeKeys$1; + + var isPrototype=_isPrototype,nativeKeys=_nativeKeys;var objectProto$2=Object.prototype;var hasOwnProperty$2=objectProto$2.hasOwnProperty;function baseKeys$1(object){if(!isPrototype(object)){return nativeKeys(object)}var result=[];for(var key in Object(object)){if(hasOwnProperty$2.call(object,key)&&key!="constructor"){result.push(key);}}return result}var _baseKeys=baseKeys$1; + + var isFunction=isFunction_1,isLength=isLength_1;function isArrayLike$1(value){return value!=null&&isLength(value.length)&&!isFunction(value)}var isArrayLike_1=isArrayLike$1; + + var arrayLikeKeys=_arrayLikeKeys,baseKeys=_baseKeys,isArrayLike=isArrayLike_1;function keys$1(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}var keys_1=keys$1; + + var baseGetAllKeys=_baseGetAllKeys,getSymbols=_getSymbols,keys=keys_1;function getAllKeys$1(object){return baseGetAllKeys(object,keys,getSymbols)}var _getAllKeys=getAllKeys$1; + + var getAllKeys=_getAllKeys;var COMPARE_PARTIAL_FLAG$1=1;var objectProto$1=Object.prototype;var hasOwnProperty$1=objectProto$1.hasOwnProperty;function equalObjects$1(object,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG$1,objProps=getAllKeys(object),objLength=objProps.length,othProps=getAllKeys(other),othLength=othProps.length;if(objLength!=othLength&&!isPartial){return false}var index=objLength;while(index--){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty$1.call(other,key))){return false}}var objStacked=stack.get(object);var othStacked=stack.get(other);if(objStacked&&othStacked){return objStacked==other&&othStacked==object}var result=true;stack.set(object,other);stack.set(other,object);var skipCtor=isPartial;while(++index{if(options.ignoreCase){return typeof a==="string"&&typeof b==="string"&&a.toLowerCase()===b.toLowerCase()}if(options.recursiveEqual){return isEqual_1(a,b)}return a===b}; + + const shallowSimilarity=(left,right)=>{if(left===right){return 1}if(left===null||right===null){return 0}if(typeof left!=="object"||typeof right!=="object"){return 0}const leftKeys=Object.keys(left);const rightKeys=Object.keys(right);const leftKeysLength=leftKeys.length;const rightKeysLength=rightKeys.length;if(leftKeysLength===0||rightKeysLength===0){return 0}const leftKeysSet=new Set(leftKeys);const rightKeysSet=new Set(rightKeys);const intersection=new Set([...leftKeysSet].filter(x=>rightKeysSet.has(x)));if(intersection.size===0){return 0}if(intersection.size===1&&(leftKeysLength===1||rightKeysLength===1)&&left[leftKeys[0]]!==right[rightKeys[0]]){return 0}return Math.max(intersection.size/leftKeysLength,intersection.size/rightKeysLength)}; + + const lcs$1=(arrLeft,arrRight,keyLeft,keyRight,level,options)=>{const f=Array(arrLeft.length+1).fill(0).map(()=>Array(arrRight.length+1).fill(0));const backtrack=Array(arrLeft.length+1).fill(0).map(()=>Array(arrRight.length+1).fill(0));for(let i=1;i<=arrLeft.length;i++){backtrack[i][0]="up";}for(let j=1;j<=arrRight.length;j++){backtrack[0][j]="left";}for(let i=1;i<=arrLeft.length;i++){for(let j=1;j<=arrRight.length;j++){const typeI=getType(arrLeft[i-1]);const typeJ=getType(arrRight[j-1]);if(typeI===typeJ&&(typeI==="array"||typeI==="object")){if(options.recursiveEqual){if(isEqual(arrLeft[i-1],arrRight[j-1],options)||shallowSimilarity(arrLeft[i-1],arrRight[j-1])>.5){f[i][j]=f[i-1][j-1]+1;backtrack[i][j]="diag";}else if(f[i-1][j]>=f[i][j-1]){f[i][j]=f[i-1][j];backtrack[i][j]="up";}else {f[i][j]=f[i][j-1];backtrack[i][j]="left";}}else {f[i][j]=f[i-1][j-1]+1;backtrack[i][j]="diag";}}else if(isEqual(arrLeft[i-1],arrRight[j-1],options)){f[i][j]=f[i-1][j-1]+1;backtrack[i][j]="diag";}else if(f[i-1][j]>=f[i][j-1]){f[i][j]=f[i-1][j];backtrack[i][j]="up";}else {f[i][j]=f[i][j-1];backtrack[i][j]="left";}}}let i=arrLeft.length;let j=arrRight.length;let tLeft=[];let tRight=[];while(i>0||j>0){if(backtrack[i][j]==="diag"){const type=getType(arrLeft[i-1]);if(options.recursiveEqual&&(type==="array"||type==="object")&&isEqual(arrLeft[i-1],arrRight[j-1],options)){const reversedLeft=[];const reversedRight=[];prettyAppendLines(reversedLeft,reversedRight,"","",arrLeft[i-1],arrRight[j-1],level+1,options);tLeft=concat(tLeft,reversedLeft.reverse(),true);tRight=concat(tRight,reversedRight.reverse(),true);}else if(type==="array"){const[l,r]=diffArrayLCS(arrLeft[i-1],arrRight[j-1],keyLeft,keyRight,level+1,options);tLeft=concat(tLeft,l.reverse(),true);tRight=concat(tRight,r.reverse(),true);}else if(type==="object"){const[l,r]=diffObject(arrLeft[i-1],arrRight[j-1],level+2,options,diffArrayLCS);tLeft.unshift({level:level+1,type:"equal",text:"}"});tRight.unshift({level:level+1,type:"equal",text:"}"});tLeft=concat(tLeft,l.reverse(),true);tRight=concat(tRight,r.reverse(),true);tLeft.unshift({level:level+1,type:"equal",text:"{"});tRight.unshift({level:level+1,type:"equal",text:"{"});}else {const reversedLeft=[];const reversedRight=[];prettyAppendLines(reversedLeft,reversedRight,"","",arrLeft[i-1],arrRight[j-1],level+1,options);tLeft=concat(tLeft,reversedLeft.reverse(),true);tRight=concat(tRight,reversedRight.reverse(),true);}i--;j--;}else if(backtrack[i][j]==="up"){if(options.showModifications&&i>1&&backtrack[i-1][j]==="left"){const typeLeft=getType(arrLeft[i-1]);const typeRight=getType(arrRight[j-1]);if(typeLeft===typeRight){if(typeLeft==="array"){const[l,r]=diffArrayLCS(arrLeft[i-1],arrRight[j-1],keyLeft,keyRight,level+1,options);tLeft=concat(tLeft,l.reverse(),true);tRight=concat(tRight,r.reverse(),true);}else if(typeLeft==="object"){const[l,r]=diffObject(arrLeft[i-1],arrRight[j-1],level+2,options,diffArrayLCS);tLeft.unshift({level:level+1,type:"equal",text:"}"});tRight.unshift({level:level+1,type:"equal",text:"}"});tLeft=concat(tLeft,l.reverse(),true);tRight=concat(tRight,r.reverse(),true);tLeft.unshift({level:level+1,type:"equal",text:"{"});tRight.unshift({level:level+1,type:"equal",text:"{"});}else {tLeft.unshift({level:level+1,type:"modify",text:formatValue(arrLeft[i-1])});tRight.unshift({level:level+1,type:"modify",text:formatValue(arrRight[j-1])});}}else {const reversedLeft=[];const reversedRight=[];prettyAppendLines(reversedLeft,reversedRight,"","",arrLeft[i-1],arrRight[j-1],level+1,options);tLeft=concat(tLeft,reversedLeft.reverse(),true);tRight=concat(tRight,reversedRight.reverse(),true);}i--;j--;}else {const addedLines=stringify(arrLeft[i-1],undefined,1).split("\n");for(let i=addedLines.length-1;i>=0;i--){var _addedLines_i_match,_addedLines_i_match_;tLeft.unshift({level:level+1+(((_addedLines_i_match=addedLines[i].match(/^\s+/))==null?void 0:(_addedLines_i_match_=_addedLines_i_match[0])==null?void 0:_addedLines_i_match_.length)||0),type:"remove",text:addedLines[i].replace(/^\s+/,"").replace(/,$/g,"")});tRight.unshift({level:level+1,type:"equal",text:""});}i--;}}else {const addedLines=stringify(arrRight[j-1],undefined,1).split("\n");for(let i=addedLines.length-1;i>=0;i--){var _addedLines_i_match1,_addedLines_i_match_1;tLeft.unshift({level:level+1,type:"equal",text:""});tRight.unshift({level:level+1+(((_addedLines_i_match1=addedLines[i].match(/^\s+/))==null?void 0:(_addedLines_i_match_1=_addedLines_i_match1[0])==null?void 0:_addedLines_i_match_1.length)||0),type:"add",text:addedLines[i].replace(/^\s+/,"").replace(/,$/g,"")});}j--;}}return [tLeft,tRight]};const diffArrayLCS=(arrLeft,arrRight,keyLeft,keyRight,level,options,linesLeft=[],linesRight=[])=>{if(keyLeft&&keyRight){linesLeft.push({level,type:"equal",text:`"${keyLeft}": [`});linesRight.push({level,type:"equal",text:`"${keyRight}": [`});}else {linesLeft.push({level,type:"equal",text:"["});linesRight.push({level,type:"equal",text:"["});}if(level>=(options.maxDepth||Infinity)){linesLeft.push({level:level+1,type:"equal",text:"..."});linesRight.push({level:level+1,type:"equal",text:"..."});}else {const[tLeftReverse,tRightReverse]=lcs$1(arrLeft,arrRight,keyLeft,keyRight,level,options);linesLeft=concat(linesLeft,tLeftReverse);linesRight=concat(linesRight,tRightReverse);}linesLeft.push({level,type:"equal",text:"]"});linesRight.push({level,type:"equal",text:"]"});return [linesLeft,linesRight]}; + + const diffArrayNormal=(arrLeft,arrRight,keyLeft,keyRight,level,options,linesLeft=[],linesRight=[])=>{arrLeft=[...arrLeft];arrRight=[...arrRight];if(keyLeft&&keyRight){linesLeft.push({level,type:"equal",text:`"${keyLeft}": [`});linesRight.push({level,type:"equal",text:`"${keyRight}": [`});}else {linesLeft.push({level,type:"equal",text:"["});linesRight.push({level,type:"equal",text:"["});}if(level>=(options.maxDepth||Infinity)){linesLeft.push({level:level+1,type:"equal",text:"..."});linesRight.push({level:level+1,type:"equal",text:"..."});}else {while(arrLeft.length||arrRight.length){const itemLeft=arrLeft[0];const itemRight=arrRight[0];const leftType=getType(itemLeft);const rightType=getType(itemRight);if(arrLeft.length&&arrRight.length){if(leftType!==rightType){prettyAppendLines(linesLeft,linesRight,"","",itemLeft,itemRight,level+1,options);}else if(options.recursiveEqual&&["object","array"].includes(leftType)&&isEqual(itemLeft,itemRight,options)){prettyAppendLines(linesLeft,linesRight,"","",itemLeft,itemRight,level+1,options);}else if(leftType==="object"){linesLeft.push({level:level+1,type:"equal",text:"{"});linesRight.push({level:level+1,type:"equal",text:"{"});const[leftLines,rightLines]=diffObject(itemLeft,itemRight,level+2,options,diffArrayNormal);linesLeft=concat(linesLeft,leftLines);linesRight=concat(linesRight,rightLines);linesLeft.push({level:level+1,type:"equal",text:"}"});linesRight.push({level:level+1,type:"equal",text:"}"});}else if(leftType==="array"){const[resLeft,resRight]=diffArrayNormal(itemLeft,itemRight,"","",level+1,options,[],[]);linesLeft=concat(linesLeft,resLeft);linesRight=concat(linesRight,resRight);}else if(itemLeft===itemRight){linesLeft.push({level:level+1,type:"equal",text:formatValue(itemLeft)});linesRight.push({level:level+1,type:"equal",text:formatValue(itemRight)});}else {if(options.showModifications){linesLeft.push({level:level+1,type:"modify",text:formatValue(itemLeft)});linesRight.push({level:level+1,type:"modify",text:formatValue(itemRight)});}else {linesLeft.push({level:level+1,type:"remove",text:formatValue(itemLeft)});linesLeft.push({level:level+1,type:"equal",text:""});linesRight.push({level:level+1,type:"equal",text:""});linesRight.push({level:level+1,type:"add",text:formatValue(itemRight)});}}arrLeft.shift();arrRight.shift();}else if(arrLeft.length){linesLeft.push({level:level+1,type:"remove",text:formatValue(itemLeft)});linesRight.push({level:level+1,type:"equal",text:""});arrLeft.shift();}else if(arrRight.length){linesLeft.push({level:level+1,type:"equal",text:""});linesRight.push({level:level+1,type:"add",text:formatValue(itemRight)});arrRight.shift();}}}linesLeft.push({level,type:"equal",text:"]"});linesRight.push({level,type:"equal",text:"]"});return [linesLeft,linesRight]}; + + function _extends$4(){_extends$4=Object.assign||function(target){for(var i=1;i{if(!source||typeof source!=="object"){return source}if(Array.isArray(source)){const result=[...source];result.sort((a,b)=>{return cmp(a,b,{ignoreCase:options==null?void 0:options.ignoreCase})});return result.map(item=>sortInnerArrays(item,options))}const result=_extends$4({},source);for(const key in result){result[key]=sortInnerArrays(result[key],options);}return result}; + + const EQUAL_EMPTY_LINE={level:0,type:"equal",text:""};const EQUAL_LEFT_BRACKET_LINE={level:0,type:"equal",text:"{"};const EQUAL_RIGHT_BRACKET_LINE={level:0,type:"equal",text:"}"};let Differ=class Differ{detectCircular(source){if(this.options.detectCircular){if(detectCircular(source)){throw new Error(`Circular reference detected in object (with keys ${Object.keys(source).map(t=>`"${t}"`).join(", ")})`)}}}sortResultLines(left,right){for(let k=0;k0;i--){if(result[i].text){nextLine[i-1]=i;}else {nextLine[i-1]=nextLine[i];}}for(let i=0;i{var _line_match,_line_match_;return {level:((_line_match=line.match(/^\s+/))==null?void 0:(_line_match_=_line_match[0])==null?void 0:_line_match_.length)||0,type:"remove",text:line.replace(/^\s+/,"").replace(/,$/g,""),comma:line.endsWith(",")}});resultRight=stringify(sourceRight,undefined,1,this.options.maxDepth).split("\n").map(line=>{var _line_match,_line_match_;return {level:((_line_match=line.match(/^\s+/))==null?void 0:(_line_match_=_line_match[0])==null?void 0:_line_match_.length)||0,type:"add",text:line.replace(/^\s+/,"").replace(/,$/g,""),comma:line.endsWith(",")}});const lLength=resultLeft.length;const rLength=resultRight.length;resultLeft=concat(resultLeft,Array(rLength).fill(EQUAL_EMPTY_LINE));resultRight=concat(resultRight,Array(lLength).fill(EQUAL_EMPTY_LINE),true);}else if(typeLeft==="object"){[resultLeft,resultRight]=diffObject(sourceLeft,sourceRight,1,this.options,this.arrayDiffFunc);resultLeft.unshift(EQUAL_LEFT_BRACKET_LINE);resultLeft.push(EQUAL_RIGHT_BRACKET_LINE);resultRight.unshift(EQUAL_LEFT_BRACKET_LINE);resultRight.push(EQUAL_RIGHT_BRACKET_LINE);}else if(typeLeft==="array"){[resultLeft,resultRight]=this.arrayDiffFunc(sourceLeft,sourceRight,"","",0,this.options);}else if(sourceLeft!==sourceRight){if(this.options.ignoreCase){if(typeof sourceLeft==="string"&&typeof sourceRight==="string"&&sourceLeft.toLowerCase()===sourceRight.toLowerCase()){resultLeft=[{level:0,type:"equal",text:sourceLeft}];resultRight=[{level:0,type:"equal",text:sourceRight}];}}else if(this.options.showModifications){resultLeft=[{level:0,type:"modify",text:stringify(sourceLeft,undefined,undefined,this.options.maxDepth)}];resultRight=[{level:0,type:"modify",text:stringify(sourceRight,undefined,undefined,this.options.maxDepth)}];}else {resultLeft=[{level:0,type:"remove",text:stringify(sourceLeft,undefined,undefined,this.options.maxDepth)},EQUAL_EMPTY_LINE];resultRight=[EQUAL_EMPTY_LINE,{level:0,type:"add",text:stringify(sourceRight,undefined,undefined,this.options.maxDepth)}];}}else {resultLeft=[{level:0,type:"equal",text:stringify(sourceLeft,undefined,undefined,this.options.maxDepth)}];resultRight=[{level:0,type:"equal",text:stringify(sourceRight,undefined,undefined,this.options.maxDepth)}];}this.sortResultLines(resultLeft,resultRight);this.calculateLineNumbers(resultLeft);this.calculateLineNumbers(resultRight);this.calculateCommas(resultLeft);this.calculateCommas(resultRight);return [resultLeft,resultRight]}constructor({detectCircular=true,maxDepth=Infinity,showModifications=true,arrayDiffMethod="normal",ignoreCase=false,ignoreCaseForKey=false,recursiveEqual=false}={}){this.options={detectCircular,maxDepth,showModifications,arrayDiffMethod,ignoreCase,ignoreCaseForKey,recursiveEqual};this.arrayDiffFunc=arrayDiffMethod==="lcs"||arrayDiffMethod==="unorder-lcs"?diffArrayLCS:diffArrayNormal;}}; + + function _extends$3(){_extends$3=Object.assign||function(target){for(var i=1;i{return "hasLinesBefore"in segment||"hasLinesAfter"in segment};const getSegmentHeight=(segment,itemHeight,expandLineHeight)=>{return isExpandLine(segment)?expandLineHeight:itemHeight*(segment.end-segment.start+1)};const mergeSegments=(tokens,diffs)=>{const result=[];let token;let diff;if(tokens.length&&diffs.length){tokens=[...tokens];diffs=[...diffs];token=_extends$3({},tokens.shift());diff=_extends$3({},diffs.shift());while(1){if(token.start===diff.start){const end=Math.min(token.end,diff.end);result.push(_extends$3({},token,diff,{end}));token.start=diff.start=end;}else if(token.start_extends$3({},d,{token:token.token||"plain"})));if(!diffs.length)result.push(...tokens);return result}; + + const calculatePlaceholderHeight=(segments,accTop,startSegment,startLine,endSegment,endLine,itemHeight,expandLineHeight,totalHeight)=>{if(!accTop.length){return [0,0]}let topHeight=0;let bottomHeight=0;const startSegmentItem=segments[startSegment];if(isExpandLine(startSegmentItem)){topHeight=accTop[startSegment];}else {topHeight=accTop[startSegment]+(startLine-startSegmentItem.start)*itemHeight;}const endSegmentItem=segments[endSegment];if(isExpandLine(endSegmentItem)){bottomHeight=totalHeight-accTop[endSegment]-expandLineHeight;}else {bottomHeight=totalHeight-accTop[endSegment]-(endLine-endSegmentItem.start)*itemHeight;}return [topHeight,bottomHeight]}; + + const findVisibleLines=(segments,accTop,viewportTop,viewportBottom,itemHeight,expandLineHeight)=>{if(!accTop.length){return [0,0,0,0]}let startSegment=0;let endSegment=0;let startLine=0;let endLine=0;let l=0;let r=segments.length-1;while(1){let m=Math.floor((l+r)/2);const top=accTop[m];const bottom=top+getSegmentHeight(segments[m],itemHeight,expandLineHeight);if(bottom<=viewportTop){l=m+1;}else {r=m;}if(l===r){startSegment=l;break}}const startSegmentItem=segments[startSegment];if(isExpandLine(startSegmentItem)){startLine=startSegmentItem.start;}else {startLine=startSegmentItem.start+Math.floor((viewportTop-accTop[startSegment])/itemHeight);}l=0;r=segments.length-1;while(1){let m=Math.floor((l+r+1)/2);const top=accTop[m];if(top>=viewportBottom){r=m-1;}else {l=m;}if(l===r){endSegment=l;break}}const endSegmentItem=segments[endSegment];if(isExpandLine(endSegmentItem)){endLine=endSegmentItem.end;}else {endLine=endSegmentItem.start+Math.ceil((viewportBottom-accTop[endSegment])/itemHeight);}return [startSegment,startLine,endSegment,endLine]}; + + var bin = {}; + + Object.defineProperty(bin,"__esModule",{value:true});bin.applyPatch=bin.calcPatch=lcs_1=bin.lcs=bin.diff=bin.diff_core=void 0;function diff_internal(state,c){const{b,eq,stack_base}=state;let{i,N,j,M,Z,stack_top}=state;for(;;){switch(c){case 0:{Z_block:while(N>0&&M>0){b.fill(0,0,2*Z);const W=N-M;const L=N+M;const parity=L&1;const offsetx=i+N-1;const offsety=j+M-1;const hmax=(L+parity)/2;let z;h_loop:for(let h=0;h<=hmax;h++){const kmin=2*Math.max(0,h-M)-h;const kmax=h-2*Math.max(0,h-N);for(let k=kmin;k<=kmax;k+=2){const gkm=b[k-1-Z*Math.floor((k-1)/Z)];const gkp=b[k+1-Z*Math.floor((k+1)/Z)];const u=k===-h||k!==h&&gkm=1-h&&z=N){if(h>1||x!==u){stack_base[stack_top++]=i+x;stack_base[stack_top++]=N-x;stack_base[stack_top++]=j+y;stack_base[stack_top++]=M-y;N=u;M=v;Z=2*(Math.min(N,M)+1);continue Z_block}else break h_loop}}for(let k=kmin;k<=kmax;k+=2){const pkm=b[Z+k-1-Z*Math.floor((k-1)/Z)];const pkp=b[Z+k+1-Z*Math.floor((k+1)/Z)];const u=k===-h||k!==h&&pkm=-h&&z<=h&&x+b[z-Z*Math.floor(z/Z)]>=N){if(h>0||x!==u){stack_base[stack_top++]=i+N-u;stack_base[stack_top++]=u;stack_base[stack_top++]=j+M-v;stack_base[stack_top++]=v;N=N-x;M=M-y;Z=2*(Math.min(N,M)+1);continue Z_block}else break h_loop}}}if(N===M)continue;if(M>N){i+=N;j+=N;M-=N;N=0;}else {i+=M;j+=M;N-=M;M=0;}break}if(N+M!==0){if(state.pxe===i||state.pye===j){state.pxe=i+N;state.pye=j+M;}else {const sx=state.pxs;state.oxs=state.pxs;state.oxe=state.pxe;state.oys=state.pys;state.oye=state.pye;state.pxs=i;state.pxe=i+N;state.pys=j;state.pye=j+M;if(sx>=0){state.i=i;state.N=N;state.j=j;state.M=M;state.Z=Z;state.stack_top=stack_top;return 1}}}}case 1:{if(stack_top===0)return 2;M=stack_base[--stack_top];j=stack_base[--stack_top];N=stack_base[--stack_top];i=stack_base[--stack_top];Z=2*(Math.min(N,M)+1);c=0;}}}}let DiffGen=class DiffGen{[Symbol.iterator](){return this}next(){const{state,result}=this;if(this.c>1){result.done=true;result.value=undefined;return result}const c=diff_internal(state,this.c);this.c=c;if(c===1){result.value=[state.oxs,state.oxe,state.oys,state.oye];return result}if(state.pxs>=0){result.value=[state.pxs,state.pxe,state.pys,state.pye];return result}result.done=true;result.value=undefined;return result}constructor(state){this.state=state;this.c=0;this.result={value:null,done:false};}};function diff_core(i,N,j,M,eq){const Z=(Math.min(N,M)+1)*2;const L=N+M;const b=new(L<256?Uint8Array:L<65536?Uint16Array:Uint32Array)(2*Z);return new DiffGen({i,N,j,M,Z,b,eq,pxs:-1,pxe:-1,pys:-1,pye:-1,oxs:-1,oxe:-1,oys:-1,oye:-1,stack_top:0,stack_base:[]})}bin.diff_core=diff_core;function diff(xs,ys){let[i,N,M]=[0,xs.length,ys.length];while(ii&&M>i);const eq=(x,y)=>xs[x]===ys[y];return diff_core(i,N+1-i,i,M+1-i,eq)}bin.diff=diff;let LCSGen=class LCSGen{[Symbol.iterator](){return this}next(){const rec=this.diff.next();if(rec.done){const{i,j,N}=this;if(i0)yield ins;i=dele;}if(i{const result=[];let index=0;for(const item of arr){result.push(index);index+=item.length+separatorLength;}result.push(index-separatorLength);return result};const filterEmptyParts=arr=>{return arr.filter(item=>item.end>item.start)};const getInlineDiff=(l,r,options)=>{let resultL=[];let resultR=[];let lastL=0;let lastR=0;if(options.mode==="word"){const wordSeparator=options.wordSeparator||" ";const lArr=l.split(wordSeparator);const rArr=r.split(wordSeparator);const iter=[...lcs_1(lArr,rArr)];const separatorLength=wordSeparator.length;const indicesL=getOriginalIndices(lArr,separatorLength);const indicesR=getOriginalIndices(rArr,separatorLength);for(const[sl,sr,length]of iter){if(sl>lastL){resultL.push({type:"remove",start:indicesL[lastL],end:indicesL[sl]});}if(sr>lastR){resultR.push({type:"add",start:indicesR[lastR],end:indicesR[sr]});}lastL=sl+length;lastR=sr+length;resultL.push({start:indicesL[sl],end:indicesL[lastL]});resultR.push({start:indicesR[sr],end:indicesR[lastR]});}if(l.length>lastL){resultL.push({type:"remove",start:indicesL[lastL],end:l.length});}if(r.length>lastR){resultR.push({type:"add",start:indicesR[lastR],end:r.length});}resultL=filterEmptyParts(resultL);resultR=filterEmptyParts(resultR);return [resultL,resultR]}const iter=lcs_1(l,r);for(const[sl,sr,length]of iter){if(sl>lastL){resultL.push({type:"remove",start:lastL,end:sl});}if(sr>lastR){resultR.push({type:"add",start:lastR,end:sr});}lastL=sl+length;lastR=sr+length;resultL.push({start:sl,end:lastL});resultR.push({start:sr,end:lastR});}if(l.length>lastL){resultL.push({type:"remove",start:lastL,end:l.length});}if(r.length>lastR){resultR.push({type:"add",start:lastR,end:r.length});}resultL=filterEmptyParts(resultL);resultR=filterEmptyParts(resultR);return [resultL,resultR]}; + + const syntaxHighlightLine=(enabled,text,offset)=>{if(!enabled){return [{token:"plain",start:offset,end:text.length+offset}]}if(!Number.isNaN(Number(text))){return [{token:"number",start:offset,end:text.length+offset}]}if(text==="true"||text==="false"){return [{token:"boolean",start:offset,end:text.length+offset}]}if(text==="null"){return [{token:"null",start:offset,end:text.length+offset}]}if(text.startsWith('"')){if(text.endsWith(": [")||text.endsWith(": {")){return [{token:"key",start:offset,end:text.length-3+offset},{token:"punctuation",start:text.length-3,end:text.length-2+offset},{token:"plain",start:text.length-2,end:text.length-1+offset},{token:"punctuation",start:text.length-1,end:text.length+offset}]}let pairedQuoteIndex=1;while(pairedQuoteIndex{if(!options){return [{start:0,end:l.length,isEqual:false}]}const segments=[];for(let i=0;i{var _props_inlineDiffOptions,_props_inlineDiffOptions1;const[linesLeft,linesRight]=props.diff;const lineNumberWidth=props.lineNumbers?`calc(${String(linesLeft.length).length}ch + 16px)`:0;var _props_indent;const indent=(_props_indent=props.indent)!=null?_props_indent:DEFAULT_INDENT;const indentChar=indent==="tab"?" ":" ";const indentSize=indent==="tab"?1:indent;const inlineDiffOptions={mode:((_props_inlineDiffOptions=props.inlineDiffOptions)==null?void 0:_props_inlineDiffOptions.mode)||"char",wordSeparator:((_props_inlineDiffOptions1=props.inlineDiffOptions)==null?void 0:_props_inlineDiffOptions1.wordSeparator)||""};var _props_hideUnchangedLines;const hideUnchangedLines=(_props_hideUnchangedLines=props.hideUnchangedLines)!=null?_props_hideUnchangedLines:false;const{scrollContainer:_scrollContainer="body",itemHeight=18,expandLineHeight=26}=!props.virtual||props.virtual===true?{}:props.virtual;const scrollContainer=_scrollContainer==="body"?document.body:document.querySelector(_scrollContainer);const linesLeftRef=react.exports.useRef(linesLeft);const linesRightRef=react.exports.useRef(linesRight);const segmentsRef=react.exports.useRef(getSegments(linesLeft,linesRight,hideUnchangedLines));const accTopRef=react.exports.useRef([]);const totalHeightRef=react.exports.useRef(0);const tbodyRef=react.exports.useRef(null);const[,forceUpdate]=react.exports.useState({});const updateViewer=()=>{accTopRef.current=[];if(props.virtual){let acc=0;for(const segment of segmentsRef.current){if(isExpandLine(segment)){accTopRef.current.push(acc);acc+=expandLineHeight;}else {accTopRef.current.push(acc);acc+=itemHeight*(segment.end-segment.start);}}totalHeightRef.current=segmentsRef.current.reduce((acc,segment)=>{if(!isExpandLine(segment)){return acc+(segment.end-segment.start)*itemHeight}return acc+expandLineHeight},0);}forceUpdate({});};react.exports.useEffect(()=>{linesLeftRef.current=linesLeft;linesRightRef.current=linesRight;segmentsRef.current=getSegments(linesLeft,linesRight,hideUnchangedLines);updateViewer();},[hideUnchangedLines,linesLeft,linesRight]);react.exports.useEffect(()=>{if(!props.virtual||!scrollContainer){return}const onScroll=()=>forceUpdate({});scrollContainer.addEventListener("scroll",onScroll);return ()=>{scrollContainer.removeEventListener("scroll",onScroll);}},[props.virtual,scrollContainer]);const onExpandBefore=segmentIndex=>lines=>{const newSegments=[...segmentsRef.current];const newSegment=newSegments[segmentIndex];newSegments[segmentIndex]=_extends$2({},newSegment,{end:Math.max(newSegment.end-lines,newSegment.start)});if(segmentIndex+1lines=>{const newSegments=[...segmentsRef.current];const newSegment=newSegments[segmentIndex];newSegments[segmentIndex]=_extends$2({},newSegment,{start:Math.min(newSegment.start+lines,newSegment.end)});if(segmentIndex>1){newSegments[segmentIndex-1]=_extends$2({},newSegments[segmentIndex-1],{end:Math.min(newSegment.start+lines,newSegment.end)});}segmentsRef.current=newSegments;updateViewer();};const onExpandAll=segmentIndex=>()=>{const newSegments=[...segmentsRef.current];const newSegment=newSegments[segmentIndex];newSegments[segmentIndex]=_extends$2({},newSegment,{start:newSegment.start,end:newSegment.start});if(segmentIndex+1react.exports.createElement(react.exports.Fragment,null,info.map((item,index)=>{const frag=text.slice(item.start,item.end);if(!item.type&&!item.token){return frag}const className=[item.type?`inline-diff-${item.type}`:"",item.token?`token ${item.token}`:""].filter(Boolean).join(" ");return react.exports.createElement("span",{key:`${index}-${item.type}-${frag}`,className:className},frag)}),comma&&(syntaxHighlightEnabled?react.exports.createElement("span",{className:"token punctuation"},","):","));const renderLine=(index,syntaxHighlightEnabled)=>{var _props_bgColour,_props_bgColour1;const l=linesLeftRef.current[index];const r=linesRightRef.current[index];const[lDiff,rDiff]=props.highlightInlineDiff&&l.type==="modify"&&r.type==="modify"?getInlineDiff(l.text,r.text,inlineDiffOptions):[[],[]];const lTokens=syntaxHighlightLine(syntaxHighlightEnabled,l.text,0);const rTokens=syntaxHighlightLine(syntaxHighlightEnabled,r.text,0);const lResult=mergeSegments(lTokens,lDiff);const rResult=mergeSegments(rTokens,rDiff);var _props_bgColour_l_type;const bgLeft=l.type!=="equal"?(_props_bgColour_l_type=(_props_bgColour=props.bgColour)==null?void 0:_props_bgColour[l.type])!=null?_props_bgColour_l_type:"":"";var _props_bgColour_r_type;const bgRight=r.type!=="equal"?(_props_bgColour_r_type=(_props_bgColour1=props.bgColour)==null?void 0:_props_bgColour1[r.type])!=null?_props_bgColour_r_type:"":"";return react.exports.createElement("tr",{key:index},props.lineNumbers&&react.exports.createElement("td",{className:`line-${l.type} line-number`,style:{backgroundColor:bgLeft}},l.lineNumber),react.exports.createElement("td",{className:`line-${l.type}`,style:{backgroundColor:bgLeft}},react.exports.createElement("pre",null,l.text&&indentChar.repeat(l.level*indentSize),renderInlineResult(l.text,lResult,l.comma,syntaxHighlightEnabled))),props.lineNumbers&&react.exports.createElement("td",{className:`line-${r.type} line-number`,style:{backgroundColor:bgRight}},r.lineNumber),react.exports.createElement("td",{className:`line-${r.type}`,style:{backgroundColor:bgRight}},react.exports.createElement("pre",null,r.text&&indentChar.repeat(r.level*indentSize),renderInlineResult(r.text,rResult,r.comma,syntaxHighlightEnabled))))};const renderExpandLine=(hasLinesBefore,hasLinesAfter,expandMoreLinesLimit,index)=>{return react.exports.createElement(react.exports.Fragment,null,hasLinesBefore&&react.exports.createElement("button",{onClick:()=>onExpandBefore(index)(expandMoreLinesLimit)},"⬆️ Show ",expandMoreLinesLimit," lines before"),react.exports.createElement("button",{onClick:()=>onExpandAll(index)()},"↕️ Show all unchanged lines"),hasLinesAfter&&react.exports.createElement("button",{onClick:()=>onExpandAfter(index)(expandMoreLinesLimit)},"⬇️ Show ",expandMoreLinesLimit," lines after"))};const renderSegment=(segment,index,renderStart,renderEnd,syntaxHighlightEnabled)=>{let{start,end}=segment;start=Math.max(start,renderStart);end=Math.min(end,renderEnd);if(start===end){return null}if(!isExpandLine(segment)){return Array(end-start).fill(0).map((_,index)=>renderLine(start+index,syntaxHighlightEnabled))}const{hasLinesBefore,hasLinesAfter}=segment;const expandMoreLinesLimit=typeof hideUnchangedLines==="boolean"?DEFAULT_EXPAND_MORE_LINES_LIMIT:hideUnchangedLines.expandMoreLinesLimit||DEFAULT_EXPAND_MORE_LINES_LIMIT;return [react.exports.createElement("tr",{key:`expand-line-${index}`,className:"expand-line"},react.exports.createElement("td",{colSpan:4,className:`${hasLinesBefore?"has-lines-before":""} ${hasLinesAfter?"has-lines-after":""}`},typeof hideUnchangedLines!=="boolean"&&hideUnchangedLines.expandLineRenderer?hideUnchangedLines.expandLineRenderer({hasLinesBefore,hasLinesAfter,onExpandBefore:onExpandBefore(index),onExpandAfter:onExpandAfter(index),onExpandAll:onExpandAll(index)}):renderExpandLine(hasLinesBefore,hasLinesAfter,expandMoreLinesLimit,index)))]};const renderTbody=syntaxHighlightEnabled=>{if(!props.virtual){return segmentsRef.current.map((item,index)=>renderSegment(item,index,0,linesLeftRef.current.length,syntaxHighlightEnabled))}var _scrollContainer_clientHeight;const containerHeight=(_scrollContainer_clientHeight=scrollContainer==null?void 0:scrollContainer.clientHeight)!=null?_scrollContainer_clientHeight:0;var _scrollContainer_scrollTop;const scrollTop=(_scrollContainer_scrollTop=scrollContainer==null?void 0:scrollContainer.scrollTop)!=null?_scrollContainer_scrollTop:0;const scrollBottom=scrollTop+containerHeight;let t=tbodyRef.current;var _t_offsetTop;let firstElementTop=(_t_offsetTop=t==null?void 0:t.offsetTop)!=null?_t_offsetTop:0;while((t==null?void 0:t.offsetParent)&&(t==null?void 0:t.offsetParent)!==scrollContainer){t=t.offsetParent;firstElementTop+=t.offsetTop;}if(firstElementTop>scrollBottom||firstElementTop+totalHeightRef.currentrenderSegment(segment,index,startLine,endLine,syntaxHighlightEnabled)),react.exports.createElement("tr",null,react.exports.createElement("td",{colSpan:4,style:{height:bottomHeight,padding:0}}))):react.exports.createElement("tr",null,react.exports.createElement("td",{colSpan:4,style:{height:`${totalHeightRef.current}px`}}))};const renderMeasureLine=()=>react.exports.createElement("colgroup",{className:"measure-line"},props.lineNumbers&&react.exports.createElement("col",{style:{width:lineNumberWidth}}),react.exports.createElement("col",null),props.lineNumbers&&react.exports.createElement("col",{style:{width:lineNumberWidth}}),react.exports.createElement("col",null));const classes=["json-diff-viewer",props.virtual&&"json-diff-viewer-virtual",props.syntaxHighlight&&`json-diff-viewer-theme-${props.syntaxHighlight.theme||"monokai"}`,props.className].filter(Boolean).join(" ");const syntaxHighlightEnabled=!!props.syntaxHighlight;return react.exports.createElement("table",{className:classes,style:props.style},renderMeasureLine(),react.exports.createElement("tbody",{ref:tbodyRef},renderTbody(syntaxHighlightEnabled)))};Viewer.displayName="Viewer"; + + var prism = {exports: {}}; + + (function(module){var _self=typeof window!=="undefined"?window:typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope?self:{};/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */var Prism=function(_self){var lang=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i;var uniqueId=0;var plainTextGrammar={};var _={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function encode(tokens){if(tokens instanceof Token){return new Token(tokens.type,encode(tokens.content),tokens.alias)}else if(Array.isArray(tokens)){return tokens.map(encode)}else {return tokens.replace(/&/g,"&").replace(/"+env.content+""};function matchPattern(pattern,pos,text,lookbehind){pattern.lastIndex=pos;var match=pattern.exec(text);if(match&&lookbehind&&match[1]){var lookbehindLength=match[1].length;match.index+=lookbehindLength;match[0]=match[0].slice(lookbehindLength);}return match}function matchGrammar(text,tokenList,grammar,startNode,startPos,rematch){for(var token in grammar){if(!grammar.hasOwnProperty(token)||!grammar[token]){continue}var patterns=grammar[token];patterns=Array.isArray(patterns)?patterns:[patterns];for(var j=0;j=rematch.reach){break}var str=currentNode.value;if(tokenList.length>text.length){return}if(str instanceof Token){continue}var removeCount=1;var match;if(greedy){match=matchPattern(pattern,pos,text,lookbehind);if(!match||match.index>=text.length){break}var from=match.index;var to=match.index+match[0].length;var p=pos;p+=currentNode.value.length;while(from>=p){currentNode=currentNode.next;p+=currentNode.value.length;}p-=currentNode.value.length;pos=p;if(currentNode.value instanceof Token){continue}for(var k=currentNode;k!==tokenList.tail&&(prematch.reach){rematch.reach=reach;}var removeFrom=currentNode.prev;if(before){removeFrom=addAfter(tokenList,removeFrom,before);pos+=before.length;}removeRange(tokenList,removeFrom,removeCount);var wrapped=new Token(token,inside?_.tokenize(matchStr,inside):matchStr,alias,matchStr);currentNode=addAfter(tokenList,removeFrom,wrapped);if(after){addAfter(tokenList,currentNode,after);}if(removeCount>1){var nestedRematch={cause:token+","+j,reach:reach};matchGrammar(text,tokenList,grammar,currentNode.prev,pos,nestedRematch);if(rematch&&nestedRematch.reach>rematch.reach){rematch.reach=nestedRematch.reach;}}}}}}function LinkedList(){var head={value:null,prev:null,next:null};var tail={value:null,prev:head,next:null};head.next=tail;this.head=head;this.tail=tail;this.length=0;}function addAfter(list,node,value){var next=node.next;var newNode={value:value,prev:node,next:next};node.next=newNode;next.prev=newNode;list.length++;return newNode}function removeRange(list,node,count){var next=node.next;for(var i=0;i/,greedy:true},"prolog":{pattern:/<\?[\s\S]+?\?>/,greedy:true},"doctype":{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:true,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:true,greedy:true,inside:null},"string":{pattern:/"[^"]*"|'[^']*'/,greedy:true},"punctuation":/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,"name":/[^\s<>'"]+/}},"cdata":{pattern://i,greedy:true},"tag":{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:true,inside:{"tag":{pattern:/^<\/?[^\s>\/]+/,inside:{"punctuation":/^<\/?/,"namespace":/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{"punctuation":[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:true}]}},"punctuation":/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{"namespace":/^[^\s>\/:]+:/}}}},"entity":[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup["tag"].inside["attr-value"].inside["entity"]=Prism.languages.markup["entity"];Prism.languages.markup["doctype"].inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(env){if(env.type==="entity"){env.attributes["title"]=env.content.replace(/&/,"&");}});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function addInlined(tagName,lang){var includedCdataInside={};includedCdataInside["language-"+lang]={pattern:/(^$)/i,lookbehind:true,inside:Prism.languages[lang]};includedCdataInside["cdata"]=/^$/i;var inside={"included-cdata":{pattern://i,inside:includedCdataInside}};inside["language-"+lang]={pattern:/[\s\S]+/,inside:Prism.languages[lang]};var def={};def[tagName]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return tagName}),"i"),lookbehind:true,greedy:true,inside:inside};Prism.languages.insertBefore("markup","cdata",def);}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(attrName,lang){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+attrName+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:true,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{"value":{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:true,alias:[lang,"language-"+lang],inside:Prism.languages[lang]},"punctuation":[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}});}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(Prism){var string=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;Prism.languages.css={"comment":/\/\*[\s\S]*?\*\//,"atrule":{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+string.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{"rule":/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:true,alias:"selector"},"keyword":{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:true}}},"url":{pattern:RegExp("\\burl\\((?:"+string.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:true,inside:{"function":/^url/i,"punctuation":/^\(|\)$/,"string":{pattern:RegExp("^"+string.source+"$"),alias:"url"}}},"selector":{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+string.source+")*(?=\\s*\\{)"),lookbehind:true},"string":{pattern:string,greedy:true},"property":{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:true},"important":/!important\b/i,"function":{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:true},"punctuation":/[(){};:,]/};Prism.languages.css["atrule"].inside.rest=Prism.languages.css;var markup=Prism.languages.markup;if(markup){markup.tag.addInlined("style","css");markup.tag.addAttribute("style","css");}})(Prism);Prism.languages.clike={"comment":[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:true,greedy:true},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:true,greedy:true}],"string":{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:true},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:true,inside:{"punctuation":/[.\\]/}},"keyword":/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,"boolean":/\b(?:false|true)\b/,"function":/\b\w+(?=\()/,"number":/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,"operator":/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,"punctuation":/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:true}],"keyword":[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:true},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:true}],"function":/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,"number":{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:true},"operator":/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{"regex":{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:true,greedy:true,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:true,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},"parameter":[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:true,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:true,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:true,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:true,inside:Prism.languages.javascript}],"constant":/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{"hashbang":{pattern:/^#!.*/,greedy:true,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:true,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"interpolation":{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:true,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},"string":/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:true,greedy:true,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:true,alias:"property"}});if(Prism.languages.markup){Prism.languages.markup.tag.addInlined("script","javascript");Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript");}Prism.languages.js=Prism.languages.javascript;(function(){if(typeof Prism==="undefined"||typeof document==="undefined"){return}if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;}var LOADING_MESSAGE="Loading…";var FAILURE_MESSAGE=function(status,message){return "✖ Error "+status+" while fetching file: "+message};var FAILURE_EMPTY_MESSAGE="✖ Error: File does not exist or is empty";var EXTENSIONS={"js":"javascript","py":"python","rb":"ruby","ps1":"powershell","psm1":"powershell","sh":"bash","bat":"batch","h":"c","tex":"latex"};var STATUS_ATTR="data-src-status";var STATUS_LOADING="loading";var STATUS_LOADED="loaded";var STATUS_FAILED="failed";var SELECTOR="pre[data-src]:not(["+STATUS_ATTR+'="'+STATUS_LOADED+'"])'+":not(["+STATUS_ATTR+'="'+STATUS_LOADING+'"])';function loadFile(src,success,error){var xhr=new XMLHttpRequest;xhr.open("GET",src,true);xhr.onreadystatechange=function(){if(xhr.readyState==4){if(xhr.status<400&&xhr.responseText){success(xhr.responseText);}else {if(xhr.status>=400){error(FAILURE_MESSAGE(xhr.status,xhr.statusText));}else {error(FAILURE_EMPTY_MESSAGE);}}}};xhr.send(null);}function parseRange(range){var m=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(range||"");if(m){var start=Number(m[1]);var comma=m[2];var end=m[3];if(!comma){return [start,start]}if(!end){return [start,undefined]}return [start,Number(end)]}return undefined}Prism.hooks.add("before-highlightall",function(env){env.selector+=", "+SELECTOR;});Prism.hooks.add("before-sanity-check",function(env){var pre=env.element;if(pre.matches(SELECTOR)){env.code="";pre.setAttribute(STATUS_ATTR,STATUS_LOADING);var code=pre.appendChild(document.createElement("CODE"));code.textContent=LOADING_MESSAGE;var src=pre.getAttribute("data-src");var language=env.language;if(language==="none"){var extension=(/\.(\w+)$/.exec(src)||[,"none"])[1];language=EXTENSIONS[extension]||extension;}Prism.util.setLanguage(code,language);Prism.util.setLanguage(pre,language);var autoloader=Prism.plugins.autoloader;if(autoloader){autoloader.loadLanguages(language);}loadFile(src,function(text){pre.setAttribute(STATUS_ATTR,STATUS_LOADED);var range=parseRange(pre.getAttribute("data-range"));if(range){var lines=text.split(/\r\n?|\n/g);var start=range[0];var end=range[1]==null?lines.length:range[1];if(start<0){start+=lines.length;}start=Math.max(0,Math.min(start-1,lines.length));if(end<0){end+=lines.length;}end=Math.max(0,Math.min(end,lines.length));text=lines.slice(start,end).join("\n");if(!pre.hasAttribute("data-start")){pre.setAttribute("data-start",String(start+1));}}code.textContent=text;Prism.highlightElement(code);},function(error){pre.setAttribute(STATUS_ATTR,STATUS_FAILED);code.textContent=error;});}});Prism.plugins.fileHighlight={highlight:function highlight(container){var elements=(container||document).querySelectorAll(SELECTOR);for(var i=0,element;element=elements[i++];){Prism.highlightElement(element);}}};var logged=false;Prism.fileHighlight=function(){if(!logged){console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead.");logged=true;}Prism.plugins.fileHighlight.highlight.apply(this,arguments);};})();})(prism);var Prism$1 = prism.exports; + + (function(Prism1){Prism1.languages.typescript=Prism1.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:true,greedy:true,inside:null},"builtin":/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/});Prism1.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/);delete Prism1.languages.typescript["parameter"];delete Prism1.languages.typescript["literal-property"];var typeInside=Prism1.languages.extend("typescript",{});delete typeInside["class-name"];Prism1.languages.typescript["class-name"].inside=typeInside;Prism1.languages.insertBefore("typescript","function",{"decorator":{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{"at":{pattern:/^@/,alias:"operator"},"function":/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:true,inside:{"function":/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,"generic":{pattern:/<[\s\S]+/,alias:"class-name",inside:typeInside}}}});Prism1.languages.ts=Prism1.languages.typescript;})(Prism); + + (function(Prism1){var javascript=Prism1.util.clone(Prism1.languages.javascript);var space=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source;var braces=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source;var spread=/(?:\{*\.{3}(?:[^{}]|)*\})/.source;function re(source,flags){source=source.replace(//g,function(){return space}).replace(//g,function(){return braces}).replace(//g,function(){return spread});return RegExp(source,flags)}spread=re(spread).source;Prism1.languages.jsx=Prism1.languages.extend("markup",javascript);Prism1.languages.jsx.tag.pattern=re(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source);Prism1.languages.jsx.tag.inside["tag"].pattern=/^<\/?[^\s>\/]*/;Prism1.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/;Prism1.languages.jsx.tag.inside["tag"].inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/;Prism1.languages.jsx.tag.inside["comment"]=javascript["comment"];Prism1.languages.insertBefore("inside","attr-name",{"spread":{pattern:re(//.source),inside:Prism1.languages.jsx}},Prism1.languages.jsx.tag);Prism1.languages.insertBefore("inside","special-attr",{"script":{pattern:re(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:Prism1.languages.jsx}}},Prism1.languages.jsx.tag);var stringifyToken=function(token){if(!token){return ""}if(typeof token==="string"){return token}if(typeof token.content==="string"){return token.content}return token.content.map(stringifyToken).join("")};var walkTokens=function(tokens){var openedTags=[];for(var i=0;i0&&openedTags[openedTags.length-1].tagName===stringifyToken(token.content[0].content[1])){openedTags.pop();}}else {if(token.content[token.content.length-1].content==="/>");else {openedTags.push({tagName:stringifyToken(token.content[0].content[1]),openedBraces:0});}}}else if(openedTags.length>0&&token.type==="punctuation"&&token.content==="{"){openedTags[openedTags.length-1].openedBraces++;}else if(openedTags.length>0&&openedTags[openedTags.length-1].openedBraces>0&&token.type==="punctuation"&&token.content==="}"){openedTags[openedTags.length-1].openedBraces--;}else {notTagNorBrace=true;}}if(notTagNorBrace||typeof token==="string"){if(openedTags.length>0&&openedTags[openedTags.length-1].openedBraces===0){var plainText=stringifyToken(token);if(i0&&(typeof tokens[i-1]==="string"||tokens[i-1].type==="plain-text")){plainText=stringifyToken(tokens[i-1])+plainText;tokens.splice(i-1,1);i--;}tokens[i]=new Prism1.Token("plain-text",plainText,null,plainText);}}if(token.content&&typeof token.content!=="string"){walkTokens(token.content);}}};Prism1.hooks.add("after-tokenize",function(env){if(env.language!=="jsx"&&env.language!=="tsx"){return}walkTokens(env.tokens);});})(Prism); + + (function(Prism1){var typescript=Prism1.util.clone(Prism1.languages.typescript);Prism1.languages.tsx=Prism1.languages.extend("jsx",typescript);delete Prism1.languages.tsx["parameter"];delete Prism1.languages.tsx["literal-property"];var tag=Prism1.languages.tsx.tag;tag.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+tag.pattern.source+")",tag.pattern.flags);tag.lookbehind=true;})(Prism); + + var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n code[class*="language-"],\npre[class*="language-"] {\n background: #f5f2f0;\n}\n\n/* Inline code */\n:not(pre) > code[class*="language-"] {\n padding: .1em;\n border-radius: .3em;\n white-space: normal;\n}\n\n.token.comment,\n.token.prolog,\n.token.doctype,\n.token.cdata {\n color: slategray;\n}\n\n.token.punctuation {\n color: #999;\n}\n\n.token.namespace {\n opacity: .7;\n}\n\n.token.property,\n.token.tag,\n.token.boolean,\n.token.number,\n.token.constant,\n.token.symbol,\n.token.deleted {\n color: #905;\n}\n\n.token.selector,\n.token.attr-name,\n.token.string,\n.token.char,\n.token.builtin,\n.token.inserted {\n color: #690;\n}\n\n.token.operator,\n.token.entity,\n.token.url,\n.language-css .token.string,\n.style .token.string {\n color: #9a6e3a;\n /* This background color was intended by the author of this theme. */\n background: hsla(0, 0%, 100%, .5);\n}\n\n.token.atrule,\n.token.attr-value,\n.token.keyword {\n color: #07a;\n}\n\n.token.function,\n.token.class-name {\n color: #DD4A68;\n}\n\n.token.regex,\n.token.important,\n.token.variable {\n color: #e90;\n}\n\n.token.important,\n.token.bold {\n font-weight: bold;\n}\n.token.italic {\n font-style: italic;\n}\n\n.token.entity {\n cursor: help;\n}\n';n(css,{}); + + const GeneratedCode=({code})=>{const html=React.useMemo(()=>{return Prism$1.highlight(code,Prism$1.languages.tsx,"tsx")},[code]);return React.createElement("pre",{className:"language-tsx",dangerouslySetInnerHTML:{__html:html}})}; + + const jsStringify=obj=>{const code=JSON.stringify(obj,null,2);return code.replace(/^(\s+)"([^"]+)":/gm,"$1$2:").replace(/: "([^'"]+)"(,?)\n/g,": '$1'$2\n")}; + + __$styleInject(".label-wrapper {\n position: relative;\n margin-right: 4px;\n}\n.label-question-mark {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: 16px;\n height: 16px;\n box-sizing: border-box;\n border: 1px solid;\n border-radius: 50%;\n font-size: 12px;\n cursor: pointer;\n}\n.label-tip {\n display: none;\n}\n.label-wrapper:hover .label-question-mark {\n background: #000;\n border-color: #000;\n color: #fff;\n}\n.label-wrapper:hover .label-tip {\n display: block;\n position: absolute;\n top: 100%;\n width: 268px;\n padding: 8px 16px;\n box-sizing: border-box;\n background-color: #fff;\n border-radius: 4px;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);\n line-height: 1.5;\n color: #333;\n font-size: 12px;\n z-index: 1;\n}\n"); + + const Label=({title,tip})=>{return React.createElement("span",{className:"label"},React.createElement("span",{className:"label-wrapper"},React.createElement("span",{className:"label-question-mark"},"?"),!!tip&&React.createElement("div",{className:"label-tip"},tip)),title)}; + + const getValue=()=>{const hash=window.location.hash?window.location.hash.slice(1):"";const query=new URLSearchParams(hash);return {l:query.get("l")||"",r:query.get("r")||""}};const useInitialValues=()=>{const[initialValues,setInitialValues]=React.useState(getValue());React.useEffect(()=>{const hashChange=()=>{const newValue=getValue();if(initialValues.l!==newValue.l||initialValues.r!==newValue.r){setInitialValues(newValue);}};window.addEventListener("hashchange",hashChange);return ()=>{window.removeEventListener("hashchange",hashChange);}},[]);return initialValues};const updateInitialValues=(l,r)=>{const hash=window.location.hash?window.location.hash.slice(1):"";const query=new URLSearchParams(hash);query.set("l",l);query.set("r",r);window.location.hash=query.toString();}; + + __$styleInject(".json-diff-viewer.json-diff-viewer-theme-monokai {\n background: #272822;\n color: #f8f8f2;\n}\n.json-diff-viewer.json-diff-viewer-theme-monokai .line-number {\n color: #999999;\n}\n.json-diff-viewer.json-diff-viewer-theme-monokai tr:hover {\n background: #3e3d32;\n}\n.json-diff-viewer.json-diff-viewer-theme-monokai tr .line-add {\n background: #004400;\n}\n.json-diff-viewer.json-diff-viewer-theme-monokai tr .line-remove {\n background: #440000;\n}\n.json-diff-viewer.json-diff-viewer-theme-monokai tr .line-modify {\n background: #444400;\n}\n.json-diff-viewer.json-diff-viewer-theme-monokai .string {\n color: #e6db74;\n}\n.json-diff-viewer.json-diff-viewer-theme-monokai .number,\n.json-diff-viewer.json-diff-viewer-theme-monokai .boolean,\n.json-diff-viewer.json-diff-viewer-theme-monokai .null {\n color: #ae81ff;\n}\n.json-diff-viewer.json-diff-viewer-theme-monokai .key {\n color: #f92672;\n}\n"); + + __$styleInject(".playground {\n display: flex;\n height: 100vh;\n background: #fff;\n}\n.playground .layout-left,\n.playground .layout-right {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n}\n.playground .layout-left {\n flex: 0 0 300px;\n border-right: 1px solid #ecf0f4;\n padding: 0 16px;\n overflow-y: auto;\n}\n.playground .layout-left::-webkit-scrollbar {\n display: none;\n}\n.playground .layout-left .logo {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 24px 0 8px;\n font-size: 24px;\n font-weight: 500;\n}\n.playground .layout-left .back {\n background: #000;\n color: #fff;\n padding: 8px 16px;\n border-radius: 4px;\n text-align: center;\n cursor: pointer;\n}\n.playground .layout-left .back:hover {\n background: #333;\n text-decoration: underline;\n}\n.playground .layout-left .config {\n margin-top: 16px;\n}\n.playground .layout-left .config legend {\n color: rgba(0, 0, 0, 0.5);\n margin: 16px 0 8px;\n}\n.playground .layout-left .config label {\n display: flex;\n align-items: center;\n margin-bottom: 8px;\n}\n.playground .layout-left .config label > span:first-child {\n margin-right: auto;\n}\n.playground .layout-left .config label input,\n.playground .layout-left .config label select {\n height: 20px;\n box-sizing: border-box;\n font-size: 14px;\n max-width: 120px;\n}\n.playground .layout-left .config label input[type=checkbox] {\n margin: 0;\n}\n.playground .layout-left pre {\n margin: 0 -16px;\n padding: 8px 16px;\n background: #f5f6f9;\n font-size: 12px;\n}\n.playground .layout-left .statistics {\n position: sticky;\n bottom: 0;\n margin: auto -16px 0;\n padding: 16px;\n display: flex;\n background: #fff;\n}\n.playground .layout-right {\n flex: 1;\n}\n.playground .layout-right .title {\n padding: 8px 16px;\n color: rgba(0, 0, 0, 0.5);\n}\n.playground .layout-right .title .control-button {\n margin-left: 4px;\n padding: 0 4px;\n cursor: pointer;\n}\n.playground .layout-right .title .control-button:hover {\n text-decoration: underline;\n}\n.playground .layout-right .loading,\n.playground .layout-right .error {\n margin-left: 8px;\n}\n.playground .layout-right .error {\n color: red;\n}\n.playground .layout-right .inputs,\n.playground .layout-right .results {\n flex: 1;\n}\n.playground .layout-right .inputs {\n display: flex;\n border-top: 1px solid #ecf0f4;\n border-bottom: 1px solid #ecf0f4;\n}\n.playground .layout-right .inputs textarea {\n position: relative;\n flex: 1;\n height: 100%;\n padding: 16px;\n box-sizing: border-box;\n font-size: 12px;\n line-height: 1.5;\n border: none;\n outline: none;\n resize: none;\n font-family: monospace;\n transition: all 0.3s;\n}\n.playground .layout-right .inputs textarea:first-child {\n border-right: 1px solid #ecf0f4;\n}\n.playground .layout-right .inputs textarea:focus {\n z-index: 1;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);\n}\n.playground .layout-right .inputs:focus-within textarea {\n border-color: transparent;\n}\n.playground .layout-right .results {\n position: relative;\n overflow-y: auto;\n border-top: 1px solid #ecf0f4;\n}\n.playground .layout-right.layout-right-fullscreen .title:first-child,\n.playground .layout-right.layout-right-fullscreen .inputs {\n display: none;\n}\n.token.operator {\n background: none;\n}\n"); + + function _extends$1(){_extends$1=Object.assign||function(target){for(var i=1;i{const[detectCircular]=React.useState(true);const[maxDepth,setMaxDepth]=React.useState(Infinity);const[showModifications,setShowModifications]=React.useState(true);const[arrayDiffMethod,setArrayDiffMethod]=React.useState("lcs");const[ignoreCase,setIgnoreCase]=React.useState(false);const[ignoreCaseForKey,setIgnoreCaseForKey]=React.useState(false);const[recursiveEqual,setRecursiveEqual]=React.useState(true);const[indent,setIndent]=React.useState(4);const[highlightInlineDiff,setHighlightInlineDiff]=React.useState(true);const[inlineDiffMode,setInlineDiffMode]=React.useState("word");const[inlineDiffSeparator,setInlineDiffSeparator]=React.useState(" ");const[hideUnchangedLines,setHideUnchangedLines]=React.useState(true);const[syntaxHighlight,setSyntaxHighlight]=React.useState(false);const[virtual,setVirtual]=React.useState(true);const differOptions=React.useMemo(()=>({detectCircular,maxDepth,showModifications,arrayDiffMethod,ignoreCase,ignoreCaseForKey,recursiveEqual}),[detectCircular,maxDepth,showModifications,arrayDiffMethod,ignoreCase,ignoreCaseForKey,recursiveEqual]);const differ=React.useMemo(()=>new Differ(differOptions),[differOptions]);const[diff,setDiff]=React.useState(differ.diff("",""));const[fullscreen,setFullscreen]=React.useState(false);const[error,setError]=React.useState("");const _triggerDiff=(before,after)=>{try{const result=differ.diff(JSON.parse(String(before||"null")),JSON.parse(String(after||"null")));setError("");setDiff(result);}catch(e){setError(e.message);console.error(e);}};const triggerDiff=React.useCallback(debounce_1(_triggerDiff,500),[differ]);const inlineDiffOptions=React.useMemo(()=>({mode:inlineDiffMode,wordSeparator:inlineDiffSeparator}),[inlineDiffMode,inlineDiffSeparator]);const virtualOptions=React.useMemo(()=>{return virtual&&{scrollContainer:".playground .layout-right .results",itemHeight:16,expandLineHeight:27}},[virtual]);const viewerOptions=React.useMemo(()=>({indent,lineNumbers:true,highlightInlineDiff,inlineDiffOptions,hideUnchangedLines,syntaxHighlight:syntaxHighlight?{theme:"monokai"}:false,virtual:virtualOptions}),[indent,highlightInlineDiff,inlineDiffOptions,hideUnchangedLines,syntaxHighlight,virtualOptions]);const code=` +const d = new Differ(${jsStringify(differOptions)}); +const diff = d.diff(before, after); + +const viewerProps = ${jsStringify(viewerOptions)}; +return ( + +); +`.trim();const{l,r}=useInitialValues();const before=React.useRef(l||"");const after=React.useRef(r||"");const setBefore=(value,diff)=>{before.current=value;updateInitialValues(before.current,after.current);if(diff){triggerDiff(before.current,after.current);}};const setAfter=(value,diff)=>{after.current=value;updateInitialValues(before.current,after.current);if(diff){triggerDiff(before.current,after.current);}};const clearAll=()=>{before.current="";after.current="";updateInitialValues("","");};React.useEffect(()=>{if(l!==before.current||r!==after.current){setBefore(l||"",false);setAfter(r||"",false);triggerDiff(l,r);}},[l,r]);React.useEffect(()=>{_triggerDiff(before.current,after.current);},[differOptions]);return React.createElement("div",{className:"playground"},React.createElement("div",{className:"layout-left"},React.createElement("div",{className:"logo"},"JSON Diff Kit"),React.createElement("div",{className:"back",onClick:props.onSwitch},"Go to docs & demo"),React.createElement("div",{className:"config"},React.createElement("form",null,React.createElement("legend",null,"DIFFER CONFIGURATION"),React.createElement("label",{htmlFor:"detect-circular"},React.createElement(Label,{title:"Detect circular references",tip:React.createElement(React.Fragment,null,"Whether to detect circular reference in source objects before diff starts. Default is ",React.createElement("code",null,"true"),". If you are confident about your data (maybe it's from ",React.createElement("code",null,"JSON.parse")," or an API response), you can set it to ",React.createElement("code",null,"false")," to improve performance, but the algorithm may not stop if circular reference does show up.")}),React.createElement("input",{type:"checkbox",id:"detect-circular",checked:detectCircular,disabled:true})),React.createElement("label",{htmlFor:"max-depth"},React.createElement(Label,{title:"Max depth",tip:React.createElement(React.Fragment,null,"If there are nested objects in your data, you can set a max depth to limit the diff to a certain level. Default is ",React.createElement("code",null,"Infinity"),". If you set it to ",React.createElement("code",null,"0"),", only the top level will be diffed.")}),React.createElement("label",{htmlFor:"max-depth-infinity",style:{margin:"0 4px 0 0"}},"∞\xa0",React.createElement("input",{type:"checkbox",id:"max-depth-infinity",checked:maxDepth===Infinity,onChange:e=>setMaxDepth(e.target.checked?Infinity:0)})),React.createElement("input",{type:"number",id:"max-depth",value:maxDepth===Infinity?undefined:maxDepth,onChange:e=>setMaxDepth(Number(e.target.value)),min:0,max:10,step:1,disabled:maxDepth===Infinity,style:{width:"3em"}})),React.createElement("label",{htmlFor:"show-modifications"},React.createElement(Label,{title:"Show modifications",tip:React.createElement(React.Fragment,null,"Support recognizing modifications, default ",React.createElement("code",null,"true")," means the differ will output the ",React.createElement("code",null,"* modified")," sign apart from the basic ",React.createElement("code",null,"+ add")," and ",React.createElement("code",null,"- remove")," sign. If you prefer Git-style output, please set it to ",React.createElement("code",null,"false"),".")}),React.createElement("input",{type:"checkbox",id:"show-modifications",checked:showModifications,onChange:e=>setShowModifications(e.target.checked)})),React.createElement("label",{htmlFor:"array-diff-method"},React.createElement(Label,{title:"Array diff method",tip:React.createElement(React.Fragment,null,"The way to diff arrays, default is ",React.createElement("code",null,'"normal"'),", using ",React.createElement("code",null,'"lcs"')," may get a better result but much slower. ",React.createElement("code",null,'"unorder-normal"')," and ",React.createElement("code",null,'"unorder-lcs"')," are for unordered arrays (the order of elements in the array doesn't matter).")}),React.createElement("select",{id:"array-diff-method",value:arrayDiffMethod,onChange:e=>setArrayDiffMethod(e.target.value)},React.createElement("option",{value:"normal"},"normal (default)"),React.createElement("option",{value:"lcs"},"lcs"),React.createElement("option",{value:"unorder-normal"},"unorder-normal"),React.createElement("option",{value:"unorder-lcs"},"unorder-lcs"))),React.createElement("label",{htmlFor:"ignore-case"},React.createElement(Label,{title:"Ignore case",tip:"Whether to ignore case when comparing string values."}),React.createElement("input",{type:"checkbox",id:"ignore-case",checked:ignoreCase,onChange:e=>setIgnoreCase(e.target.checked)})),React.createElement("label",{htmlFor:"ignore-case-for-key"},React.createElement(Label,{title:"Ignore case for key",tip:"Whether to ignore case when comparing object keys."}),React.createElement("input",{type:"checkbox",id:"ignore-case-for-key",checked:ignoreCaseForKey,onChange:e=>setIgnoreCaseForKey(e.target.checked)})),React.createElement("label",{htmlFor:"recursive-equal"},React.createElement(Label,{title:"Recursive equal",tip:"Whether to use recursive equal to compare objects. This can provide a better output when there are unchanged object items in an array, but it may cause performance issues when the data is very large."}),React.createElement("input",{type:"checkbox",id:"recursive-equal",checked:recursiveEqual,onChange:e=>setRecursiveEqual(e.target.checked)})))),React.createElement("div",{className:"config"},React.createElement("form",null,React.createElement("legend",null,"VIEWER CONFIGURATION"),React.createElement("label",{htmlFor:"indent"},React.createElement(Label,{title:"Indent",tip:React.createElement(React.Fragment,null,"Controls the indent in the ",React.createElement("code",null,"")," component.")}),React.createElement("input",{type:"number",id:"indent",min:1,max:16,value:indent,onChange:e=>setIndent(Number(e.target.value))})),React.createElement("label",{htmlFor:"highlight-inline-diff"},React.createElement(Label,{title:"Highlight inline diff",tip:React.createElement(React.Fragment,null,"Whether to show the inline diff highlight. For example, if the left value ",React.createElement("code",null,'"JSON diff can\'t be possible"')," is changed to the right value ",React.createElement("code",null,'"JSON diff is possible"'),", it will be recognized as we first remove ",React.createElement("code",null,"can't be")," and then add ",React.createElement("code",null,"is"),". This feature is powered by ",React.createElement("a",{href:"https://github.com/gliese1337/fast-myers-diff",target:"_blank"},"gliese1337/fast-myers-diff"),". Note: the ",React.createElement("code",null,"showModification")," must be enabled, or you will not see modified lines.")}),React.createElement("input",{type:"checkbox",id:"highlight-inline-diff",checked:highlightInlineDiff,onChange:e=>setHighlightInlineDiff(e.target.checked)})),React.createElement("label",{htmlFor:"inline-diff-mode"},React.createElement(Label,{title:"Inline diff mode",tip:React.createElement(React.Fragment,null,'Control the inline diff behaviour. If the inline diff sources are sentences, we can diff them "by word" instead of "by character". For normal sentences, just set the method to ',React.createElement("code",null,"word")," and the separator to ",React.createElement("code",null,'" "'),' (a half-width space) works like a charm. But if you prefer the Git-style output, you can leave this props default, which is diffing "by character".')}),React.createElement("select",{id:"inline-diff-mode",disabled:!highlightInlineDiff,value:inlineDiffMode,onChange:e=>setInlineDiffMode(e.target.value)},React.createElement("option",{value:"char"},"char (default)"),React.createElement("option",{value:"word"},"word"))),React.createElement("label",{htmlFor:"inline-diff-separator"},React.createElement(Label,{title:"Word separator",tip:"The separator to split the inline diff sources, default is a half-width space."}),React.createElement("input",{id:"inline-diff-separator",disabled:!highlightInlineDiff,value:inlineDiffSeparator,onChange:e=>setInlineDiffSeparator(e.target.value),placeholder:"Works when mode = char"})),React.createElement("label",{htmlFor:"syntax-highlight"},React.createElement(Label,{title:"Syntax highlight",tip:"Support syntax highlight. The viewer component will render like prismjs, and you can write your own style. Please don't forget to import the corresponding CSS file, e.g. import 'json-diff-kit/viewer-monokai.less';"}),React.createElement("input",{type:"checkbox",id:"syntax-highlight",checked:syntaxHighlight,onChange:e=>setSyntaxHighlight(e.target.checked)})),React.createElement("label",{htmlFor:"hide-unchanged-lines"},React.createElement(Label,{title:"Hide unchanged lines",tip:"Whether to hide the unchanged lines (like what GitHub and GitLab does)."}),React.createElement("input",{type:"checkbox",id:"hide-unchanged-lines",checked:hideUnchangedLines,onChange:e=>setHideUnchangedLines(e.target.checked)})),React.createElement("label",{htmlFor:"use-virtual-scroll"},React.createElement(Label,{title:"Use virtual scroll (experimental)",tip:"Whether to use virtual scroll. This can improve the rendering performance when the data is very large, but it's not well-tested."}),React.createElement("input",{type:"checkbox",id:"use-virtual-scroll",checked:virtual,onChange:e=>setVirtual(e.target.checked)})))),React.createElement("div",{className:"config"},React.createElement("form",null,React.createElement("legend",null,"GENERATEDE CODE"),React.createElement(GeneratedCode,{code:code}))),React.createElement("div",{className:"statistics"},React.createElement("img",{src:"https://img.shields.io/npm/v/json-diff-kit.svg?style=flat",style:{marginRight:8}}),React.createElement("iframe",{src:"https://ghbtns.com/github-btn.html?user=rexskz&repo=json-diff-kit&type=star&count=true",frameBorder:"0",scrolling:"0",width:"90",height:"20",title:"GitHub"}))),React.createElement("div",{className:`layout-right${fullscreen?" layout-right-fullscreen":""}`},React.createElement("div",{className:"title"},"INPUTS",React.createElement("span",{className:"control-button",onClick:()=>clearAll()},"[CLEAR ALL]")),React.createElement("div",{className:"inputs"},React.createElement("textarea",{placeholder:"before",defaultValue:before.current,onChange:e=>setBefore(e.target.value,true)}),React.createElement("textarea",{placeholder:"after",defaultValue:after.current,onChange:e=>setAfter(e.target.value,true)})),React.createElement("div",{className:"title"},"DIFF RESULTS",React.createElement("span",{className:"control-button",onClick:()=>setFullscreen(pre=>!pre)},"[",fullscreen?"EXIT ":"","PAGE FULLSCREEN]"),!!error&&React.createElement("span",{className:"error"},error)),React.createElement("div",{className:"results"},React.createElement(Viewer,_extends$1({diff:diff},viewerOptions)))))};Playground.displayName="Playground"; + + __$styleInject(".demo-root {\n background: #fff;\n box-shadow: 0 0 30px rgba(0, 0, 0, 0.01);\n box-sizing: border-box;\n max-width: 1200px;\n margin: auto;\n padding: 1em 2em;\n position: relative;\n width: 100%;\n}\n.demo-root .statistics img {\n margin-right: 8px;\n}\n.demo-root .banner {\n display: inline-block;\n padding: 8px 16px;\n border-radius: 4px;\n background: #000;\n color: #fff;\n cursor: pointer;\n}\n.demo-root .banner:hover {\n background: #333;\n text-decoration: underline;\n}\n.demo-root blockquote {\n margin: 0 0 1em;\n line-height: 24px;\n}\n.demo-root .diff-config form,\n.demo-root .view-config form {\n overflow: hidden;\n}\n.demo-root .diff-config form > label,\n.demo-root .view-config form > label {\n display: flex;\n align-items: center;\n margin-right: 8px;\n padding: 0 4px;\n border-radius: 4px;\n user-select: none;\n font-weight: bold;\n background: #e5e6e9;\n}\n.demo-root .diff-config form > label span,\n.demo-root .view-config form > label span {\n font-weight: normal;\n margin-left: 1em;\n}\n.demo-root .diff-config form > label input,\n.demo-root .view-config form > label input,\n.demo-root .diff-config form > label select,\n.demo-root .view-config form > label select {\n margin-left: 8px;\n}\n.demo-root .diff-config form > label input[type=number],\n.demo-root .view-config form > label input[type=number] {\n min-width: 8em;\n}\n.demo-root .diff-result .json-diff-viewer {\n border: 1px solid;\n border-radius: 4px;\n box-sizing: border-box;\n margin-top: 1em;\n padding: 1em;\n}\n.demo-root .demo-footer {\n border-top: 1px dashed;\n margin: 4em 0 0;\n padding: 2em 0;\n text-align: center;\n}\n"); + + function _extends(){_extends=Object.assign||function(target){for(var i=1;i{const[detectCircular]=React.useState(true);const[maxDepth,setMaxDepth]=React.useState(Infinity);const[showModifications,setShowModifications]=React.useState(true);const[arrayDiffMethod,setArrayDiffMethod]=React.useState("lcs");const[ignoreCase,setIgnoreCase]=React.useState(false);const[recursiveEqual,setRecursiveEqual]=React.useState(true);const[indent,setIndent]=React.useState(4);const[highlightInlineDiff,setHighlightInlineDiff]=React.useState(true);const[inlineDiffMode,setInlineDiffMode]=React.useState("word");const[inlineDiffSeparator,setInlineDiffSeparator]=React.useState(" ");const[hideUnchangedLines,setHideUnchangedLines]=React.useState(true);const[useVirtual,setUseVirtual]=React.useState(false);const differOptions=React.useMemo(()=>({detectCircular,maxDepth,showModifications,arrayDiffMethod,ignoreCase,recursiveEqual}),[detectCircular,maxDepth,showModifications,arrayDiffMethod,ignoreCase,recursiveEqual]);const differ=React.useMemo(()=>new Differ(differOptions),[differOptions]);const[before1]=React.useState({a:1,b:2,d:[1,5,4],e:["1",2,{f:3,g:null,h:[5],i:[]},9],m:[],q:"JSON diff can't be possible",r:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",s:1024});const[after1]=React.useState({b:2,c:3,d:[1,3,4,6],e:["1",2,3,{f:4,g:false,i:[7,8]},10],j:{k:11,l:12},m:[{n:1,o:2},{p:3}],q:"JSON diff is possible!",r:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed quasi architecto beatae incididunt ut labore et dolore magna aliqua.",s:"1024"});const diff1=React.useMemo(()=>differ.diff(before1,after1),[differ,before1,after1]);const[before2]=React.useState([2,4,3]);const[after2]=React.useState([2,5,4,3,1]);const diff2=React.useMemo(()=>differ.diff(before2,after2),[differ,before2,after2]);const[before3]=React.useState({a:1,b:[2]});const[after3]=React.useState(666);const diff3=React.useMemo(()=>differ.diff(before3,after3),[differ,before3,after3]);const[before4]=React.useState(233);const[after4]=React.useState(666);const diff4=React.useMemo(()=>differ.diff(before4,after4),[differ,before4,after4]);const[before5]=React.useState([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49]);const[after5]=React.useState([0,1,2,3,4,5,6,7,8,99,10,11,12,13,14,15,16,17,1818,1919,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49]);const diff5=React.useMemo(()=>differ.diff(before5,after5),[differ,before5,after5]);const[before6]=React.useState([{text:"hello world"}]);const[after6]=React.useState([{text:"above"},{text:"hello world"},{text:"below"}]);const diff6=React.useMemo(()=>differ.diff(before6,after6),[differ,before6,after6]);const openInPlayground=(l,r)=>{updateInitialValues(JSON.stringify(l,null,2),JSON.stringify(r,null,2));props.onSwitch();};const viewerCommonProps={indent:indent,lineNumbers:true,highlightInlineDiff,inlineDiffOptions:{mode:inlineDiffMode,wordSeparator:inlineDiffSeparator||""},hideUnchangedLines,virtual:useVirtual?{}:false};return React.createElement("div",{className:"demo-root"},React.createElement("h1",null,"JSON Diff Kit"),React.createElement("div",{className:"statistics"},React.createElement("img",{src:"https://img.shields.io/npm/v/json-diff-kit.svg"}),React.createElement("img",{src:"https://img.shields.io/npm/dm/json-diff-kit.svg"}),React.createElement("img",{src:"https://codecov.io/gh/RexSkz/json-diff-kit/branch/master/graph/badge.svg?token=8YRG3M4WTO"}),React.createElement("iframe",{src:"https://ghbtns.com/github-btn.html?user=rexskz&repo=json-diff-kit&type=star&count=true",frameBorder:"0",scrolling:"0",width:"150",height:"20",title:"GitHub"})),React.createElement("p",null,"A better JSON differ & viewer library written in TypeScript."),React.createElement("div",{className:"banner",onClick:props.onSwitch},"Click to try out the playground!"),React.createElement("h2",null,"Differ Configuration"),React.createElement("div",{className:"diff-config"},React.createElement("form",null,React.createElement("label",{htmlFor:"detect-circular"},"Detect circular references:",React.createElement("input",{type:"checkbox",id:"detect-circular",checked:detectCircular,disabled:true})),React.createElement("blockquote",null,"Whether to detect circular reference in source objects before diff starts. Default is ",React.createElement("code",null,"true"),". If you are confident about your data (maybe it's from ",React.createElement("code",null,"JSON.parse")," or an API response), you can set it to ",React.createElement("code",null,"false")," to improve performance, but the algorithm may not stop if circular reference does show up."),React.createElement("label",{htmlFor:"max-depth"},"Max depth:",React.createElement("input",{type:"number",id:"max-depth",value:maxDepth===Infinity?undefined:maxDepth,onChange:e=>setMaxDepth(Number(e.target.value)),min:0,max:10,step:1,disabled:maxDepth===Infinity,style:{width:"3em"}}),React.createElement("label",{htmlFor:"max-depth-infinity",style:{margin:"0 0 0 4px"}},"(",React.createElement("input",{type:"checkbox",id:"max-depth-infinity",checked:maxDepth===Infinity,onChange:e=>setMaxDepth(e.target.checked?Infinity:0)}),"infinity)")),React.createElement("blockquote",null,"Max depth, default ",React.createElement("code",null,"Infinity")," means no depth limit."),React.createElement("label",{htmlFor:"show-modifications"},"Show modifications:",React.createElement("input",{type:"checkbox",id:"show-modifications",checked:showModifications,onChange:e=>setShowModifications(e.target.checked)})),React.createElement("blockquote",null,"Support recognizing modifications, default ",React.createElement("code",null,"true")," means the differ will output the ",React.createElement("code",null,"* modified")," sign apart from the basic ",React.createElement("code",null,"+ add")," and ",React.createElement("code",null,"- remove")," sign. If you prefer Git-style output, please set it to ",React.createElement("code",null,"false"),"."),React.createElement("label",{htmlFor:"array-diff-method"},"Array diff method:",React.createElement("select",{id:"array-diff-method",value:arrayDiffMethod,onChange:e=>setArrayDiffMethod(e.target.value)},React.createElement("option",{value:"normal"},"normal (default)"),React.createElement("option",{value:"lcs"},"lcs"),React.createElement("option",{value:"unorder-normal"},"unorder-normal"),React.createElement("option",{value:"unorder-lcs"},"unorder-lcs"))),React.createElement("blockquote",null,"The way to diff arrays, default is ",React.createElement("code",null,'"normal"'),", using ",React.createElement("code",null,'"lcs"')," may get a better result but much slower. ",React.createElement("code",null,'"unorder-normal"')," and ",React.createElement("code",null,'"unorder-lcs"')," are for unordered arrays (the order of elements in the array doesn't matter)."),React.createElement("label",{htmlFor:"ignore-case"},"Ignore case:",React.createElement("input",{type:"checkbox",id:"ignore-case",checked:ignoreCase,onChange:e=>setIgnoreCase(e.target.checked)})),React.createElement("blockquote",null,"Whether to ignore case when comparing string values."),React.createElement("label",{htmlFor:"recursive-equal"},"Recursive equal:",React.createElement("input",{type:"checkbox",id:"recursive-equal",checked:recursiveEqual,onChange:e=>setRecursiveEqual(e.target.checked)})),React.createElement("blockquote",null,"Whether to use recursive equal to compare objects. This can provide a better output when there are unchanged object items in an array, but it may cause performance issues when the data is very large."))),React.createElement("h2",null,"Viewer Configuration"),React.createElement("div",{className:"view-config"},React.createElement("form",null,React.createElement("label",{htmlFor:"indent"},"Indent:",React.createElement("input",{type:"number",id:"indent",min:1,max:16,value:indent,onChange:e=>setIndent(Number(e.target.value))})),React.createElement("blockquote",null,"Controls the indent in the ",React.createElement("code",null,"")," component."),React.createElement("label",{htmlFor:"highlight-inline-diff"},"Highlight Inline Diff:",React.createElement("input",{type:"checkbox",id:"highlight-inline-diff",checked:highlightInlineDiff,onChange:e=>setHighlightInlineDiff(e.target.checked)})),React.createElement("blockquote",null,"Whether to show the inline diff highlight. For example, if the left value ",React.createElement("code",null,'"JSON diff can\'t be possible"')," is changed to the right value ",React.createElement("code",null,'"JSON diff is possible"'),", it will be recognized as we first remove ",React.createElement("code",null,"can't be")," and then add ",React.createElement("code",null,"is"),". This feature is powered by ",React.createElement("a",{href:"https://github.com/gliese1337/fast-myers-diff",target:"_blank"},"gliese1337/fast-myers-diff"),". Note: the ",React.createElement("code",null,"showModification")," must be enabled, or you will not see modified lines."),React.createElement("label",{htmlFor:"inline-diff-options"},"Inline Diff Options:",React.createElement("span",null,"Diff method"),React.createElement("select",{id:"inline-diff-mode",value:inlineDiffMode,onChange:e=>setInlineDiffMode(e.target.value)},React.createElement("option",{value:"char"},"char (default)"),React.createElement("option",{value:"word"},"word")),React.createElement("span",null,"Word separator"),React.createElement("input",{id:"inline-diff-separator",value:inlineDiffSeparator,onChange:e=>setInlineDiffSeparator(e.target.value),placeholder:"Works when mode = char"})),React.createElement("blockquote",null,'You can control the inline diff behaviour. If the inline diff sources are sentences, we can diff them "by word" instead of "by character". For normal sentences, just set the method to ',React.createElement("code",null,"word")," and the separator to ",React.createElement("code",null,'" "'),' (a half-width space) like this demo. But if you prefer the Git-style output, you can leave this props default, which is diffing "by character".'),React.createElement("label",{htmlFor:"hide-unchanged-lines"},"Hide unchanged lines:",React.createElement("input",{type:"checkbox",id:"hide-unchanged-lines",checked:hideUnchangedLines,onChange:e=>setHideUnchangedLines(e.target.checked)})),React.createElement("blockquote",null,"Whether to hide the unchanged lines (like what GitHub and GitLab does)."),React.createElement("label",{htmlFor:"use-virtual"},"Use virtual:",React.createElement("input",{type:"checkbox",id:"use-virtual",checked:useVirtual,onChange:e=>setUseVirtual(e.target.checked)})),React.createElement("blockquote",null,"Whether to use virtual list to render the diff. This can improve the performance when the diff result is very large."))),React.createElement("div",{className:"diff-result"},React.createElement("h2",null,"Examples"),React.createElement("p",null,React.createElement("button",{onClick:()=>openInPlayground(before1,after1)},"⬇️ Playground")," An regular example with 2 objects."),React.createElement(Viewer,_extends({diff:diff1},viewerCommonProps)),React.createElement("p",null,React.createElement("button",{onClick:()=>openInPlayground(before2,after2)},"⬇️ Playground")," An example with 2 arrays."),React.createElement(Viewer,_extends({diff:diff2},viewerCommonProps)),React.createElement("p",null,React.createElement("button",{onClick:()=>openInPlayground(before3,after3)},"⬇️ Playground"),' 2 variables with different types. The algorithm always returns the result "left is removed, right is added".'),React.createElement(Viewer,_extends({diff:diff3},viewerCommonProps)),React.createElement("p",null,React.createElement("button",{onClick:()=>openInPlayground(before4,after4)},"⬇️ Playground"),' 2 variables with the same primitive type. The algorithm always returns the result "left is modified to right" (if ',React.createElement("code",null,"showModification")," is set to ",React.createElement("code",null,"false"),', it will return the result "left is removed, right is added").'),React.createElement(Viewer,_extends({diff:diff4},viewerCommonProps)),React.createElement("p",null,React.createElement("button",{onClick:()=>openInPlayground(before5,after5)},"⬇️ Playground")," Most of the lines are equal, only small amount of lines are different. You can use the ",React.createElement("code",null,"hideUnchangedLines")," prop to hide the unchanged parts and make the result shorter. Notice: when the ",React.createElement("code",null,"diff")," prop is changed, the expand status will be reset, it's your responsibility to keep the ",React.createElement("code",null,"diff")," props unchanged (you may want to use ",React.createElement("code",null,"useState")," or ",React.createElement("code",null,"useMemo"),")."),React.createElement(Viewer,_extends({diff:diff5},viewerCommonProps)),React.createElement("p",null,React.createElement("button",{onClick:()=>openInPlayground(before6,after6)},"⬇️ Playground")," An example for the recursive equal. If the differ option ",React.createElement("code",null,"recursiveEqual")," is set to ",React.createElement("code",null,"true"),", the object items should be treated as equal."),React.createElement(Viewer,_extends({diff:diff6},viewerCommonProps))),React.createElement("div",{className:"demo-footer"},React.createElement("p",null,"Made with ♥ by Rex Zeng")),React.createElement("a",{href:"https://github.com/rexskz/json-diff-kit"},React.createElement("img",{style:{position:"absolute",top:0,right:0,border:"none"},src:"https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67",alt:"Fork me on GitHub"})))}; + + __$styleInject(".json-diff-viewer {\n border-collapse: collapse;\n border-spacing: 0;\n table-layout: fixed;\n width: 100%;\n}\n.json-diff-viewer tr {\n vertical-align: top;\n}\n.json-diff-viewer tr .line-add {\n background: #a5d6a7;\n}\n.json-diff-viewer tr .line-remove {\n background: #ef9a9a;\n}\n.json-diff-viewer tr .line-modify {\n background: #ffe082;\n}\n.json-diff-viewer tr:hover td {\n position: relative;\n}\n.json-diff-viewer tr:hover td::before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.05);\n content: '';\n pointer-events: none;\n}\n.json-diff-viewer tr.expand-line {\n text-align: center;\n}\n.json-diff-viewer tr.expand-line td {\n padding: 4px 0;\n}\n.json-diff-viewer tr.expand-line:hover td:before {\n background: transparent;\n}\n.json-diff-viewer tr.expand-line .has-lines-before {\n border-bottom: 1px solid;\n}\n.json-diff-viewer tr.expand-line .has-lines-after {\n border-top: 1px solid;\n}\n.json-diff-viewer tr.expand-line button {\n margin: 0 0.5em;\n padding: 0;\n color: #2196f3;\n font-family: sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';\n font-size: 12px;\n border: none;\n background: transparent;\n user-select: none;\n cursor: pointer;\n}\n.json-diff-viewer tr.expand-line button:hover {\n text-decoration: underline;\n}\n.json-diff-viewer td {\n padding: 1px;\n font-size: 0;\n}\n.json-diff-viewer td.line-number {\n border-right: 1px solid;\n box-sizing: content-box;\n font-family: monospace;\n font-size: 14px;\n padding: 0 8px;\n text-align: right;\n user-select: none;\n}\n.json-diff-viewer pre {\n margin: 0;\n font-size: 12px;\n line-height: 16px;\n overflow: hidden;\n white-space: pre-wrap;\n word-break: break-all;\n}\n.json-diff-viewer pre .inline-diff-add {\n background: rgba(0, 0, 0, 0.08);\n text-decoration: underline;\n word-break: break-all;\n}\n.json-diff-viewer pre .inline-diff-remove {\n background: rgba(0, 0, 0, 0.08);\n text-decoration: line-through;\n word-break: break-all;\n}\n.json-diff-viewer-virtual pre {\n white-space: pre;\n overflow-x: auto;\n}\n.json-diff-viewer-virtual pre::-webkit-scrollbar {\n display: none;\n}\n"); + + __$styleInject("html,\nbody {\n margin: 0;\n padding: 0;\n background: #f2f4f6;\n font-family: sans-serif;\n font-size: 14px;\n}\ncode {\n background: #f9f2f4;\n color: #c7254e;\n padding: 0 4px;\n}\na,\na:visited {\n color: #2196f3;\n}\n[disabled] {\n cursor: not-allowed;\n}\n"); + + const Index=()=>{const[usePlayground,setUsePlayground]=React.useState(true);return usePlayground?React.createElement(Playground,{onSwitch:()=>setUsePlayground(false)}):React.createElement(Docs,{onSwitch:()=>setUsePlayground(true)})};ReactDOM.render(React.createElement(React.StrictMode,null,React.createElement(Index,null)),document.getElementById("root")); + +}));