optimizely-oui
Version:
Optimizely's Component Library.
2 lines • 1.46 MB
JavaScript
/*! For license information please see main.js.LICENSE.txt */
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("React"),require("ReactDOM"));else if("function"==typeof define&&define.amd)define(["React","ReactDOM"],t);else{var n="object"==typeof exports?t(require("React"),require("ReactDOM")):t(e.React,e.ReactDOM);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(e,t){return(()=>{var n={94180:e=>{e.exports=function(e){if(Array.isArray(e))return e}},11232:e=>{e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},38111:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},81260:e=>{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},58527:e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}e.exports=t},97111:e=>{e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},14859:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}}},93291:(e,t,n)=>{var r=n(58921);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var s=a?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}},91557:e=>{e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},981:e=>{e.exports=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}}},37365:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},11359:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},25782:(e,t,n)=>{var r=n(81260);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e}},78834:e=>{e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},51068:(e,t,n)=>{var r=n(94180),o=n(981),a=n(37365);e.exports=function(e,t){return r(e)||o(e,t)||a()}},75182:(e,t,n)=>{var r=n(11232),o=n(91557),a=n(11359);e.exports=function(e){return r(e)||o(e)||a()}},58921:e=>{function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t},8230:e=>{"use strict";function t(){return null}function n(){return t}t.isRequired=t,e.exports={and:n,between:n,booleanSome:n,childrenHavePropXorChildren:n,childrenOf:n,childrenOfType:n,childrenSequenceOf:n,componentWithName:n,disallowedIf:n,elementType:n,empty:n,explicitNull:n,forbidExtraProps:Object,integer:n,keysOf:n,mutuallyExclusiveProps:n,mutuallyExclusiveTrueProps:n,nChildren:n,nonNegativeInteger:t,nonNegativeNumber:n,numericString:n,object:n,or:n,range:n,ref:n,requiredBy:n,restrictedProp:n,sequenceOf:n,shape:n,stringEndsWith:n,stringStartsWith:n,uniqueArray:n,uniqueArrayOf:n,valuesOf:n,withShape:n}},11316:(e,t,n)=>{e.exports=n(8230)},42838:(e,t,n)=>{"use strict";var r=n(59846),o=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,a=function e(t,n,a,i,s){for(var l=i,u=0;u<a;){var c=r.ToString(u);if(r.HasProperty(n,c)){var d=r.Get(n,c),f=!1;if(s>0&&(f=r.IsArray(d)),f)l=e(t,d,r.ToLength(r.Get(d,"length")),l,s-1);else{if(l>=o)throw new TypeError("index too large");r.CreateDataPropertyOrThrow(t,r.ToString(l),d),l+=1}}u+=1}return l};e.exports=function(){var e=r.ToObject(this),t=r.ToLength(r.Get(e,"length")),n=1;arguments.length>0&&void 0!==arguments[0]&&(n=r.ToInteger(arguments[0]));var o=r.ArraySpeciesCreate(e,0);return a(o,e,t,0,n),o}},77591:(e,t,n)=>{"use strict";var r=n(14926),o=n(4090),a=n(42838),i=n(71675),s=i(),l=n(36587),u=o.call(Function.call,s);r(u,{getPolyfill:i,implementation:a,shim:l}),e.exports=u},71675:(e,t,n)=>{"use strict";var r=n(42838);e.exports=function(){return Array.prototype.flat||r}},36587:(e,t,n)=>{"use strict";var r=n(14926),o=n(71675);e.exports=function(){var e=o();return r(Array.prototype,{flat:e},{flat:function(){return Array.prototype.flat!==e}}),e}},60629:(e,t,n)=>{"use strict";var r=n(42384),o=[],a=[],i=r.makeRequestCallFromTimer((function(){if(a.length)throw a.shift()}));function s(e){var t;(t=o.length?o.pop():new l).task=e,r(t)}function l(){this.task=null}e.exports=s,l.prototype.call=function(){try{this.task.call()}catch(e){s.onerror?s.onerror(e):(a.push(e),i())}finally{this.task=null,o[o.length]=this}}},42384:(e,t,n)=>{"use strict";function r(e){a.length||o(),a[a.length]=e}e.exports=r;var o,a=[],i=0;function s(){for(;i<a.length;){var e=i;if(i+=1,a[e].call(),i>1024){for(var t=0,n=a.length-i;t<n;t++)a[t]=a[t+i];a.length-=i,i=0}}a.length=0,i=0}var l,u,c,d=void 0!==n.g?n.g:self,f=d.MutationObserver||d.WebKitMutationObserver;function p(e){return function(){var t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}"function"==typeof f?(l=1,u=new f(s),c=document.createTextNode(""),u.observe(c,{characterData:!0}),o=function(){l=-l,c.data=l}):o=p(s),r.requestFlush=o,r.makeRequestCallFromTimer=p},86991:(e,t,n)=>{"use strict";var r=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i};Object.defineProperty(t,"__esModule",{value:!0});var o,a,i=n(35651),s=i;!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.ADDED=1]="ADDED",e[e.REMOVED=2]="REMOVED"}(o=t.DiffType||(t.DiffType={})),function(e){e.CHARS="diffChars",e.WORDS="diffWords",e.WORDS_WITH_SPACE="diffWordsWithSpace",e.LINES="diffLines",e.TRIMMED_LINES="diffTrimmedLines",e.SENTENCES="diffSentences",e.CSS="diffCss"}(a=t.DiffMethod||(t.DiffMethod={}));var l=function(e){var t=e.split("\n");if(t.every((function(e){return!e})))return 2===t.length?[]:(t.pop(),t);var n=t[t.length-1],r=t[0];return n||t.pop(),r||t.shift(),t};t.computeLineInformation=function(e,t,n,u,c){void 0===n&&(n=!1),void 0===u&&(u=a.CHARS),void 0===c&&(c=0);var d=i.diffLines(e.trimRight(),t.trimRight(),{newlineIsToken:!0,ignoreWhitespace:!1,ignoreCase:!1}),f=c,p=c,h=[],m=0,y=[],v=[],g=function e(t,r,i,c,h){return l(t).map((function(t,g){var _={},b={};if(!(v.includes(r+"-"+g)||h&&0!==g)){if(i||c)if(y.includes(m)||y.push(m),c){p+=1,_.lineNumber=p,_.type=o.REMOVED,_.value=t||" ";var w=d[r+1];if(w&&w.added&&l(w.value)[g]){var M=e(w.value,r,!0,!1,!0)[0].right,D=M.value,O=M.lineNumber,S=M.type;if(v.push(r+1+"-"+g),b.lineNumber=O,b.type=S,n)b.value=D;else{var k=function(e,t,n){void 0===n&&(n=a.CHARS);var r=s[n](e,t),i={left:[],right:[]};return r.forEach((function(e){var t=e.added,n=e.removed,r=e.value,a={};return t&&(a.type=o.ADDED,a.value=r,i.right.push(a)),n&&(a.type=o.REMOVED,a.value=r,i.left.push(a)),n||t||(a.type=o.DEFAULT,a.value=r,i.right.push(a),i.left.push(a)),a})),i}(t,D,u);b.value=k.right,_.value=k.left}}}else f+=1,b.lineNumber=f,b.type=o.ADDED,b.value=t;else p+=1,f+=1,_.lineNumber=p,_.type=o.DEFAULT,_.value=t,b.lineNumber=f,b.type=o.DEFAULT,b.value=t;return m+=1,{right:b,left:_}}})).filter(Boolean)};return d.forEach((function(e,t){var n=e.added,o=e.removed,a=e.value;h=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e}(h,g(a,t,n,o))})),{lineInformation:h,diffLines:y}}},84538:(e,t,n)=>{"use strict";var r,o=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=n(63804),i=n(13980),s=n(72779),l=n(86991);l.DiffMethod;var u,c=n(92818),d=n(36631),f=d.default||d;!function(e){e.LEFT="L",e.RIGHT="R"}(u=t.ZF||(t.ZF={}));var p=function(e){function t(t){var n=e.call(this,t)||this;return n.resetCodeBlocks=function(){return n.state.expandedBlocks.length>0&&(n.setState({expandedBlocks:[]}),!0)},n.onBlockExpand=function(e){var t=n.state.expandedBlocks.slice();t.push(e),n.setState({expandedBlocks:t})},n.computeStyles=f(c.default),n.onLineNumberClickProxy=function(e){return n.props.onLineNumberClick?function(t){return n.props.onLineNumberClick(e,t)}:function(){}},n.renderWordDiff=function(e,t){return e.map((function(e,r){var o;return a.createElement("span",{key:r,className:s.default(n.styles.wordDiff,(o={},o[n.styles.wordAdded]=e.type===l.DiffType.ADDED,o[n.styles.wordRemoved]=e.type===l.DiffType.REMOVED,o))},t?t(e.value):e.value)}))},n.renderLine=function(e,t,r,o,i,u){var c,d,f,p,h,m=r+"-"+e,y=u+"-"+i,v=n.props.highlightLines.includes(m)||n.props.highlightLines.includes(y),g=t===l.DiffType.ADDED,_=t===l.DiffType.REMOVED;return h=Array.isArray(o)?n.renderWordDiff(o,n.props.renderContent):n.props.renderContent?n.props.renderContent(o):o,a.createElement(a.Fragment,null,!n.props.hideLineNumbers&&a.createElement("td",{onClick:e&&n.onLineNumberClickProxy(m),className:s.default(n.styles.gutter,(c={},c[n.styles.emptyGutter]=!e,c[n.styles.diffAdded]=g,c[n.styles.diffRemoved]=_,c[n.styles.highlightedGutter]=v,c))},a.createElement("pre",{className:n.styles.lineNumber},e)),!n.props.splitView&&!n.props.hideLineNumbers&&a.createElement("td",{onClick:i&&n.onLineNumberClickProxy(y),className:s.default(n.styles.gutter,(d={},d[n.styles.emptyGutter]=!i,d[n.styles.diffAdded]=g,d[n.styles.diffRemoved]=_,d[n.styles.highlightedGutter]=v,d))},a.createElement("pre",{className:n.styles.lineNumber},i)),a.createElement("td",{className:s.default(n.styles.marker,(f={},f[n.styles.emptyLine]=!h,f[n.styles.diffAdded]=g,f[n.styles.diffRemoved]=_,f[n.styles.highlightedLine]=v,f))},a.createElement("pre",null,g&&"+",_&&"-")),a.createElement("td",{className:s.default(n.styles.content,(p={},p[n.styles.emptyLine]=!h,p[n.styles.diffAdded]=g,p[n.styles.diffRemoved]=_,p[n.styles.highlightedLine]=v,p))},a.createElement("pre",{className:n.styles.contentText},h)))},n.renderSplitView=function(e,t){var r=e.left,o=e.right;return a.createElement("tr",{key:t,className:n.styles.line},n.renderLine(r.lineNumber,r.type,u.LEFT,r.value),n.renderLine(o.lineNumber,o.type,u.RIGHT,o.value))},n.renderInlineView=function(e,t){var r,o=e.left,i=e.right;return o.type===l.DiffType.REMOVED&&i.type===l.DiffType.ADDED?a.createElement(a.Fragment,{key:t},a.createElement("tr",{className:n.styles.line},n.renderLine(o.lineNumber,o.type,u.LEFT,o.value,null)),a.createElement("tr",{className:n.styles.line},n.renderLine(null,i.type,u.RIGHT,i.value,i.lineNumber))):(o.type===l.DiffType.REMOVED&&(r=n.renderLine(o.lineNumber,o.type,u.LEFT,o.value,null)),o.type===l.DiffType.DEFAULT&&(r=n.renderLine(o.lineNumber,o.type,u.LEFT,o.value,i.lineNumber,u.RIGHT)),i.type===l.DiffType.ADDED&&(r=n.renderLine(null,i.type,u.RIGHT,i.value,i.lineNumber)),a.createElement("tr",{key:t,className:n.styles.line},r))},n.onBlockClickProxy=function(e){return function(){return n.onBlockExpand(e)}},n.renderSkippedLineIndicator=function(e,t,r,o){var i,l=n.props,u=l.hideLineNumbers,c=l.splitView,d=n.props.codeFoldMessageRenderer?n.props.codeFoldMessageRenderer(e,r,o):a.createElement("pre",{className:n.styles.codeFoldContent},"Expand ",e," lines ..."),f=a.createElement("td",null,a.createElement("a",{onClick:n.onBlockClickProxy(t),tabIndex:0},d)),p=!c&&!u;return a.createElement("tr",{key:r+"-"+o,className:n.styles.codeFold},!u&&a.createElement("td",{className:n.styles.codeFoldGutter}),a.createElement("td",{className:s.default((i={},i[n.styles.codeFoldGutter]=p,i))}),p?a.createElement(a.Fragment,null,a.createElement("td",null),f):a.createElement(a.Fragment,null,f,a.createElement("td",null)),a.createElement("td",null),a.createElement("td",null))},n.renderDiff=function(){var e=n.props,t=e.oldValue,r=e.newValue,o=e.splitView,i=e.disableWordDiff,s=e.compareMethod,u=e.linesOffset,c=l.computeLineInformation(t,r,i,s,u),d=c.lineInformation,f=c.diffLines,p=n.props.extraLinesSurroundingDiff<0?0:n.props.extraLinesSurroundingDiff,h=[];return d.map((function(e,t){var r=f[0],i=r-t;if(n.props.showDiffOnly&&(i===-p&&(h=[],f.shift()),e.left.type===l.DiffType.DEFAULT&&(i>p||void 0===r)&&!n.state.expandedBlocks.includes(r)))return h.push(t+1),t===d.length-1&&h.length>1?n.renderSkippedLineIndicator(h.length,r,e.left.lineNumber,e.right.lineNumber):null;var s=o?n.renderSplitView(e,t):n.renderInlineView(e,t);if(i===p&&h.length>0){var u=h.length;return h=[],a.createElement(a.Fragment,{key:t},n.renderSkippedLineIndicator(u,r,e.left.lineNumber,e.right.lineNumber),s)}return s}))},n.render=function(){var e,t=n.props,r=t.oldValue,o=t.newValue,i=t.useDarkTheme,l=t.leftTitle,u=t.rightTitle,c=t.splitView,d=t.hideLineNumbers;if("string"!=typeof r||"string"!=typeof o)throw Error('"oldValue" and "newValue" should be strings');n.styles=n.computeStyles(n.props.styles,i);var f=n.renderDiff(),p=d?2:3,h=d?2:4,m=(l||u)&&a.createElement("tr",null,a.createElement("td",{colSpan:c?p:h,className:n.styles.titleBlock},a.createElement("pre",{className:n.styles.contentText},l)),c&&a.createElement("td",{colSpan:p,className:n.styles.titleBlock},a.createElement("pre",{className:n.styles.contentText},u)));return a.createElement("table",{className:s.default(n.styles.diffContainer,(e={},e[n.styles.splitView]=c,e))},a.createElement("tbody",null,m,f))},n.state={expandedBlocks:[]},n}return o(t,e),t.defaultProps={oldValue:"",newValue:"",splitView:!0,highlightLines:[],disableWordDiff:!1,compareMethod:l.DiffMethod.CHARS,styles:{},hideLineNumbers:!1,extraLinesSurroundingDiff:3,showDiffOnly:!0,useDarkTheme:!1,linesOffset:0},t.propTypes={oldValue:i.string.isRequired,newValue:i.string.isRequired,splitView:i.bool,disableWordDiff:i.bool,compareMethod:i.oneOf(Object.values(l.DiffMethod)),renderContent:i.func,onLineNumberClick:i.func,extraLinesSurroundingDiff:i.number,styles:i.object,hideLineNumbers:i.bool,showDiffOnly:i.bool,highlightLines:i.arrayOf(i.string),leftTitle:i.oneOfType([i.string,i.element]),rightTitle:i.oneOfType([i.string,i.element]),linesOffset:i.number},t}(a.Component);t.ZP=p},92818:(e,t,n)=>{"use strict";var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(56479);t.default=function(e,t){var n,a,i,s,l,u,c;void 0===t&&(t=!1);var d=e.variables,f=void 0===d?{}:d,p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["variables"]),h={light:r({diffViewerBackground:"#fff",diffViewerColor:"212529",addedBackground:"#e6ffed",addedColor:"#24292e",removedBackground:"#ffeef0",removedColor:"#24292e",wordAddedBackground:"#acf2bd",wordRemovedBackground:"#fdb8c0",addedGutterBackground:"#cdffd8",removedGutterBackground:"#ffdce0",gutterBackground:"#f7f7f7",gutterBackgroundDark:"#f3f1f1",highlightBackground:"#fffbdd",highlightGutterBackground:"#fff5b1",codeFoldGutterBackground:"#dbedff",codeFoldBackground:"#f1f8ff",emptyLineBackground:"#fafbfc",gutterColor:"#212529",addedGutterColor:"#212529",removedGutterColor:"#212529",codeFoldContentColor:"#212529",diffViewerTitleBackground:"#fafbfc",diffViewerTitleColor:"#212529",diffViewerTitleBorderColor:"#eee"},f.light||{}),dark:r({diffViewerBackground:"#2e303c",diffViewerColor:"#FFF",addedBackground:"#044B53",addedColor:"white",removedBackground:"#632F34",removedColor:"white",wordAddedBackground:"#055d67",wordRemovedBackground:"#7d383f",addedGutterBackground:"#034148",removedGutterBackground:"#632b30",gutterBackground:"#2c2f3a",gutterBackgroundDark:"#262933",highlightBackground:"#2a3967",highlightGutterBackground:"#2d4077",codeFoldGutterBackground:"#21232b",codeFoldBackground:"#262831",emptyLineBackground:"#363946",gutterColor:"#464c67",addedGutterColor:"#8c8c8c",removedGutterColor:"#8c8c8c",codeFoldContentColor:"#555a7b",diffViewerTitleBackground:"#2f323e",diffViewerTitleColor:"#555a7b",diffViewerTitleBorderColor:"#353846"},f.dark||{})},m=t?h.dark:h.light,y=o.css({width:"100%",label:"content"}),v=o.css(((n={})["."+y]={width:"50%"},n.label="split-view",n)),g=o.css({width:"100%",background:m.diffViewerBackground,pre:{margin:0,whiteSpace:"pre-wrap",lineHeight:"25px"},label:"diff-container",borderCollapse:"collapse"}),_=o.css({color:m.codeFoldContentColor,label:"code-fold-content"}),b=o.css({color:m.diffViewerColor,label:"content-text"}),w=o.css(((a={background:m.diffViewerTitleBackground,padding:10,borderBottom:"1px solid "+m.diffViewerTitleBorderColor,label:"title-block",":last-child":{borderLeft:"1px solid "+m.diffViewerTitleBorderColor}})["."+b]={color:m.diffViewerTitleColor},a)),M=o.css({color:m.gutterColor,label:"line-number"}),D=o.css(((i={background:m.removedBackground,color:m.removedColor,pre:{color:m.removedColor}})["."+M]={color:m.removedGutterColor},i.label="diff-removed",i)),O=o.css(((s={background:m.addedBackground,color:m.addedColor,pre:{color:m.addedColor}})["."+M]={color:m.addedGutterColor},s.label="diff-added",s)),S=o.css({padding:2,display:"inline-flex",borderRadius:1,label:"word-diff"}),k=o.css({background:m.wordAddedBackground,label:"word-added"}),L=o.css({background:m.wordRemovedBackground,label:"word-removed"}),T=o.css({backgroundColor:m.codeFoldGutterBackground,label:"code-fold-gutter"}),E=o.css({backgroundColor:m.codeFoldBackground,height:40,fontSize:14,fontWeight:700,label:"code-fold",a:{textDecoration:"underline !important",cursor:"pointer",pre:{display:"inline"}}}),x=o.css({backgroundColor:m.emptyLineBackground,label:"empty-line"}),P=o.css(((l={width:25,paddingLeft:10,paddingRight:10,userSelect:"none",label:"marker"})["&."+O]={pre:{color:m.addedColor}},l["&."+D]={pre:{color:m.removedColor}},l)),C=o.css(((u={background:m.highlightBackground,label:"highlighted-line"})["."+k+", ."+L]={backgroundColor:"initial"},u)),j=o.css({label:"highlighted-gutter"}),I=o.css(((c={userSelect:"none",minWidth:50,padding:"0 10px",label:"gutter",textAlign:"right",background:m.gutterBackground,"&:hover":{cursor:"pointer",background:m.gutterBackgroundDark,pre:{opacity:1}},pre:{opacity:.5}})["&."+O]={background:m.addedGutterBackground},c["&."+D]={background:m.removedGutterBackground},c["&."+j]={background:m.highlightGutterBackground,"&:hover":{background:m.highlightGutterBackground}},c)),N=o.css({"&:hover":{background:m.gutterBackground,cursor:"initial"},label:"empty-gutter"}),Y={diffContainer:g,diffRemoved:D,diffAdded:O,splitView:v,marker:P,highlightedGutter:j,highlightedLine:C,gutter:I,line:o.css({verticalAlign:"baseline",label:"line"}),wordDiff:S,wordAdded:k,wordRemoved:L,codeFoldGutter:T,codeFold:E,emptyGutter:N,emptyLine:x,lineNumber:M,contentText:b,content:y,codeFoldContent:_,titleBlock:w},A=Object.keys(p).reduce((function(e,t){var n;return r({},e,((n={})[t]=o.css(p[t]),n))}),{});return Object.keys(Y).reduce((function(e,t){var n;return r({},e,((n={})[t]=A[t]?o.cx(Y[t],A[t]):Y[t],n))}),{})}},49597:(e,t)=>{"use strict";t.E=function(){var e=[],t=e;function n(){t===e&&(t=e.slice())}return{listen:function(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var r=!0;return n(),t.push(e),function(){if(r){r=!1,n();var o=t.indexOf(e);t.splice(o,1)}}},emit:function(){for(var n=e=t,r=0;r<n.length;r++)n[r].apply(n,arguments)}}}},72779:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)&&n.length){var i=o.apply(null,n);i&&e.push(i)}else if("object"===a)for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},4254:(e,t,n)=>{"use strict";n.r(t),n.d(t,{addEventListener:()=>l});var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o=void 0;function a(e){e.handlers===e.nextHandlers&&(e.nextHandlers=e.handlers.slice())}function i(e){this.target=e,this.events={}}i.prototype.getEventHandlers=function(e,t){var n,r=String(e)+" "+String((n=t)?!0===n?100:(n.capture<<0)+(n.passive<<1)+(n.once<<2):0);return this.events[r]||(this.events[r]={handlers:[],handleEvent:void 0},this.events[r].nextHandlers=this.events[r].handlers),this.events[r]},i.prototype.handleEvent=function(e,t,n){var r=this.getEventHandlers(e,t);r.handlers=r.nextHandlers,r.handlers.forEach((function(e){e&&e(n)}))},i.prototype.add=function(e,t,n){var r=this,o=this.getEventHandlers(e,n);a(o),0===o.nextHandlers.length&&(o.handleEvent=this.handleEvent.bind(this,e,n),this.target.addEventListener(e,o.handleEvent,n)),o.nextHandlers.push(t);var i=!0;return function(){if(i){i=!1,a(o);var s=o.nextHandlers.indexOf(t);o.nextHandlers.splice(s,1),0===o.nextHandlers.length&&(r.target&&r.target.removeEventListener(e,o.handleEvent,n),o.handleEvent=void 0)}}};var s="__consolidated_events_handlers__";function l(e,t,n,a){e[s]||(e[s]=new i(e));var l=function(e){if(e)return void 0===o&&(o=function(){if(!r)return!1;if(!window.addEventListener||!window.removeEventListener||!Object.defineProperty)return!1;var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t)}catch(e){}return e}()),o?e:!!e.capture}(a);return e[s].add(t,n,l)}},50381:(e,t,n)=>{"use strict";var r=n(91706);e.exports=function(e,t){var n,o,a,i,s,l,u=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),i=document.createRange(),s=document.getSelection(),(l=document.createElement("span")).textContent=e,l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(n){n.stopPropagation(),t.format&&(n.preventDefault(),n.clipboardData.clearData(),n.clipboardData.setData(t.format,e))})),document.body.appendChild(l),i.selectNodeContents(l),s.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),u=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(i):s.removeAllRanges()),l&&document.body.removeChild(l),a()}return u}},29693:(e,t,n)=>{"use strict";t.__esModule=!0;var r=n(63804),o=(i(r),i(n(13980))),a=i(n(8051));function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}i(n(26590));var c=1073741823;function d(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}t.default=function(e,t){var n,i,f="__create-react-context-"+(0,a.default)()+"__",p=function(e){function n(){var t,r;s(this,n);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return t=r=l(this,e.call.apply(e,[this].concat(a))),r.emitter=d(r.props.value),l(r,t)}return u(n,e),n.prototype.getChildContext=function(){var e;return(e={})[f]=this.emitter,e},n.prototype.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n=this.props.value,r=e.value,o=void 0;((a=n)===(i=r)?0!==a||1/a==1/i:a!=a&&i!=i)?o=0:(o="function"==typeof t?t(n,r):c,0!=(o|=0)&&this.emitter.set(e.value,o))}var a,i},n.prototype.render=function(){return this.props.children},n}(r.Component);p.childContextTypes=((n={})[f]=o.default.object.isRequired,n);var h=function(t){function n(){var e,r;s(this,n);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return e=r=l(this,t.call.apply(t,[this].concat(a))),r.state={value:r.getValue()},r.onUpdate=function(e,t){0!=((0|r.observedBits)&t)&&r.setState({value:r.getValue()})},l(r,e)}return u(n,t),n.prototype.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?c:t},n.prototype.componentDidMount=function(){this.context[f]&&this.context[f].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?c:e},n.prototype.componentWillUnmount=function(){this.context[f]&&this.context[f].off(this.onUpdate)},n.prototype.getValue=function(){return this.context[f]?this.context[f].get():e},n.prototype.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return h.contextTypes=((i={})[f]=o.default.object,i),{Provider:p,Consumer:h}},e.exports=t.default},25315:(e,t,n)=>{"use strict";t.__esModule=!0;var r=a(n(63804)),o=a(n(29693));function a(e){return e&&e.__esModule?e:{default:e}}t.default=r.default.createContext||o.default,e.exports=t.default},14926:(e,t,n)=>{"use strict";var r=n(33464),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),a=Object.prototype.toString,i=Array.prototype.concat,s=Object.defineProperty,l=s&&function(){var e={};try{for(var t in s(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),u=function(e,t,n,r){var o;(!(t in e)||"function"==typeof(o=r)&&"[object Function]"===a.call(o)&&r())&&(l?s(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},c=function(e,t){var n=arguments.length>2?arguments[2]:{},a=r(t);o&&(a=i.call(a,Object.getOwnPropertySymbols(t)));for(var s=0;s<a.length;s+=1)u(e,a[s],t[a[s]],n[a[s]])};c.supportsDescriptors=!!l,e.exports=c},35651:function(e,t){!function(e){"use strict";function t(){}function n(e,t,n,r,o){for(var a=0,i=t.length,s=0,l=0;a<i;a++){var u=t[a];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,a&&t[a-1].added){var c=t[a-1];t[a-1]=t[a],t[a]=c}}else{if(!u.added&&o){var d=n.slice(s,s+u.count);d=d.map((function(e,t){var n=r[l+t];return n.length>e.length?n:e})),u.value=e.join(d)}else u.value=e.join(n.slice(s,s+u.count));s+=u.count,u.added||(l+=u.count)}}var f=t[i-1];return i>1&&"string"==typeof f.value&&(f.added||f.removed)&&e.equals("",f.value)&&(t[i-2].value+=f.value,t.pop()),t}function r(e){return{newPos:e.newPos,components:e.components.slice(0)}}t.prototype={diff:function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.callback;"function"==typeof o&&(a=o,o={}),this.options=o;var i=this;function s(e){return a?(setTimeout((function(){a(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var l=(t=this.removeEmpty(this.tokenize(t))).length,u=e.length,c=1,d=l+u,f=[{newPos:-1,components:[]}],p=this.extractCommon(f[0],t,e,0);if(f[0].newPos+1>=l&&p+1>=u)return s([{value:this.join(t),count:t.length}]);function h(){for(var o=-1*c;o<=c;o+=2){var a=void 0,d=f[o-1],p=f[o+1],h=(p?p.newPos:0)-o;d&&(f[o-1]=void 0);var m=d&&d.newPos+1<l,y=p&&0<=h&&h<u;if(m||y){if(!m||y&&d.newPos<p.newPos?(a=r(p),i.pushComponent(a.components,void 0,!0)):((a=d).newPos++,i.pushComponent(a.components,!0,void 0)),h=i.extractCommon(a,t,e,o),a.newPos+1>=l&&h+1>=u)return s(n(i,a.components,t,e,i.useLongestToken));f[o]=a}else f[o]=void 0}c++}if(a)!function e(){setTimeout((function(){if(c>d)return a();h()||e()}),0)}();else for(;c<=d;){var m=h();if(m)return m}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,a=n.length,i=e.newPos,s=i-r,l=0;i+1<o&&s+1<a&&this.equals(t[i+1],n[s+1]);)i++,s++,l++;return l&&e.components.push({count:l}),e.newPos=i,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};var o=new t;function a(e,t){if("function"==typeof e)t.callback=e;else if(e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var i=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,s=/\S/,l=new t;l.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!s.test(e)&&!s.test(t)},l.tokenize=function(e){for(var t=e.split(/(\s+|[()[\]{}'"]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&i.test(t[n])&&i.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var u=new t;function c(e,t,n){return u.diff(e,t,n)}u.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};var d=new t;d.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var f=new t;function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}f.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};var m=Object.prototype.toString,y=new t;function v(e,t,n,r,o){var a,i;for(t=t||[],n=n||[],r&&(e=r(o,e)),a=0;a<t.length;a+=1)if(t[a]===e)return n[a];if("[object Array]"===m.call(e)){for(t.push(e),i=new Array(e.length),n.push(i),a=0;a<e.length;a+=1)i[a]=v(e[a],t,n,r,o);return t.pop(),n.pop(),i}if(e&&e.toJSON&&(e=e.toJSON()),"object"===p(e)&&null!==e){t.push(e),i={},n.push(i);var s,l=[];for(s in e)e.hasOwnProperty(s)&&l.push(s);for(l.sort(),a=0;a<l.length;a+=1)i[s=l[a]]=v(e[s],t,n,r,s);t.pop(),n.pop()}else i=e;return i}y.useLongestToken=!0,y.tokenize=u.tokenize,y.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=void 0===r?function(e,t){return void 0===t?n:t}:r;return"string"==typeof e?e:JSON.stringify(v(e,null,null,o),o," ")},y.equals=function(e,n){return t.prototype.equals.call(y,e.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};var g=new t;function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.split(/\r\n|[\n\v\f\r\x85]/),r=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],o=[],a=0;function i(){var e={};for(o.push(e);a<n.length;){var r=n[a];if(/^(\-\-\-|\+\+\+|@@)\s/.test(r))break;var i=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(r);i&&(e.index=i[1]),a++}for(s(e),s(e),e.hunks=[];a<n.length;){var u=n[a];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(u))break;if(/^@@/.test(u))e.hunks.push(l());else{if(u&&t.strict)throw new Error("Unknown line "+(a+1)+" "+JSON.stringify(u));a++}}}function s(e){var t=/^(---|\+\+\+)\s+(.*)$/.exec(n[a]);if(t){var r="---"===t[1]?"old":"new",o=t[2].split("\t",2),i=o[0].replace(/\\\\/g,"\\");/^".*"$/.test(i)&&(i=i.substr(1,i.length-2)),e[r+"FileName"]=i,e[r+"Header"]=(o[1]||"").trim(),a++}}function l(){for(var e=a,o=n[a++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),i={oldStart:+o[1],oldLines:+o[2]||1,newStart:+o[3],newLines:+o[4]||1,lines:[],linedelimiters:[]},s=0,l=0;a<n.length&&!(0===n[a].indexOf("--- ")&&a+2<n.length&&0===n[a+1].indexOf("+++ ")&&0===n[a+2].indexOf("@@"));a++){var u=0==n[a].length&&a!=n.length-1?" ":n[a][0];if("+"!==u&&"-"!==u&&" "!==u&&"\\"!==u)break;i.lines.push(n[a]),i.linedelimiters.push(r[a]||"\n"),"+"===u?s++:"-"===u?l++:" "===u&&(s++,l++)}if(s||1!==i.newLines||(i.newLines=0),l||1!==i.oldLines||(i.oldLines=0),t.strict){if(s!==i.newLines)throw new Error("Added line count did not match for hunk at line "+(e+1));if(l!==i.oldLines)throw new Error("Removed line count did not match for hunk at line "+(e+1))}return i}for(;a<n.length;)i();return o}function b(e,t,n){var r=!0,o=!1,a=!1,i=1;return function s(){if(r&&!a){if(o?i++:r=!1,e+i<=n)return i;a=!0}if(!o)return a||(r=!0),t<=e-i?-i++:(o=!0,s())}}function w(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t&&(t=_(t)),Array.isArray(t)){if(t.length>1)throw new Error("applyPatch only works with a single input.");t=t[0]}var r,o,a=e.split(/\r\n|[\n\v\f\r\x85]/),i=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],s=t.hunks,l=n.compareLine||function(e,t,n,r){return t===r},u=0,c=n.fuzzFactor||0,d=0,f=0;function p(e,t){for(var n=0;n<e.lines.length;n++){var r=e.lines[n],o=r.length>0?r[0]:" ",i=r.length>0?r.substr(1):r;if(" "===o||"-"===o){if(!l(t+1,a[t],o,i)&&++u>c)return!1;t++}}return!0}for(var h=0;h<s.length;h++){for(var m=s[h],y=a.length-m.oldLines,v=0,g=f+m.oldStart-1,w=b(g,d,y);void 0!==v;v=w())if(p(m,g+v)){m.offset=f+=v;break}if(void 0===v)return!1;d=m.offset+m.oldStart+m.oldLines}for(var M=0,D=0;D<s.length;D++){var O=s[D],S=O.oldStart+O.offset+M-1;M+=O.newLines-O.oldLines,S<0&&(S=0);for(var k=0;k<O.lines.length;k++){var L=O.lines[k],T=L.length>0?L[0]:" ",E=L.length>0?L.substr(1):L,x=O.linedelimiters[k];if(" "===T)S++;else if("-"===T)a.splice(S,1),i.splice(S,1);else if("+"===T)a.splice(S,0,E),i.splice(S,0,x),S++;else if("\\"===T){var P=O.lines[k-1]?O.lines[k-1][0]:null;"+"===P?r=!0:"-"===P&&(o=!0)}}}if(r)for(;!a[a.length-1];)a.pop(),i.pop();else o&&(a.push(""),i.push("\n"));for(var C=0;C<a.length-1;C++)a[C]=a[C]+i[C];return a.join("")}function M(e,t,n,r,o,a,i){i||(i={}),void 0===i.context&&(i.context=4);var s=c(n,r,i);function l(e){return e.map((function(e){return" "+e}))}s.push({value:"",lines:[]});for(var u=[],d=0,f=0,p=[],m=1,y=1,v=function(e){var t=s[e],o=t.lines||t.value.replace(/\n$/,"").split("\n");if(t.lines=o,t.added||t.removed){var a;if(!d){var c=s[e-1];d=m,f=y,c&&(p=i.context>0?l(c.lines.slice(-i.context)):[],d-=p.length,f-=p.length)}(a=p).push.apply(a,h(o.map((function(e){return(t.added?"+":"-")+e})))),t.added?y+=o.length:m+=o.length}else{if(d)if(o.length<=2*i.context&&e<s.length-2){var v;(v=p).push.apply(v,h(l(o)))}else{var g,_=Math.min(o.length,i.context);(g=p).push.apply(g,h(l(o.slice(0,_))));var b={oldStart:d,oldLines:m-d+_,newStart:f,newLines:y-f+_,lines:p};if(e>=s.length-2&&o.length<=i.context){var w=/\n$/.test(n),M=/\n$/.test(r),D=0==o.length&&p.length>b.oldLines;!w&&D&&p.splice(b.oldLines,0,"\\ No newline at end of file"),(w||D)&&M||p.push("\\ No newline at end of file")}u.push(b),d=0,f=0,p=[]}m+=o.length,y+=o.length}},g=0;g<s.length;g++)v(g);return{oldFileName:e,newFileName:t,oldHeader:o,newHeader:a,hunks:u}}function D(e,t,n,r,o,a,i){var s=M(e,t,n,r,o,a,i),l=[];e==t&&l.push("Index: "+e),l.push("==================================================================="),l.push("--- "+s.oldFileName+(void 0===s.oldHeader?"":"\t"+s.oldHeader)),l.push("+++ "+s.newFileName+(void 0===s.newHeader?"":"\t"+s.newHeader));for(var u=0;u<s.hunks.length;u++){var c=s.hunks[u];l.push("@@ -"+c.oldStart+","+c.oldLines+" +"+c.newStart+","+c.newLines+" @@"),l.push.apply(l,c.lines)}return l.join("\n")+"\n"}function O(e,t){if(t.length>e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function S(e){var t=z(e.lines),n=t.oldLines,r=t.newLines;void 0!==n?e.oldLines=n:delete e.oldLines,void 0!==r?e.newLines=r:delete e.newLines}function k(e,t){if("string"==typeof e){if(/^@@/m.test(e)||/^Index:/m.test(e))return _(e)[0];if(!t)throw new Error("Must provide a base reference or pass in a patch");return M(void 0,void 0,t,e)}return e}function L(e){return e.newFileName&&e.newFileName!==e.oldFileName}function T(e,t,n){return t===n?t:(e.conflict=!0,{mine:t,theirs:n})}function E(e,t){return e.oldStart<t.oldStart&&e.oldStart+e.oldLines<t.oldStart}function x(e,t){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+t,newLines:e.newLines,lines:e.lines}}function P(e,t,n,r,o){var a={offset:t,lines:n,index:0},i={offset:r,lines:o,index:0};for(N(e,a,i),N(e,i,a);a.index<a.lines.length&&i.index<i.lines.length;){var s=a.lines[a.index],l=i.lines[i.index];if("-"!==s[0]&&"+"!==s[0]||"-"!==l[0]&&"+"!==l[0])if("+"===s[0]&&" "===l[0]){var u;(u=e.lines).push.apply(u,h(A(a)))}else if("+"===l[0]&&" "===s[0]){var c;(c=e.lines).push.apply(c,h(A(i)))}else"-"===s[0]&&" "===l[0]?j(e,a,i):"-"===l[0]&&" "===s[0]?j(e,i,a,!0):s===l?(e.lines.push(s),a.index++,i.index++):I(e,A(a),A(i));else C(e,a,i)}Y(e,a),Y(e,i),S(e)}function C(e,t,n){var r,o,a=A(t),i=A(n);if(R(a)&&R(i)){var s,l;if(O(a,i)&&H(n,a,a.length-i.length))return void(s=e.lines).push.apply(s,h(a));if(O(i,a)&&H(t,i,i.length-a.length))return void(l=e.lines).push.apply(l,h(i))}else if(o=i,(r=a).length===o.length&&O(r,o)){var u;return void(u=e.lines).push.apply(u,h(a))}I(e,a,i)}function j(e,t,n,r){var o,a=A(t),i=function(e,t){for(var n=[],r=[],o=0,a=!1,i=!1;o<t.length&&e.index<e.lines.length;){var s=e.lines[e.index],l=t[o];if("+"===l[0])break;if(a=a||" "!==s[0],r.push(l),o++,"+"===s[0])for(i=!0;"+"===s[0];)n.push(s),s=e.lines[++e.index];l.substr(1)===s.substr(1)?(n.push(s),e.index++):i=!0}if("+"===(t[o]||"")[0]&&a&&(i=!0),i)return n;for(;o<t.length;)r.push(t[o++]);return{merged:r,changes:n}}(n,a);i.merged?(o=e.lines).push.apply(o,h(i.merged)):I(e,r?i:a,r?a:i)}function I(e,t,n){e.conflict=!0,e.lines.push({conflict:!0,mine:t,theirs:n})}function N(e,t,n){for(;t.offset<n.offset&&t.index<t.lines.length;){var r=t.lines[t.index++];e.lines.push(r),t.offset++}}function Y(e,t){for(;t.index<t.lines.length;){var n=t.lines[t.index++];e.lines.push(n)}}function A(e){for(var t=[],n=e.lines[e.index][0];e.index<e.lines.length;){var r=e.lines[e.index];if("-"===n&&"+"===r[0]&&(n="+"),n!==r[0])break;t.push(r),e.index++}return t}function R(e){return e.reduce((function(e,t){return e&&"-"===t[0]}),!0)}function H(e,t,n){for(var r=0;r<n;r++){var o=t[t.length-n+r].substr(1);if(e.lines[e.index+r]!==" "+o)return!1}return e.index+=n,!0}function z(e){var t=0,n=0;return e.forEach((function(e){if("string"!=typeof e){var r=z(e.mine),o=z(e.theirs);void 0!==t&&(r.oldLines===o.oldLines?t+=r.oldLines:t=void 0),void 0!==n&&(r.newLines===o.newLines?n+=r.newLines:n=void 0)}else void 0===n||"+"!==e[0]&&" "!==e[0]||n++,void 0===t||"-"!==e[0]&&" "!==e[0]||t++})),{oldLines:t,newLines:n}}g.tokenize=function(e){return e.slice()},g.join=g.removeEmpty=function(e){return e},e.Diff=t,e.diffChars=function(e,t,n){return o.diff(e,t,n)},e.diffWords=function(e,t,n){return n=a(n,{ignoreWhitespace:!0}),l.diff(e,t,n)},e.diffWordsWithSpace=function(e,t,n){return l.diff(e,t,n)},e.diffLines=c,e.diffTrimmedLines=function(e,t,n){var r=a(n,{ignoreWhitespace:!0});return u.diff(e,t,r)},e.diffSentences=function(e,t,n){return d.diff(e,t,n)},e.diffCss=function(e,t,n){return f.diff(e,t,n)},e.diffJson=function(e,t,n){return y.diff(e,t,n)},e.diffArrays=function(e,t,n){return g.diff(e,t,n)},e.structuredPatch=M,e.createTwoFilesPatch=D,e.createPatch=function(e,t,n,r,o,a){return D(e,e,t,n,r,o,a)},e.applyPatch=w,e.applyPatches=function(e,t){"string"==typeof e&&(e=_(e));var n=0;!function r(){var o=e[n++];if(!o)return t.complete();t.loadFile(o,(function(e,n){if(e)return t.complete(e);var a=w(n,o,t);t.patched(o,a,(function(e){if(e)return t.complete(e);r()}))}))}()},e.parsePatch=_,e.merge=function(e,t,n){e=k(e,n),t=k(t,n);var r={};(e.index||t.index)&&(r.index=e.index||t.index),(e.newFileName||t.newFileName)&&(L(e)?L(t)?(r.oldFileName=T(r,e.oldFileName,t.oldFileName),r.newFileName=T(r,e.newFileName,t.newFileName),r.oldHeader=T(r,e.oldHeader,t.oldHeader),r.newHeader=T(r,e.newHeader,t.newHeader)):(r.oldFileName=e.oldFileName,r.newFileName=e.newFileName,r.oldHeader=e.oldHeader,r.newHeader=e.newHeader):(r.oldFileName=t.oldFileName||e.oldFileName,r.newFileName=t.newFileName||e.newFileName,r.oldHeader=t.oldHeader||e.oldHeader,r.newHeader=t.newHeader||e.newHeader)),r.hunks=[];for(var o=0,a=0,i=0,s=0;o<e.hunks.length||a<t.hunks.length;){var l=e.hunks[o]||{oldStart:1/0},u=t.hunks[a]||{oldStart:1/0};if(E(l,u))r.hunks.push(x(l,i)),o++,s+=l.newLines-l.oldLines;else if(E(u,l))r.hunks.push(x(u,s)),a++,i+=u.newLines-u.oldLines;else{var c={oldStart:Math.min(l.oldStart,u.oldStart),oldLines:0,newStart:Math.min(l.newStart+i,u.oldStart+s),newLines:0,lines:[]};P(c,l.oldStart,l.lines,u.oldStart,u.lines),a++,o++,r.hunks.push(c)}}return r},e.convertChangesToDMP=function(e){for(var t,n,r=[],o=0;o<e.length;o++)n=(t=e[o]).added?1:t.removed?-1:0,r.push([n,t.value]);return r},e.convertChangesToXML=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r.added?t.push("<ins>"):r.removed&&t.push("<del>"),t.push((o=r.value,void 0,o.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""))),r.added?t.push("</ins>"):r.removed&&t.push("</del>")}var o;return t.join("")},e.canonicalize=v,Object.defineProperty(e,"__esModule",{value:!0})}(t)},30353:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18717),o=n(36374),a=n(95300),i=n(32661),s=n(31814),l=function(){function e(e,t,n){void 0===t&&(t={}),void 0===n&&(n=!1);var a=this;this.context=t,this.isSetUp=!1,this.handleRefCountChange=function(){var e=a.store.getState().refCount>0;e&&!a.isSetUp?(a.backend.setup(),a.isSetUp=!0):!e&&a.isSetUp&&(a.backend.teardown(),a.isSetUp=!1)};var l=function(e){var t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return r.createStore(o.default,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(n);this.store=l,this.monitor=new i.default(l,new s.default(l)),this.backend=e(this),l.subscribe(this.handleRefCountChange)}return e.prototype.getContext=function(){return this.context},e.prototype.getMonitor=function(){return this.monitor},e.prototype.getBackend=function(){return this.backend},e.prototype.getRegistry=function(){return this.monitor.registry},e.prototype.getActions=function(){var e=this,t=this.store.dispatch,n=a.default(this);return Object.keys(n).reduce((function(r,o){var a,i=n[o];return r[o]=(a=i,function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=a.apply(e,n);void 0!==o&&t(o)}),r}),{})},e.prototype.dispatch=function(e){this.store.dispatch(e)},e}();t.default=l},32661:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(11627),o=n(1232),a=n(35635),i=n(47677),s=function(){function e(e,t){this.store=e,this.registry=t}return e.prototype.subscribeToStateChange=function(e,t){var n=this;void 0===t&&(t={handlerIds:void 0});var r=t.handlerIds;i("function"==typeof e,"listener must be a function."),i(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");var o=this.store.getState().stateId;return this.store.subscribe((function(){var t=n.store.getState(),i=t.stateId;try{i===o||i===o+1&&!a.areDirty(t.dirtyHandlerIds,r)||e()}finally{o=i}}))},e.prototype.subscribeToOffsetChange=function(e){var t=this;i("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset;return this.store.subscribe((function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())}))},e.prototype.canDragSource=function(e){var t=this.registry.getSource(e);return i(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)},e.prototype.canDropOnTarget=function(e){var t=this.registry.getTarget(e);if(i(t,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var n=this.registry.getTargetType(e),o=this.getItemType();return r.default(n,o)&&t.canDrop(this,e)},e.prototype.isDragging=function(){return Boolean(this.getItemType())},e.prototype.isDraggingSource=function(e){var t=this.registry.getSource(e,!0);return i(t,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)},e.prototype.isOverTarget=function(e,t){void 0===t&&(t={shallow:!1});var n=t.shallow;if(!this.isDragging())return!1;var o=this.registry.getTargetType(e),a=this.getItemType();if(a&&!r.default(o,a))return!1;var i=this.getTargetIds();if(!i.length)return!1;var s=i.indexOf(e);return n?s===i.length-1:s>-1},e.prototype.getItemType=function(){return this.store.getState().dragOperation.itemType},e.prototype.getItem=function(){return this.store.getState().dragOperation.item},e.prototype.getSourceId=function(){return this.store.getState().dragOperation.sourceId},e.prototype.getTargetIds=function(){return this.store.getState().dragOperation.targetIds},e.prototype.getDropResult=function(){return this.store.getState().dragOperation.dropResult},e.prototype.didDrop=function(){return this.store.getState().dragOperation.didDrop},e.prototype.isSourcePublic=function(){return this.store.getState().dragOperation.isSourcePublic},e.prototype.getInitialClientOffset=function(){return this.store.getState().dragOffset.initialClientOffset},e.prototype.getInitialSourceClientOffset=function(){return this.store.getState().dragOffset.initialSourceClientOffset},e.prototype.getClientOffset=function(){return this.store.getState().dragOffset.clientOffset},e.prototype.getSourceClientOffset=function(){return o.getSourceClientOffset(this.store.getState().dragOffset)},e.prototype.getDifferenceFromInitialOffset=function(){return o.getDifferenceFromInitialOffset(this.store.getState().dragOffset)},e}();t.default=s},31814:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(99088),o=n(2733),a=n(40075),i=n(72541),s=n(47677),l=n(60629);function u(e){switch(e[0]){case"S":return a.HandlerRole.SOURCE;case"T":return a.HandlerRole.TARGET;default:s(!1,"Cannot parse handler ID: "+e)}}function c(e,t){var n=e.entries(),r=!1;do{var o=n.next(),a=o.done;if(o.value[1]===t)return!0;r=a}while(!r);return!1}var d=function(){function e(e){this.store=e,this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null}return e.prototype.addSource=function(e,t){i.validateType(e),i.validateSourceContract(t);var n=this.addHandler(a.HandlerRole.SOURCE,e,t);return this.store.dispatch(r.addSource(n)),n},e.prototype.addTarget=function(e,t){i.validateType(e,!0),i.validateTargetContract(t);var n=this.addHandler(a.HandlerRole.TARGET,e,t);return this.store.dispatch(r.addTarget(n)),n},e.prototype.containsHandler=function(e){return c(this.dragSources,e)||c(this.dropTargets,e)},e.prototype.getSource=function(e,t){return void 0===t&&(t=!1),s(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)},e.prototype.getTarget=function(e){return s(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)},e.prototype.getSourceType=function(e){return s(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)},e.prototype.getTargetType=function(e){return s(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)},e.prototype.isSourceId=function(e){return u(e)===a.HandlerRole.SOURCE},e.prototype.isTargetId=function(e){return u(e)===a.HandlerRole.TARGET},e.prototype.removeSource=function(e){var t=this;s(this.getSource(e),"Expected an existing source."),this.store.dispatch(r.removeSource(e)),l((function(){t.dragSources.delete(e),t.types.delete(e)}))},e.prototype.removeTarget=function(e){s(this.getTarget(e),"Expected an existing target."),this.store.dispatch(r.removeTarget(e)),this.dropTargets.delete(e),this.types.delete(e)},e.prototype.pinSource=function(e){var t=this.getSource(e);s(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t},e.prototype.unpinSource=function(){s(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null},e.prototype.addHandler=function(e,t,n){var r=function(e){var t=o.default().toString();switch(e){case a.HandlerRole.SOURCE:ret