diff --git a/webapp/dist/assets/index-cesRSKqp.js b/webapp/dist/assets/index-De52_UIv.js similarity index 90% rename from webapp/dist/assets/index-cesRSKqp.js rename to webapp/dist/assets/index-De52_UIv.js index 8bdc360..10ac1b0 100644 --- a/webapp/dist/assets/index-cesRSKqp.js +++ b/webapp/dist/assets/index-De52_UIv.js @@ -1,4 +1,4 @@ -var cf=Object.defineProperty;var df=(N,b,T)=>b in N?cf(N,b,{enumerable:!0,configurable:!0,writable:!0,value:T}):N[b]=T;var Eo=(N,b,T)=>(df(N,typeof b!="symbol"?b+"":b,T),T);(function(){const b=document.createElement("link").relList;if(b&&b.supports&&b.supports("modulepreload"))return;for(const M of document.querySelectorAll('link[rel="modulepreload"]'))O(M);new MutationObserver(M=>{for(const K of M)if(K.type==="childList")for(const h of K.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&O(h)}).observe(document,{childList:!0,subtree:!0});function T(M){const K={};return M.integrity&&(K.integrity=M.integrity),M.referrerPolicy&&(K.referrerPolicy=M.referrerPolicy),M.crossOrigin==="use-credentials"?K.credentials="include":M.crossOrigin==="anonymous"?K.credentials="omit":K.credentials="same-origin",K}function O(M){if(M.ep)return;M.ep=!0;const K=T(M);fetch(M.href,K)}})();var gf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pf(N){return N&&N.__esModule&&Object.prototype.hasOwnProperty.call(N,"default")?N.default:N}var wl={exports:{}},Wo;function Yo(){return Wo||(Wo=1,function(N,b){(function(T,O){N.exports=O()})(gf,function(){var T=navigator.userAgent,O=navigator.platform,M=/gecko\/\d/i.test(T),K=/MSIE \d/.test(T),h=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(T),c=/Edge\/(\d+)/.exec(T),d=K||h||c,v=d&&(K?document.documentMode||6:+(c||h)[1]),m=!c&&/WebKit\//.test(T),w=m&&/Qt\/\d+\.\d+/.test(T),x=!c&&/Chrome\/(\d+)/.exec(T),_=x&&+x[1],I=/Opera\//.test(T),z=/Apple Computer/.test(navigator.vendor),Y=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(T),q=/PhantomJS/.test(T),Z=z&&(/Mobile\/\w+/.test(T)||navigator.maxTouchPoints>2),le=/Android/.test(T),ie=Z||le||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(T),ne=Z||/Mac/.test(O),he=/\bCrOS\b/.test(T),re=/win/i.test(O),J=I&&T.match(/Version\/(\d*\.\d*)/);J&&(J=Number(J[1])),J&&J>=15&&(I=!1,m=!0);var ye=ne&&(w||I&&(J==null||J<12.11)),Ie=M||d&&v>=9;function Ke(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Me=function(e,t){var i=e.className,r=Ke(t).exec(i);if(r){var n=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(n?r[1]+n:"")}};function qe(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function De(e,t){return qe(e).appendChild(t)}function Q(e,t,i,r){var n=document.createElement(e);if(i&&(n.className=i),r&&(n.style.cssText=r),typeof t=="string")n.appendChild(document.createTextNode(t));else if(t)for(var l=0;l=t)return a+(t-l);a+=o-l,a+=i-a%i,l=o+1}}var gt=function(){this.id=null,this.f=null,this.time=0,this.handler=pr(this.onTimeout,this)};gt.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},gt.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i=t)return r+Math.min(a,t-n);if(n+=l-r,n+=i-n%i,r=l+1,n>=t)return r}}var vr=[""];function yr(e){for(;vr.length<=e;)vr.push(f(vr)+" ");return vr[e]}function f(e){return e[e.length-1]}function y(e,t){for(var i=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||D.test(e))}function H(e,t){return t?t.source.indexOf("\\w")>-1&&F(e)?!0:t.test(e):F(e)}function R(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ae=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ue(e){return e.charCodeAt(0)>=768&&ae.test(e)}function ce(e,t,i){for(;(i<0?t>0:ti?-1:1;;){if(t==i)return t;var n=(t+i)/2,l=r<0?Math.ceil(n):Math.floor(n);if(l==t)return e(l)?t:i;e(l)?i=l:t=l+r}}function Ce(e,t,i,r){if(!e)return r(t,i,"ltr",0);for(var n=!1,l=0;lt||t==i&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,i),a.level==1?"rtl":"ltr",l),n=!0)}n||r(t,i,"ltr")}var be=null;function Ne(e,t,i){var r;be=null;for(var n=0;nt)return n;l.to==t&&(l.from!=l.to&&i=="before"?r=n:be=n),l.from==t&&(l.from!=l.to&&i!="before"?r=n:be=n)}return r??be}var ut=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,l=/[LRr]/,a=/[Lb1n]/,o=/[1n]/;function s(u,g,p){this.level=u,this.from=g,this.to=p}return function(u,g){var p=g=="ltr"?"L":"R";if(u.length==0||g=="ltr"&&!r.test(u))return!1;for(var L=u.length,C=[],E=0;E-1&&(r[t]=n.slice(0,l).concat(n.slice(l+1)))}}}function Te(e,t){var i=mr(e,t);if(i.length)for(var r=Array.prototype.slice.call(arguments,2),n=0;n0}function Mt(e){e.prototype.on=function(t,i){te(this,t,i)},e.prototype.off=function(t,i){je(this,t,i)}}function Oe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Dl(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function gn(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function $r(e){Oe(e),Dl(e)}function pn(e){return e.target||e.srcElement}function Nl(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),ne&&e.ctrlKey&&t==1&&(t=3),t}var is=function(){if(d&&v<9)return!1;var e=Q("div");return"draggable"in e||"dragDrop"in e}(),vn;function ns(e){if(vn==null){var t=Q("span","​");De(e,Q("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(vn=t.offsetWidth<=1&&t.offsetHeight>2&&!(d&&v<8))}var i=vn?Q("span","​"):Q("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var yn;function ls(e){if(yn!=null)return yn;var t=De(e,document.createTextNode("AخA")),i=bt(t,0,1).getBoundingClientRect(),r=bt(t,1,2).getBoundingClientRect();return qe(e),!i||i.left==i.right?!1:yn=r.right-i.right<3}var mn=` +var cf=Object.defineProperty;var df=(O,b,T)=>b in O?cf(O,b,{enumerable:!0,configurable:!0,writable:!0,value:T}):O[b]=T;var Eo=(O,b,T)=>(df(O,typeof b!="symbol"?b+"":b,T),T);(function(){const b=document.createElement("link").relList;if(b&&b.supports&&b.supports("modulepreload"))return;for(const M of document.querySelectorAll('link[rel="modulepreload"]'))N(M);new MutationObserver(M=>{for(const K of M)if(K.type==="childList")for(const h of K.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&N(h)}).observe(document,{childList:!0,subtree:!0});function T(M){const K={};return M.integrity&&(K.integrity=M.integrity),M.referrerPolicy&&(K.referrerPolicy=M.referrerPolicy),M.crossOrigin==="use-credentials"?K.credentials="include":M.crossOrigin==="anonymous"?K.credentials="omit":K.credentials="same-origin",K}function N(M){if(M.ep)return;M.ep=!0;const K=T(M);fetch(M.href,K)}})();button_collapse_uncollapse_menu.onclick=function(){this.closest(".main-menu").classList.toggle("collapsed")};var gf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pf(O){return O&&O.__esModule&&Object.prototype.hasOwnProperty.call(O,"default")?O.default:O}var wl={exports:{}},Wo;function Yo(){return Wo||(Wo=1,function(O,b){(function(T,N){O.exports=N()})(gf,function(){var T=navigator.userAgent,N=navigator.platform,M=/gecko\/\d/i.test(T),K=/MSIE \d/.test(T),h=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(T),c=/Edge\/(\d+)/.exec(T),d=K||h||c,v=d&&(K?document.documentMode||6:+(c||h)[1]),m=!c&&/WebKit\//.test(T),w=m&&/Qt\/\d+\.\d+/.test(T),x=!c&&/Chrome\/(\d+)/.exec(T),_=x&&+x[1],I=/Opera\//.test(T),z=/Apple Computer/.test(navigator.vendor),Y=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(T),q=/PhantomJS/.test(T),Z=z&&(/Mobile\/\w+/.test(T)||navigator.maxTouchPoints>2),le=/Android/.test(T),ie=Z||le||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(T),ne=Z||/Mac/.test(N),he=/\bCrOS\b/.test(T),re=/win/i.test(N),J=I&&T.match(/Version\/(\d*\.\d*)/);J&&(J=Number(J[1])),J&&J>=15&&(I=!1,m=!0);var ye=ne&&(w||I&&(J==null||J<12.11)),Ie=M||d&&v>=9;function Ke(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Me=function(e,t){var i=e.className,r=Ke(t).exec(i);if(r){var n=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(n?r[1]+n:"")}};function qe(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function De(e,t){return qe(e).appendChild(t)}function Q(e,t,i,r){var n=document.createElement(e);if(i&&(n.className=i),r&&(n.style.cssText=r),typeof t=="string")n.appendChild(document.createTextNode(t));else if(t)for(var l=0;l=t)return a+(t-l);a+=o-l,a+=i-a%i,l=o+1}}var gt=function(){this.id=null,this.f=null,this.time=0,this.handler=pr(this.onTimeout,this)};gt.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},gt.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i=t)return r+Math.min(a,t-n);if(n+=l-r,n+=i-n%i,r=l+1,n>=t)return r}}var vr=[""];function yr(e){for(;vr.length<=e;)vr.push(f(vr)+" ");return vr[e]}function f(e){return e[e.length-1]}function y(e,t){for(var i=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||D.test(e))}function H(e,t){return t?t.source.indexOf("\\w")>-1&&F(e)?!0:t.test(e):F(e)}function R(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ae=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ue(e){return e.charCodeAt(0)>=768&&ae.test(e)}function ce(e,t,i){for(;(i<0?t>0:ti?-1:1;;){if(t==i)return t;var n=(t+i)/2,l=r<0?Math.ceil(n):Math.floor(n);if(l==t)return e(l)?t:i;e(l)?i=l:t=l+r}}function Ce(e,t,i,r){if(!e)return r(t,i,"ltr",0);for(var n=!1,l=0;lt||t==i&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,i),a.level==1?"rtl":"ltr",l),n=!0)}n||r(t,i,"ltr")}var be=null;function Ne(e,t,i){var r;be=null;for(var n=0;nt)return n;l.to==t&&(l.from!=l.to&&i=="before"?r=n:be=n),l.from==t&&(l.from!=l.to&&i!="before"?r=n:be=n)}return r??be}var ut=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,l=/[LRr]/,a=/[Lb1n]/,o=/[1n]/;function s(u,g,p){this.level=u,this.from=g,this.to=p}return function(u,g){var p=g=="ltr"?"L":"R";if(u.length==0||g=="ltr"&&!r.test(u))return!1;for(var L=u.length,C=[],E=0;E-1&&(r[t]=n.slice(0,l).concat(n.slice(l+1)))}}}function Te(e,t){var i=mr(e,t);if(i.length)for(var r=Array.prototype.slice.call(arguments,2),n=0;n0}function Mt(e){e.prototype.on=function(t,i){te(this,t,i)},e.prototype.off=function(t,i){je(this,t,i)}}function Oe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Dl(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function gn(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function $r(e){Oe(e),Dl(e)}function pn(e){return e.target||e.srcElement}function Nl(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),ne&&e.ctrlKey&&t==1&&(t=3),t}var is=function(){if(d&&v<9)return!1;var e=Q("div");return"draggable"in e||"dragDrop"in e}(),vn;function ns(e){if(vn==null){var t=Q("span","​");De(e,Q("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(vn=t.offsetWidth<=1&&t.offsetHeight>2&&!(d&&v<8))}var i=vn?Q("span","​"):Q("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var yn;function ls(e){if(yn!=null)return yn;var t=De(e,document.createTextNode("AخA")),i=bt(t,0,1).getBoundingClientRect(),r=bt(t,1,2).getBoundingClientRect();return qe(e),!i||i.left==i.right?!1:yn=r.right-i.right<3}var mn=` b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],r=e.length;t<=r;){var n=e.indexOf(` `,t);n==-1&&(n=e.length);var l=e.slice(t,e.charAt(n-1)=="\r"?n-1:n),a=l.indexOf("\r");a!=-1?(i.push(l.slice(0,a)),t+=a+1):(i.push(l),t=n+1)}return i}:function(e){return e.split(/\r\n?|\n/)},as=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},os=function(){var e=Q("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),bn=null;function ss(e){if(bn!=null)return bn;var t=De(e,Q("span","x")),i=t.getBoundingClientRect(),r=bt(t,0,1).getBoundingClientRect();return bn=Math.abs(i.left-r.left)>1}var wn={},br={};function us(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),wn[e]=t}function fs(e,t){br[e]=t}function Di(e){if(typeof e=="string"&&br.hasOwnProperty(e))e=br[e];else if(e&&typeof e.name=="string"&&br.hasOwnProperty(e.name)){var t=br[e.name];typeof t=="string"&&(t={name:t}),e=A(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Di("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Di("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Cn(e,t){t=Di(t);var i=wn[t.name];if(!i)return Cn(e,"text/plain");var r=i(e,t);if(wr.hasOwnProperty(t.name)){var n=wr[t.name];for(var l in n)n.hasOwnProperty(l)&&(r.hasOwnProperty(l)&&(r["_"+l]=r[l]),r[l]=n[l])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var wr={};function hs(e,t){var i=wr.hasOwnProperty(e)?wr[e]:wr[e]={};dt(t,i)}function jt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var r in t){var n=t[r];n instanceof Array&&(n=n.concat([])),i[r]=n}return i}function Sn(e,t){for(var i;e.innerMode&&(i=e.innerMode(t),!(!i||i.mode==e));)t=i.state,e=i.mode;return i||{mode:e,state:t}}function Ol(e,t,i){return e.startState?e.startState(t,i):!0}var Ee=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};Ee.prototype.eol=function(){return this.pos>=this.string.length},Ee.prototype.sol=function(){return this.pos==this.lineStart},Ee.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ee.prototype.next=function(){if(this.post},Ee.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ee.prototype.skipToEnd=function(){this.pos=this.string.length},Ee.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ee.prototype.backUp=function(e){this.pos-=e},Ee.prototype.column=function(){return this.lastColumnPos0?null:(l&&t!==!1&&(this.pos+=l[0].length),l)}},Ee.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ee.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ee.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ee.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function j(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var r=0;;++r){var n=i.children[r],l=n.chunkSize();if(t=e.first&&ti?P(i,j(e,i).text.length):cs(t,j(e,t.line).text.length)}function cs(e,t){var i=e.ch;return i==null||i>t?P(e.line,t):i<0?P(e.line,0):e}function Wl(e,t){for(var i=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},Ct.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Ct.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ct.fromSaved=function(e,t,i){return t instanceof Ei?new Ct(e,jt(e.mode,t.state),i,t.lookAhead):new Ct(e,jt(e.mode,t),i)},Ct.prototype.save=function(e){var t=e!==!1?jt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ei(t,this.maxLookAhead):t};function Fl(e,t,i,r){var n=[e.state.modeGen],l={};zl(e,t.text,e.doc.mode,i,function(u,g){return n.push(u,g)},l,r);for(var a=i.state,o=function(u){i.baseTokens=n;var g=e.state.overlays[u],p=1,L=0;i.state=!0,zl(e,t.text,g.mode,i,function(C,E){for(var W=p;LC&&n.splice(p,1,C,n[p+1],B),p+=2,L=Math.min(C,B)}if(E)if(g.opaque)n.splice(W,p-W,C,"overlay "+E),p=W+2;else for(;We.options.maxHighlightLength&&jt(e.doc.mode,r.state),l=Fl(e,t,r);n&&(r.state=n),t.stateAfter=r.save(!n),t.styles=l.styles,l.classes?t.styleClasses=l.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Yr(e,t,i){var r=e.doc,n=e.display;if(!r.mode.startState)return new Ct(r,!0,t);var l=ds(e,t,i),a=l>r.first&&j(r,l-1).stateAfter,o=a?Ct.fromSaved(r,a,l):new Ct(r,Ol(r.mode),l);return r.iter(l,t,function(s){An(e,s.text,o);var u=o.line;s.stateAfter=u==t-1||u%5==0||u>=n.viewFrom&&ut.start)return l}throw new Error("Mode "+e.name+" failed to advance stream.")}var Pl=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function Bl(e,t,i,r){var n=e.doc,l=n.mode,a;t=se(n,t);var o=j(n,t.line),s=Yr(e,t.line,i),u=new Ee(o.text,e.options.tabSize,s),g;for(r&&(g=[]);(r||u.pose.options.maxHighlightLength?(o=!1,a&&An(e,t,r,g.pos),g.pos=t.length,p=null):p=Rl(Mn(i,g,r.state,L),l),L){var C=L[0].name;C&&(p="m-"+(p?C+" "+p:C))}if(!o||u!=p){for(;sa;--o){if(o<=l.first)return l.first;var s=j(l,o-1),u=s.stateAfter;if(u&&(!i||o+(u instanceof Ei?u.lookAhead:0)<=l.modeFrontier))return o;var g=Ze(s.text,null,e.options.tabSize);(n==null||r>g)&&(n=o-1,r=g)}return n}function gs(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontieri;r--){var n=j(e,r).stateAfter;if(n&&(!(n instanceof Ei)||r+n.lookAhead=t:l.to>t);(r||(r=[])).push(new Wi(a,l.from,s?null:l.to))}}return r}function ws(e,t,i){var r;if(e)for(var n=0;n=t:l.to>t);if(o||l.from==t&&a.type=="bookmark"&&(!i||l.marker.insertLeft)){var s=l.from==null||(a.inclusiveLeft?l.from<=t:l.from0&&o)for(var X=0;X0)){var g=[s,1],p=oe(u.from,o.from),L=oe(u.to,o.to);(p<0||!a.inclusiveLeft&&!p)&&g.push({from:u.from,to:o.from}),(L>0||!a.inclusiveRight&&!L)&&g.push({from:o.to,to:u.to}),n.splice.apply(n,g),s+=g.length-3}}return n}function Kl(e){var t=e.markedSpans;if(t){for(var i=0;it)&&(!r||Dn(r,l.marker)<0)&&(r=l.marker)}return r}function ql(e,t,i,r,n){var l=j(e,t),a=_t&&l.markedSpans;if(a)for(var o=0;o=0&&p<=0||g<=0&&p>=0)&&(g<=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?oe(u.to,i)>=0:oe(u.to,i)>0)||g>=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?oe(u.from,r)<=0:oe(u.from,r)<0)))return!0}}}function pt(e){for(var t;t=Yl(e);)e=t.find(-1,!0).line;return e}function Ls(e){for(var t;t=Hi(e);)e=t.find(1,!0).line;return e}function Ts(e){for(var t,i;t=Hi(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function Nn(e,t){var i=j(e,t),r=pt(i);return i==r?t:pe(r)}function Zl(e,t){if(t>e.lastLine())return t;var i=j(e,t),r;if(!Bt(e,i))return t;for(;r=Hi(i);)i=r.find(1,!0).line;return pe(i)+1}function Bt(e,t){var i=_t&&t.markedSpans;if(i){for(var r=void 0,n=0;nt.maxLineLength&&(t.maxLineLength=n,t.maxLine=r)})}var Cr=function(e,t,i){this.text=e,$l(this,t),this.height=i?i(this):1};Cr.prototype.lineNo=function(){return pe(this)},Mt(Cr);function ks(e,t,i,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Kl(e),$l(e,i);var n=r?r(e):1;n!=e.height&&wt(e,n)}function xs(e){e.parent=null,Kl(e)}var As={},Ms={};function Ql(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?Ms:As;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function Jl(e,t){var i=kt("span",null,null,m?"padding-right: .1px":null),r={pre:kt("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var n=0;n<=(t.rest?t.rest.length:0);n++){var l=n?t.rest[n-1]:t.line,a=void 0;r.pos=0,r.addToken=Ds,ls(e.display.measure)&&(a=ge(l,e.doc.direction))&&(r.addToken=Os(r.addToken,a)),r.map=[];var o=t!=e.display.externalMeasured&&pe(l);Es(l,r,Il(e,l,o)),l.styleClasses&&(l.styleClasses.bgClass&&(r.bgClass=zr(l.styleClasses.bgClass,r.bgClass||"")),l.styleClasses.textClass&&(r.textClass=zr(l.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(ns(e.display.measure))),n==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(m){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Te(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=zr(r.pre.className,r.textClass||"")),r}function _s(e){var t=Q("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ds(e,t,i,r,n,l,a){if(t){var o=e.splitSpaces?Ns(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,g;if(!s.test(t))e.col+=t.length,g=document.createTextNode(o),e.map.push(e.pos,e.pos+t.length,g),d&&v<9&&(u=!0),e.pos+=t.length;else{g=document.createDocumentFragment();for(var p=0;;){s.lastIndex=p;var L=s.exec(t),C=L?L.index-p:t.length-p;if(C){var E=document.createTextNode(o.slice(p,p+C));d&&v<9?g.appendChild(Q("span",[E])):g.appendChild(E),e.map.push(e.pos,e.pos+C,E),e.col+=C,e.pos+=C}if(!L)break;p+=C+1;var W=void 0;if(L[0]==" "){var B=e.cm.options.tabSize,U=B-e.col%B;W=g.appendChild(Q("span",yr(U),"cm-tab")),W.setAttribute("role","presentation"),W.setAttribute("cm-text"," "),e.col+=U}else L[0]=="\r"||L[0]==` @@ -21,56 +21,56 @@ b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],r=e.length;t<=r;){var n=e. `)>-1?i.value=e.prevInput="":e.prevInput=n,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},_e.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},_e.prototype.onKeyPress=function(){d&&v>=9&&(this.hasSelection=null),this.fastPoll()},_e.prototype.onContextMenu=function(e){var t=this,i=t.cm,r=i.display,n=t.textarea;t.contextMenuPending&&t.contextMenuPending();var l=ir(i,e),a=r.scroller.scrollTop;if(!l||I)return;var o=i.options.resetSelectionOnContextMenu;o&&i.doc.sel.contains(l)==-1&&Re(i,Qe)(i.doc,Ut(l),ht);var s=n.style.cssText,u=t.wrapper.style.cssText,g=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",n.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-g.top-5)+"px; left: "+(e.clientX-g.left-5)+`px; z-index: 1000; background: `+(d?"rgba(255, 255, 255, .05)":"transparent")+`; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var p;m&&(p=n.ownerDocument.defaultView.scrollY),r.input.focus(),m&&n.ownerDocument.defaultView.scrollTo(null,p),r.input.reset(),i.somethingSelected()||(n.value=t.prevInput=" "),t.contextMenuPending=C,r.selForContextMenu=i.doc.sel,clearTimeout(r.detectingSelectAll);function L(){if(n.selectionStart!=null){var W=i.somethingSelected(),B="​"+(W?n.value:"");n.value="⇚",n.value=B,t.prevInput=W?"":"​",n.selectionStart=1,n.selectionEnd=B.length,r.selForContextMenu=i.doc.sel}}function C(){if(t.contextMenuPending==C&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,n.style.cssText=s,d&&v<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=a),n.selectionStart!=null)){(!d||d&&v<9)&&L();var W=0,B=function(){r.selForContextMenu==i.doc.sel&&n.selectionStart==0&&n.selectionEnd>0&&t.prevInput=="​"?Re(i,Qa)(i):W++<10?r.detectingSelectAll=setTimeout(B,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(B,200)}}if(d&&v>=9&&L(),Ie){$r(e);var E=function(){je(window,"mouseup",E),setTimeout(C,20)};te(window,"mouseup",E)}else setTimeout(C,50)},_e.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},_e.prototype.setUneditable=function(){},_e.prototype.needsContentAttribute=!1;function uf(e,t){if(t=t?dt(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var i=tt(Pe(e));t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function r(){e.value=o.getValue()}var n;if(e.form&&(te(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var l=e.form;n=l.submit;try{var a=l.submit=function(){r(),l.submit=n,l.submit(),l.submit=a}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(je(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=n))}},e.style.display="none";var o=Le(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return o}function ff(e){e.off=je,e.on=te,e.wheelEventPixels=vu,e.Doc=it,e.splitLines=mn,e.countColumn=Ze,e.findColumn=Gr,e.isWordChar=F,e.Pass=Ht,e.signal=Te,e.Line=Cr,e.changeEnd=Gt,e.scrollbarModel=xa,e.Pos=P,e.cmpPos=oe,e.modes=wn,e.mimeModes=br,e.resolveMode=Di,e.getMode=Cn,e.modeExtensions=wr,e.extendMode=hs,e.copyState=jt,e.startState=Ol,e.innerMode=Sn,e.commands=pi,e.keyMap=Et,e.keyName=co,e.isModifierKey=fo,e.lookupKey=Wr,e.normalizeKeyMap=Pu,e.StringStream=Ee,e.SharedTextMarker=ci,e.TextMarker=$t,e.LineWidget=hi,e.e_preventDefault=Oe,e.e_stopPropagation=Dl,e.e_stop=$r,e.addClass=xt,e.contains=ct,e.rmClass=Me,e.keyNames=Xt}ef(Le),lf(Le);var hf="iter insert remove copy getEditor constructor".split(" ");for(var un in it.prototype)it.prototype.hasOwnProperty(un)&&Se(hf,un)<0&&(Le.prototype[un]=function(e){return function(){return e.apply(this.doc,arguments)}}(it.prototype[un]));return Mt(it),Le.inputStyles={textarea:_e,contenteditable:ve},Le.defineMode=function(e){!Le.defaults.mode&&e!="null"&&(Le.defaults.mode=e),us.apply(this,arguments)},Le.defineMIME=fs,Le.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Le.defineMIME("text/plain","null"),Le.defineExtension=function(e,t){Le.prototype[e]=t},Le.defineDocExtension=function(e,t){it.prototype[e]=t},Le.fromTextArea=uf,ff(Le),Le.version="5.65.16",Le})}(wl)),wl.exports}var vf=Yo();const yf=pf(vf);var Fo={exports:{}},Io;function mf(){return Io||(Io=1,function(N,b){(function(T){T(Yo())})(function(T){var O=T.Pos,M="http://www.w3.org/2000/svg";function K(f,y){this.mv=f,this.type=y,this.classes=y=="left"?{chunk:"CodeMirror-merge-l-chunk",start:"CodeMirror-merge-l-chunk-start",end:"CodeMirror-merge-l-chunk-end",insert:"CodeMirror-merge-l-inserted",del:"CodeMirror-merge-l-deleted",connect:"CodeMirror-merge-l-connect"}:{chunk:"CodeMirror-merge-r-chunk",start:"CodeMirror-merge-r-chunk-start",end:"CodeMirror-merge-r-chunk-end",insert:"CodeMirror-merge-r-inserted",del:"CodeMirror-merge-r-deleted",connect:"CodeMirror-merge-r-connect"}}K.prototype={constructor:K,init:function(f,y,S){this.edit=this.mv.edit,(this.edit.state.diffViews||(this.edit.state.diffViews=[])).push(this),this.orig=T(f,dt({value:y,readOnly:!this.mv.options.allowEditingOriginals},dt(S))),this.mv.options.connect=="align"&&(this.edit.state.trackAlignable||(this.edit.state.trackAlignable=new Ht(this.edit)),this.orig.state.trackAlignable=new Ht(this.orig)),this.lockButton.title=this.edit.phrase("Toggle locked scrolling"),this.lockButton.setAttribute("aria-label",this.lockButton.title),this.orig.state.diffViews=[this];var k=S.chunkClassLocation||"background";Object.prototype.toString.call(k)!="[object Array]"&&(k=[k]),this.classes.classLocation=k,this.diff=kt(De(y),De(S.value),this.mv.options.ignoreWhitespace),this.chunks=bt(this.diff),this.diffOutOfDate=this.dealigned=!1,this.needsScrollSync=null,this.showDifferences=S.showDifferences!==!1},registerEvents:function(f){this.forceUpdate=d(this),x(this,!0,!1),v(this,f)},setShowDifferences:function(f){f=f!==!1,f!=this.showDifferences&&(this.showDifferences=f,this.forceUpdate("full"))}};function h(f){f.diffOutOfDate&&(f.diff=kt(f.orig.getValue(),f.edit.getValue(),f.mv.options.ignoreWhitespace),f.chunks=bt(f.diff),f.diffOutOfDate=!1,T.signal(f.edit,"updateDiff",f.diff))}var c=!1;function d(f){var y={from:0,to:0,marked:[]},S={from:0,to:0,marked:[]},k,A=!1;function D(ue){c=!0,A=!1,ue=="full"&&(f.svg&&At(f.svg),f.copyButtons&&At(f.copyButtons),I(f.edit,y.marked,f.classes),I(f.orig,S.marked,f.classes),y.from=y.to=S.from=S.to=0),h(f),f.showDifferences&&(z(f.edit,f.diff,y,DIFF_INSERT,f.classes),z(f.orig,f.diff,S,DIFF_DELETE,f.classes)),f.mv.options.connect=="align"&&re(f),Z(f),f.needsScrollSync!=null&&m(f,f.needsScrollSync),c=!1}function F(ue){c||(f.dealigned=!0,H(ue))}function H(ue){c||A||(clearTimeout(k),ue===!0&&(A=!0),k=setTimeout(D,ue===!0?20:250))}function R(ue,ce){f.diffOutOfDate||(f.diffOutOfDate=!0,y.from=y.to=S.from=S.to=0),F(ce.text.length-1!=ce.to.line-ce.from.line)}function ae(){f.diffOutOfDate=!0,f.dealigned=!0,D("full")}return f.edit.on("change",R),f.orig.on("change",R),f.edit.on("swapDoc",ae),f.orig.on("swapDoc",ae),f.mv.options.connect=="align"&&(T.on(f.edit.state.trackAlignable,"realign",F),T.on(f.orig.state.trackAlignable,"realign",F)),f.edit.on("viewportChange",function(){H(!1)}),f.orig.on("viewportChange",function(){H(!1)}),D(),D}function v(f,y){f.edit.on("scroll",function(){m(f,!0)&&Z(f)}),f.orig.on("scroll",function(){m(f,!1)&&Z(f),y&&m(y,!0)&&Z(y)})}function m(f,y){if(f.diffOutOfDate)return f.lockScroll&&f.needsScrollSync==null&&(f.needsScrollSync=y),!1;if(f.needsScrollSync=null,!f.lockScroll)return!0;var S,k,A=+new Date;if(y?(S=f.edit,k=f.orig):(S=f.orig,k=f.edit),S.state.scrollSetBy==f&&(S.state.scrollSetAt||0)+250>A)return!1;var D=S.getScrollInfo();if(f.mv.options.connect=="align")Ce=D.top;else{var F=.5*D.clientHeight,H=D.top+F,R=S.lineAtHeight(H,"local"),ae=xt(f.chunks,R,y),ue=w(S,y?ae.edit:ae.orig),ce=w(k,y?ae.orig:ae.edit),me=(H-ue.top)/(ue.bot-ue.top),Ce=ce.top-F+me*(ce.bot-ce.top),be,Ne;if(Ce>D.top&&(Ne=D.top/F)<1)Ce=Ce*Ne+D.top*(1-Ne);else if((be=D.height-D.clientHeight-D.top)be&&(Ne=be/F)<1&&(Ce=Ce*Ne+(ut.height-ut.clientHeight-be)*(1-Ne))}}return k.scrollTo(D.left,Ce),k.state.scrollSetAt=A,k.state.scrollSetBy=f,!0}function w(f,y){var S=y.after;return S==null&&(S=f.lastLine()+1),{top:f.heightAtLine(y.before||0,"local"),bot:f.heightAtLine(S,"local")}}function x(f,y,S){f.lockScroll=y,y&&S!=!1&&m(f,DIFF_INSERT)&&Z(f),(y?T.addClass:T.rmClass)(f.lockButton,"CodeMirror-merge-scrolllock-enabled")}function _(f,y,S){for(var k=S.classLocation,A=0;A20||S.from-D.to>20?(I(f,S.marked,A),q(f,y,k,S.marked,D.from,D.to,A),S.from=D.from,S.to=D.to):(D.fromS.to&&(q(f,y,k,S.marked,S.to,D.to,A),S.to=D.to))})}function Y(f,y,S,k,A,D){for(var F=S.classLocation,H=f.getLineHandle(y),R=0;RKr&&(Ce&&(ce(me,Kr),Ce=!1),me=te)}else if(Ce=!0,ut==S){var mr=Ze(H,ge,!0),je=Ur(R,H),Te=ht(ae,mr);Jt(je,Te)||k.push(f.markText(je,Te,{className:ue})),H=mr}}Ce&&ce(me,H.line+1)}function Z(f){if(f.showDifferences){if(f.svg){At(f.svg);var y=f.gap.offsetWidth;pr(f.svg,"width",y,"height",f.gap.offsetHeight)}f.copyButtons&&At(f.copyButtons);for(var S=f.edit.getViewport(),k=f.orig.getViewport(),A=f.mv.wrap.getBoundingClientRect().top,D=A-f.edit.getScrollerElement().getBoundingClientRect().top+f.edit.getScrollInfo().top,F=A-f.orig.getScrollerElement().getBoundingClientRect().top+f.orig.getScrollInfo().top,H=0;H=S.from&&R.origFrom<=k.to&&R.origTo>=k.from&&Ie(f,R,F,D,y)}}}function le(f,y){for(var S=0,k=0,A=0;Af&&D.editFrom<=f)return null;if(D.editFrom>f)break;S=D.editTo,k=D.origTo}return k+(f-S)}function ie(f,y,S){for(var k=f.state.trackAlignable,A=f.firstLine(),D=0,F=[],H=0;;H++){for(var R=y[H],ae=R?S?R.origFrom:R.editFrom:1e9;Dce){D++,A--;continue e}if(me.editTo>ue){if(me.editFrom<=ue)continue e;break}H+=me.origTo-me.origFrom-(me.editTo-me.editFrom),F++}if(ue==ce-H)R[k]=ce,D++;else if(ue1&&k.push(ye(f[F],S[F],R))}}function ye(f,y,S){var k=!0;y>f.lastLine()&&(y--,k=!1);var A=document.createElement("div");return A.className="CodeMirror-merge-spacer",A.style.height=S+"px",A.style.minWidth="1px",f.addLineWidget(y,A,{height:S,above:k,mergeSpacer:!0,handleMouseEvents:!0})}function Ie(f,y,S,k,A){var D=f.type=="left",F=f.orig.heightAtLine(y.origFrom,"local",!0)-S;if(f.svg){var H=F,R=f.edit.heightAtLine(y.editFrom,"local",!0)-k;if(D){var ae=H;H=R,R=ae}var ue=f.orig.heightAtLine(y.origTo,"local",!0)-S,ce=f.edit.heightAtLine(y.editTo,"local",!0)-k;if(D){var ae=ue;ue=ce,ce=ae}var me=" C "+A/2+" "+R+" "+A/2+" "+H+" "+(A+2)+" "+H,Ce=" C "+A/2+" "+ue+" "+A/2+" "+ce+" -1 "+ce;pr(f.svg.appendChild(document.createElementNS(M,"path")),"d","M -1 "+R+me+" L "+(A+2)+" "+ue+Ce+" z","class",f.classes.connect)}if(f.copyButtons){var be=f.copyButtons.appendChild(Pe("div",f.type=="left"?"⇝":"⇜","CodeMirror-merge-copy")),Ne=f.mv.options.allowEditingOriginals;if(be.title=f.edit.phrase(Ne?"Push to left":"Revert chunk"),be.chunk=y,be.style.top=(y.origTo>y.origFrom?F:f.edit.heightAtLine(y.editFrom,"local")-k)+"px",be.setAttribute("role","button"),be.setAttribute("tabindex","0"),be.setAttribute("aria-label",be.title),Ne){var ut=f.edit.heightAtLine(y.editFrom,"local")-k,ge=f.copyButtons.appendChild(Pe("div",f.type=="right"?"⇝":"⇜","CodeMirror-merge-copy-reverse"));ge.title="Push to right",ge.chunk={editFrom:y.origFrom,editTo:y.origTo,origFrom:y.editFrom,origTo:y.editTo},ge.style.top=ut+"px",f.type=="right"?ge.style.left="2px":ge.style.right="2px",ge.setAttribute("role","button"),ge.setAttribute("tabindex","0"),ge.setAttribute("aria-label",ge.title)}}}function Ke(f,y,S,k){if(!f.diffOutOfDate){var A=k.origTo>S.lastLine()?O(k.origFrom-1):O(k.origFrom,0),D=O(k.origTo,0),F=k.editTo>y.lastLine()?O(k.editFrom-1):O(k.editFrom,0),H=O(k.editTo,0),R=f.mv.options.revertChunk;R?R(f.mv,S,A,D,y,F,H):y.replaceRange(S.getRange(A,D),F,H)}}var Me=T.MergeView=function(f,y){if(!(this instanceof Me))return new Me(f,y);this.options=y;var S=y.origLeft,k=y.origRight==null?y.orig:y.origRight,A=S!=null,D=k!=null,F=1+(A?1:0)+(D?1:0),H=[],R=this.left=null,ae=this.right=null,ue=this;if(A){R=this.left=new K(this,"left");var ce=Pe("div",null,"CodeMirror-merge-pane CodeMirror-merge-left");H.push(ce),H.push(qe(R))}var me=Pe("div",null,"CodeMirror-merge-pane CodeMirror-merge-editor");if(H.push(me),D){ae=this.right=new K(this,"right"),H.push(qe(ae));var Ce=Pe("div",null,"CodeMirror-merge-pane CodeMirror-merge-right");H.push(Ce)}(D?Ce:me).className+=" CodeMirror-merge-pane-rightmost",H.push(Pe("div",null,null,"height: 0; clear: both;"));var be=this.wrap=f.appendChild(Pe("div",H,"CodeMirror-merge CodeMirror-merge-"+F+"pane"));this.edit=T(me,dt(y)),R&&R.init(ce,S,y),ae&&ae.init(Ce,k,y),y.collapseIdentical&&this.editor().operation(function(){It(ue,y.collapseIdentical)}),y.connect=="align"&&(this.aligners=[],re(this.left||this.right,!0)),R&&R.registerEvents(ae),ae&&ae.registerEvents(R);var Ne=function(){R&&Z(R),ae&&Z(ae)};T.on(window,"resize",Ne);var ut=setInterval(function(){for(var ge=be.parentNode;ge&&ge!=document.body;ge=ge.parentNode);ge||(clearInterval(ut),T.off(window,"resize",Ne))},5e3)};function qe(f){var y=f.lockButton=Pe("div",null,"CodeMirror-merge-scrolllock");y.setAttribute("role","button"),y.setAttribute("tabindex","0");var S=Pe("div",[y],"CodeMirror-merge-scrolllock-wrap");T.on(y,"click",function(){x(f,!f.lockScroll)}),T.on(y,"keyup",function(F){(F.key==="Enter"||F.code==="Space")&&x(f,!f.lockScroll)});var k=[S];if(f.mv.options.revertButtons!==!1){f.copyButtons=Pe("div",null,"CodeMirror-merge-copybuttons-"+f.type);var A=function(F){var H=F.target||F.srcElement;if(H.chunk){if(H.className=="CodeMirror-merge-copy-reverse"){Ke(f,f.orig,f.edit,H.chunk);return}Ke(f,f.edit,f.orig,H.chunk)}};T.on(f.copyButtons,"click",A),T.on(f.copyButtons,"keyup",function(F){(F.key==="Enter"||F.code==="Space")&&A(F)}),k.unshift(f.copyButtons)}if(f.mv.options.connect!="align"){var D=document.createElementNS&&document.createElementNS(M,"svg");D&&!D.createSVGRect&&(D=null),f.svg=D,D&&k.push(D)}return f.gap=Pe("div",k,"CodeMirror-merge-gap")}Me.prototype={constructor:Me,editor:function(){return this.edit},rightOriginal:function(){return this.right&&this.right.orig},leftOriginal:function(){return this.left&&this.left.orig},setShowDifferences:function(f){this.right&&this.right.setShowDifferences(f),this.left&&this.left.setShowDifferences(f)},rightChunks:function(){if(this.right)return h(this.right),this.right.chunks},leftChunks:function(){if(this.left)return h(this.left),this.left.chunks}};function De(f){return typeof f=="string"?f:f.getValue()}var Q;function kt(f,y,S){Q||(Q=new diff_match_patch);for(var k=Q.diff_main(f,y),A=0;Aue&&(F&&y.push({origFrom:k,origTo:ce,editFrom:S,editTo:ue}),S=Ce,k=be)}else Ze(R==DIFF_INSERT?A:D,H[1])}return(S<=A.line||k<=D.line)&&y.push({origFrom:k,origTo:D.line+1,editFrom:S,editTo:A.line+1}),y}function ct(f,y){if(y==f.length-1)return!0;var S=f[y+1][1];return S.length==1&&y1||y==f.length-3)&&S.charCodeAt(0)==10)}function tt(f,y){if(y==0)return!0;var S=f[y-1][1];return S.charCodeAt(S.length-1)!=10?!1:y==1?!0:(S=f[y-2][1],S.charCodeAt(S.length-1)==10)}function xt(f,y,S){for(var k,A,D,F,H=0;Hy?(A=R.editFrom,F=R.origFrom):ue>y&&(A=R.editTo,F=R.origTo)),ue<=y?(k=R.editTo,D=R.origTo):ae<=y&&(k=R.editFrom,D=R.origFrom)}return{edit:{before:k,after:A},orig:{before:D,after:F}}}function zr(f,y,S){f.addLineClass(y,"wrap","CodeMirror-merge-collapsed-line");var k=document.createElement("span");k.className="CodeMirror-merge-collapsed-widget",k.title=f.phrase("Identical text collapsed. Click to expand.");var A=f.markText(O(y,0),O(S-1),{inclusiveLeft:!0,inclusiveRight:!0,replacedWith:k,clearOnEnter:!0});function D(){A.clear(),f.removeLineClass(y,"wrap","CodeMirror-merge-collapsed-line")}return A.explicitlyCleared&&D(),T.on(k,"click",D),A.on("clear",D),T.on(k,"click",D),{mark:A,clear:D}}function Zt(f,y){var S=[];function k(){for(var H=0;H=0&&Hy){var ue=[{line:R,cm:k}];f.left&&ue.push({line:le(R,f.left.chunks),cm:f.left.orig}),f.right&&ue.push({line:le(R,f.right.chunks),cm:f.right.orig});var ce=Zt(ae,ue);f.options.onCollapse&&f.options.onCollapse(f,R,ae,ce)}}}function Pe(f,y,S,k){var A=document.createElement(f);if(S&&(A.className=S),k&&(A.style.cssText=k),typeof y=="string")A.appendChild(document.createTextNode(y));else if(y)for(var D=0;D0;--y)f.removeChild(f.firstChild)}function pr(f){for(var y=1;y0)break}this.signal(),this.alignable.splice(S,0,f,y)},find:function(f){for(var y=0;y-1){var ae=this.alignable[D+1];ae==Se?this.alignable.splice(D,2):this.alignable[D+1]=ae&~Se}F>-1&&S&&this.set(f+S,Se)}};function ht(f,y){return(f.line-y.line||f.ch-y.ch)<0?f:y}function Ur(f,y){return(f.line-y.line||f.ch-y.ch)>0?f:y}function Jt(f,y){return f.line==y.line&&f.ch==y.ch}function Gr(f,y,S){for(var k=f.length-1;k>=0;k--){var A=f[k],D=(S?A.origTo:A.editTo)-1;if(Dy)return D}}function yr(f,y){var S=null,k=f.state.diffViews,A=f.getCursor().line;if(k)for(var D=0;DS:R"u"&&(d=!0);var v=d,m=this.diff_commonPrefix(h,c),w=h.substring(0,m);h=h.substring(m),c=c.substring(m),m=this.diff_commonSuffix(h,c);var x=h.substring(h.length-m);h=h.substring(0,h.length-m),c=c.substring(0,c.length-m);var _=this.diff_compute(h,c,v);return w&&_.unshift([M,w]),x&&_.push([M,x]),this.diff_cleanupMerge(_),_},b.prototype.diff_compute=function(h,c,d){var v;if(!h)return[[O,c]];if(!c)return[[T,h]];var m=h.length>c.length?h:c,w=h.length>c.length?c:h,x=m.indexOf(w);if(x!=-1)return v=[[O,m.substring(0,x)],[M,w],[O,m.substring(x+w.length)]],h.length>c.length&&(v[0][0]=v[2][0]=T),v;m=w=null;var _=this.diff_halfMatch(h,c);if(_){var I=_[0],z=_[1],Y=_[2],q=_[3],Z=_[4],le=this.diff_main(I,Y,d),ie=this.diff_main(z,q,d);return le.concat([[M,Z]],ie)}d&&(h.length<100||c.length<100)&&(d=!1);var ne;if(d){var he=this.diff_linesToChars(h,c);h=he[0],c=he[1],ne=he[2]}if(v=this.diff_map(h,c),v||(v=[[T,h],[O,c]]),d){this.diff_charsToLines(v,ne),this.diff_cleanupSemantic(v),v.push([M,""]);for(var re=0,J=0,ye=0,Ie="",Ke="";re=1&&ye>=1){var he=this.diff_main(Ie,Ke,!1);v.splice(re-J-ye,J+ye),re=re-J-ye;for(var Me=he.length-1;Me>=0;Me--)v.splice(re,0,he[Me]);re=re+he.length}ye=0,J=0,Ie="",Ke="";break}re++}v.pop()}return v},b.prototype.diff_linesToChars=function(h,c){var d=[],v={};d[0]="";function m(_){for(var I="",z=0,Y=-1,q=d.length;Y<_.length-1;){Y=_.indexOf(` -`,z),Y==-1&&(Y=_.length-1);var Z=_.substring(z,Y+1);z=Y+1,(v.hasOwnProperty?v.hasOwnProperty(Z):v[Z]!==void 0)?I+=String.fromCharCode(v[Z]):(I+=String.fromCharCode(q),v[Z]=q,d[q++]=Z)}return I}var w=m(h),x=m(c);return[w,x,d]},b.prototype.diff_charsToLines=function(h,c){for(var d=0;d0&&new Date().getTime()>d)return null;_[re]={};for(var J=-re;J<=re;J+=2){for(J==-re||J!=re&&z[J-1]=0;_--)for(;;)if(h[_][m-1+","+w]!==void 0){m--,x===T?v[0][1]=c.charAt(m)+v[0][1]:v.unshift([T,c.charAt(m)]),x=T;break}else if(h[_][m+","+(w-1)]!==void 0){w--,x===O?v[0][1]=d.charAt(w)+v[0][1]:v.unshift([O,d.charAt(w)]),x=O;break}else{if(m--,w--,c.charAt(m)!=d.charAt(w))throw new Error("No diagonal. Can't happen. (diff_path1)");x===M?v[0][1]=c.charAt(m)+v[0][1]:v.unshift([M,c.charAt(m)]),x=M}return v},b.prototype.diff_path2=function(h,c,d){for(var v=[],m=0,w=c.length,x=d.length,_=null,I=h.length-2;I>=0;I--)for(;;)if(h[I][w-1+","+x]!==void 0){w--,_===T?v[m-1][1]+=c.charAt(c.length-w-1):v[m++]=[T,c.charAt(c.length-w-1)],_=T;break}else if(h[I][w+","+(x-1)]!==void 0){x--,_===O?v[m-1][1]+=d.charAt(d.length-x-1):v[m++]=[O,d.charAt(d.length-x-1)],_=O;break}else{if(w--,x--,c.charAt(c.length-w-1)!=d.charAt(d.length-x-1))throw new Error("No diagonal. Can't happen. (diff_path2)");_===M?v[m-1][1]+=c.charAt(c.length-w-1):v[m++]=[M,c.charAt(c.length-w-1)],_=M}return v},b.prototype.diff_commonPrefix=function(h,c){if(!h||!c||h.charAt(0)!=c.charAt(0))return 0;for(var d=0,v=Math.min(h.length,c.length),m=v,w=0;dc.length?h:c,v=h.length>c.length?c:h;if(d.length<10||v.length<1)return null;var m=this;function w(ie,ne,he){for(var re=ie.substring(he,he+Math.floor(ie.length/4)),J=-1,ye="",Ie,Ke,Me,qe;(J=ne.indexOf(re,J+1))!=-1;){var De=m.diff_commonPrefix(ie.substring(he),ne.substring(J)),Q=m.diff_commonSuffix(ie.substring(0,he),ne.substring(0,J));ye.length=ie.length/2?[Ie,Ke,Me,qe,ye]:null}var x=w(d,v,Math.ceil(d.length/4)),_=w(d,v,Math.ceil(d.length/2)),I;if(!x&&!_)return null;_?x?I=x[4].length>_[4].length?x:_:I=_:I=x;var z,Y,q,Z;h.length>c.length?(z=I[0],Y=I[1],q=I[2],Z=I[3]):(q=I[0],Z=I[1],z=I[2],Y=I[3]);var le=I[4];return[z,Y,q,Z,le]},b.prototype.diff_cleanupSemantic=function(h){for(var c=!1,d=[],v=0,m=null,w=0,x=0,_=0;w0?d[v-1]:-1,x=0,_=0,m=null,c=!0)),w++;c&&this.diff_cleanupMerge(h),this.diff_cleanupSemanticLossless(h)},b.prototype.diff_cleanupSemanticLossless=function(h){var c=/[^a-zA-Z0-9]/,d=/\s/,v=/[\r\n]/,m=/\n\r?\n$/,w=/^\r?\n\r?\n/;function x(J,ye){if(!J||!ye)return 5;var Ie=0;return(J.charAt(J.length-1).match(c)||ye.charAt(0).match(c))&&(Ie++,(J.charAt(J.length-1).match(d)||ye.charAt(0).match(d))&&(Ie++,(J.charAt(J.length-1).match(v)||ye.charAt(0).match(v))&&(Ie++,(J.match(m)||ye.match(w))&&Ie++))),Ie}for(var _=1;_=he&&(he=re,le=I,ie=z,ne=Y)}h[_-1][1]!=le&&(le?h[_-1][1]=le:(h.splice(_-1,1),_--),h[_][1]=ie,ne?h[_+1][1]=ne:(h.splice(_+1,1),_--))}_++}},b.prototype.diff_cleanupEfficiency=function(h){for(var c=!1,d=[],v=0,m="",w=0,x=!1,_=!1,I=!1,z=!1;w0?d[v-1]:-1,I=z=!1),c=!0)),w++;c&&this.diff_cleanupMerge(h)},b.prototype.diff_cleanupMerge=function(h){h.push([M,""]);for(var c=0,d=0,v=0,m="",w="",x;c0&&h[c-d-v-1][0]==M?h[c-d-v-1][1]+=w.substring(0,x):(h.splice(0,0,[M,w.substring(0,x)]),c++),w=w.substring(x),m=m.substring(x)),x=this.diff_commonSuffix(w,m),x!==0&&(h[c][1]=w.substring(w.length-x)+h[c][1],w=w.substring(0,w.length-x),m=m.substring(0,m.length-x))),d===0?h.splice(c-d-v,d+v,[O,w]):v===0?h.splice(c-d-v,d+v,[T,m]):h.splice(c-d-v,d+v,[T,m],[O,w]),c=c-d-v+(d?1:0)+(v?1:0)+1):c!==0&&h[c-1][0]==M?(h[c-1][1]+=h[c][1],h.splice(c,1)):c++,v=0,d=0,m="",w="";break}h[h.length-1][1]===""&&h.pop();var _=!1;for(c=1;cc));x++)m=d,w=v;return h.length!=x&&h[x][0]===T?w:w+(c-m)},b.prototype.diff_prettyHtml=function(h){for(var c=[],d=0,v=0;v/g,">").replace(/\n/g,"¶
");switch(m){case O:c[v]=''+x+"";break;case T:c[v]=''+x+"";break;case M:c[v]=''+x+"";break}m!==T&&(d+=w.length)}return c.join("")},b.prototype.diff_text1=function(h){for(var c=[],d=0;dthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var v=this.match_alphabet(c),m=this;function w(Ie,Ke){var Me=Ie/c.length,qe=Math.abs(d-Ke);return m.Match_Distance?Me+qe/m.Match_Distance:qe?1:Me}var x=this.Match_Threshold,_=h.indexOf(c,d);_!=-1&&(x=Math.min(w(0,_),x),_=h.lastIndexOf(c,d+c.length),_!=-1&&(x=Math.min(w(0,_),x)));var I=1<=ie;re--){var J=v[h.charAt(re-1)];if(le===0?he[re]=(he[re+1]<<1|1)&J:he[re]=(he[re+1]<<1|1)&J|((Z[re+1]|Z[re])<<1|1)|Z[re+1],he[re]&I){var ye=w(le,re-1);if(ye<=x)if(x=ye,_=re-1,_>d)ie=Math.max(1,2*d-_);else break}}if(w(le+1,d)>x)break;Z=he}return _},b.prototype.match_alphabet=function(h){for(var c={},d=0;d"u")v=h,m=this.diff_main(v,c,!0),m.length>2&&(this.diff_cleanupSemantic(m),this.diff_cleanupEfficiency(m));else if(h&&typeof h=="object"&&typeof c>"u"&&typeof d>"u")m=h,v=this.diff_text1(m);else if(typeof h=="string"&&c&&typeof c=="object"&&typeof d>"u")v=h,m=c;else if(typeof h=="string"&&typeof c=="string"&&d&&typeof d=="object")v=h,m=d;else throw new Error("Unknown call format to patch_make.");if(m.length===0)return[];for(var w=[],x=new K,_=0,I=0,z=0,Y=v,q=v,Z=0;Z=2*this.Patch_Margin&&_&&(this.patch_addContext(x,Y),w.push(x),x=new K,_=0,Y=q,I=z);break}le!==O&&(I+=ie.length),le!==T&&(z+=ie.length)}return _&&(this.patch_addContext(x,Y),w.push(x)),w},b.prototype.patch_deepCopy=function(h){for(var c=[],d=0;dthis.Match_MaxBits?(I=this.match_main(c,_.substring(0,this.Match_MaxBits),x),I!=-1&&(z=this.match_main(c,_.substring(_.length-this.Match_MaxBits),x+_.length-this.Match_MaxBits),(z==-1||I>=z)&&(I=-1))):I=this.match_main(c,_,x),I==-1)m[w]=!1,v-=h[w].length2-h[w].length1;else{m[w]=!0,v=I-x;var Y;if(z==-1?Y=c.substring(I,I+_.length):Y=c.substring(I,z+this.Match_MaxBits),_==Y)c=c.substring(0,I)+this.diff_text2(h[w].diffs)+c.substring(I+_.length);else{var q=this.diff_main(_,Y,!1);if(_.length>this.Match_MaxBits&&this.diff_levenshtein(q)/_.length>this.Patch_DeleteThreshold)m[w]=!1;else{this.diff_cleanupSemanticLossless(q);for(var Z=0,le,ie=0;iew[0][1].length){var x=c-w[0][1].length;w[0][1]=d.substring(w[0][1].length)+w[0][1],m.start1-=x,m.start2-=x,m.length1+=x,m.length2+=x}if(m=h[h.length-1],w=m.diffs,w.length==0||w[w.length-1][0]!=M)w.push([M,d]),m.length1+=c,m.length2+=c;else if(c>w[w.length-1][1].length){var x=c-w[w.length-1][1].length;w[w.length-1][1]+=d.substring(0,x),m.length1+=x,m.length2+=x}return d},b.prototype.patch_splitMax=function(h){for(var c=0;cthis.Match_MaxBits){var d=h[c];h.splice(c--,1);for(var v=this.Match_MaxBits,m=d.start1,w=d.start2,x="";d.diffs.length!==0;){var _=new K,I=!0;for(_.start1=m-x.length,_.start2=w-x.length,x!==""&&(_.length1=_.length2=x.length,_.diffs.push([M,x]));d.diffs.length!==0&&_.length12*v?(_.length1+=Y.length,m+=Y.length,I=!1,_.diffs.push([z,Y]),d.diffs.shift()):(Y=Y.substring(0,v-_.length1-this.Patch_Margin),_.length1+=Y.length,m+=Y.length,z===M?(_.length2+=Y.length,w+=Y.length):I=!1,_.diffs.push([z,Y]),Y==d.diffs[0][1]?d.diffs.shift():d.diffs[0][1]=d.diffs[0][1].substring(Y.length))}x=this.diff_text2(_.diffs),x=x.substring(x.length-this.Patch_Margin);var q=this.diff_text1(d.diffs).substring(0,this.Patch_Margin);q!==""&&(_.length1+=q.length,_.length2+=q.length,_.diffs.length!==0&&_.diffs[_.diffs.length-1][0]===M?_.diffs[_.diffs.length-1][1]+=q:_.diffs.push([M,q])),I||h.splice(++c,0,_)}}},b.prototype.patch_toText=function(h){for(var c=[],d=0;d0&&t.prevInput=="​"?Re(i,Qa)(i):W++<10?r.detectingSelectAll=setTimeout(B,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(B,200)}}if(d&&v>=9&&L(),Ie){$r(e);var E=function(){je(window,"mouseup",E),setTimeout(C,20)};te(window,"mouseup",E)}else setTimeout(C,50)},_e.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},_e.prototype.setUneditable=function(){},_e.prototype.needsContentAttribute=!1;function uf(e,t){if(t=t?dt(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var i=tt(Pe(e));t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function r(){e.value=o.getValue()}var n;if(e.form&&(te(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var l=e.form;n=l.submit;try{var a=l.submit=function(){r(),l.submit=n,l.submit(),l.submit=a}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(je(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=n))}},e.style.display="none";var o=Le(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return o}function ff(e){e.off=je,e.on=te,e.wheelEventPixels=vu,e.Doc=it,e.splitLines=mn,e.countColumn=Ze,e.findColumn=Gr,e.isWordChar=F,e.Pass=Ht,e.signal=Te,e.Line=Cr,e.changeEnd=Gt,e.scrollbarModel=xa,e.Pos=P,e.cmpPos=oe,e.modes=wn,e.mimeModes=br,e.resolveMode=Di,e.getMode=Cn,e.modeExtensions=wr,e.extendMode=hs,e.copyState=jt,e.startState=Ol,e.innerMode=Sn,e.commands=pi,e.keyMap=Et,e.keyName=co,e.isModifierKey=fo,e.lookupKey=Wr,e.normalizeKeyMap=Pu,e.StringStream=Ee,e.SharedTextMarker=ci,e.TextMarker=$t,e.LineWidget=hi,e.e_preventDefault=Oe,e.e_stopPropagation=Dl,e.e_stop=$r,e.addClass=xt,e.contains=ct,e.rmClass=Me,e.keyNames=Xt}ef(Le),lf(Le);var hf="iter insert remove copy getEditor constructor".split(" ");for(var un in it.prototype)it.prototype.hasOwnProperty(un)&&Se(hf,un)<0&&(Le.prototype[un]=function(e){return function(){return e.apply(this.doc,arguments)}}(it.prototype[un]));return Mt(it),Le.inputStyles={textarea:_e,contenteditable:ve},Le.defineMode=function(e){!Le.defaults.mode&&e!="null"&&(Le.defaults.mode=e),us.apply(this,arguments)},Le.defineMIME=fs,Le.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Le.defineMIME("text/plain","null"),Le.defineExtension=function(e,t){Le.prototype[e]=t},Le.defineDocExtension=function(e,t){it.prototype[e]=t},Le.fromTextArea=uf,ff(Le),Le.version="5.65.16",Le})}(wl)),wl.exports}var vf=Yo();const yf=pf(vf);var Fo={exports:{}},Io;function mf(){return Io||(Io=1,function(O,b){(function(T){T(Yo())})(function(T){var N=T.Pos,M="http://www.w3.org/2000/svg";function K(f,y){this.mv=f,this.type=y,this.classes=y=="left"?{chunk:"CodeMirror-merge-l-chunk",start:"CodeMirror-merge-l-chunk-start",end:"CodeMirror-merge-l-chunk-end",insert:"CodeMirror-merge-l-inserted",del:"CodeMirror-merge-l-deleted",connect:"CodeMirror-merge-l-connect"}:{chunk:"CodeMirror-merge-r-chunk",start:"CodeMirror-merge-r-chunk-start",end:"CodeMirror-merge-r-chunk-end",insert:"CodeMirror-merge-r-inserted",del:"CodeMirror-merge-r-deleted",connect:"CodeMirror-merge-r-connect"}}K.prototype={constructor:K,init:function(f,y,S){this.edit=this.mv.edit,(this.edit.state.diffViews||(this.edit.state.diffViews=[])).push(this),this.orig=T(f,dt({value:y,readOnly:!this.mv.options.allowEditingOriginals},dt(S))),this.mv.options.connect=="align"&&(this.edit.state.trackAlignable||(this.edit.state.trackAlignable=new Ht(this.edit)),this.orig.state.trackAlignable=new Ht(this.orig)),this.lockButton.title=this.edit.phrase("Toggle locked scrolling"),this.lockButton.setAttribute("aria-label",this.lockButton.title),this.orig.state.diffViews=[this];var k=S.chunkClassLocation||"background";Object.prototype.toString.call(k)!="[object Array]"&&(k=[k]),this.classes.classLocation=k,this.diff=kt(De(y),De(S.value),this.mv.options.ignoreWhitespace),this.chunks=bt(this.diff),this.diffOutOfDate=this.dealigned=!1,this.needsScrollSync=null,this.showDifferences=S.showDifferences!==!1},registerEvents:function(f){this.forceUpdate=d(this),x(this,!0,!1),v(this,f)},setShowDifferences:function(f){f=f!==!1,f!=this.showDifferences&&(this.showDifferences=f,this.forceUpdate("full"))}};function h(f){f.diffOutOfDate&&(f.diff=kt(f.orig.getValue(),f.edit.getValue(),f.mv.options.ignoreWhitespace),f.chunks=bt(f.diff),f.diffOutOfDate=!1,T.signal(f.edit,"updateDiff",f.diff))}var c=!1;function d(f){var y={from:0,to:0,marked:[]},S={from:0,to:0,marked:[]},k,A=!1;function D(ue){c=!0,A=!1,ue=="full"&&(f.svg&&At(f.svg),f.copyButtons&&At(f.copyButtons),I(f.edit,y.marked,f.classes),I(f.orig,S.marked,f.classes),y.from=y.to=S.from=S.to=0),h(f),f.showDifferences&&(z(f.edit,f.diff,y,DIFF_INSERT,f.classes),z(f.orig,f.diff,S,DIFF_DELETE,f.classes)),f.mv.options.connect=="align"&&re(f),Z(f),f.needsScrollSync!=null&&m(f,f.needsScrollSync),c=!1}function F(ue){c||(f.dealigned=!0,H(ue))}function H(ue){c||A||(clearTimeout(k),ue===!0&&(A=!0),k=setTimeout(D,ue===!0?20:250))}function R(ue,ce){f.diffOutOfDate||(f.diffOutOfDate=!0,y.from=y.to=S.from=S.to=0),F(ce.text.length-1!=ce.to.line-ce.from.line)}function ae(){f.diffOutOfDate=!0,f.dealigned=!0,D("full")}return f.edit.on("change",R),f.orig.on("change",R),f.edit.on("swapDoc",ae),f.orig.on("swapDoc",ae),f.mv.options.connect=="align"&&(T.on(f.edit.state.trackAlignable,"realign",F),T.on(f.orig.state.trackAlignable,"realign",F)),f.edit.on("viewportChange",function(){H(!1)}),f.orig.on("viewportChange",function(){H(!1)}),D(),D}function v(f,y){f.edit.on("scroll",function(){m(f,!0)&&Z(f)}),f.orig.on("scroll",function(){m(f,!1)&&Z(f),y&&m(y,!0)&&Z(y)})}function m(f,y){if(f.diffOutOfDate)return f.lockScroll&&f.needsScrollSync==null&&(f.needsScrollSync=y),!1;if(f.needsScrollSync=null,!f.lockScroll)return!0;var S,k,A=+new Date;if(y?(S=f.edit,k=f.orig):(S=f.orig,k=f.edit),S.state.scrollSetBy==f&&(S.state.scrollSetAt||0)+250>A)return!1;var D=S.getScrollInfo();if(f.mv.options.connect=="align")Ce=D.top;else{var F=.5*D.clientHeight,H=D.top+F,R=S.lineAtHeight(H,"local"),ae=xt(f.chunks,R,y),ue=w(S,y?ae.edit:ae.orig),ce=w(k,y?ae.orig:ae.edit),me=(H-ue.top)/(ue.bot-ue.top),Ce=ce.top-F+me*(ce.bot-ce.top),be,Ne;if(Ce>D.top&&(Ne=D.top/F)<1)Ce=Ce*Ne+D.top*(1-Ne);else if((be=D.height-D.clientHeight-D.top)be&&(Ne=be/F)<1&&(Ce=Ce*Ne+(ut.height-ut.clientHeight-be)*(1-Ne))}}return k.scrollTo(D.left,Ce),k.state.scrollSetAt=A,k.state.scrollSetBy=f,!0}function w(f,y){var S=y.after;return S==null&&(S=f.lastLine()+1),{top:f.heightAtLine(y.before||0,"local"),bot:f.heightAtLine(S,"local")}}function x(f,y,S){f.lockScroll=y,y&&S!=!1&&m(f,DIFF_INSERT)&&Z(f),(y?T.addClass:T.rmClass)(f.lockButton,"CodeMirror-merge-scrolllock-enabled")}function _(f,y,S){for(var k=S.classLocation,A=0;A20||S.from-D.to>20?(I(f,S.marked,A),q(f,y,k,S.marked,D.from,D.to,A),S.from=D.from,S.to=D.to):(D.fromS.to&&(q(f,y,k,S.marked,S.to,D.to,A),S.to=D.to))})}function Y(f,y,S,k,A,D){for(var F=S.classLocation,H=f.getLineHandle(y),R=0;RKr&&(Ce&&(ce(me,Kr),Ce=!1),me=te)}else if(Ce=!0,ut==S){var mr=Ze(H,ge,!0),je=Ur(R,H),Te=ht(ae,mr);Jt(je,Te)||k.push(f.markText(je,Te,{className:ue})),H=mr}}Ce&&ce(me,H.line+1)}function Z(f){if(f.showDifferences){if(f.svg){At(f.svg);var y=f.gap.offsetWidth;pr(f.svg,"width",y,"height",f.gap.offsetHeight)}f.copyButtons&&At(f.copyButtons);for(var S=f.edit.getViewport(),k=f.orig.getViewport(),A=f.mv.wrap.getBoundingClientRect().top,D=A-f.edit.getScrollerElement().getBoundingClientRect().top+f.edit.getScrollInfo().top,F=A-f.orig.getScrollerElement().getBoundingClientRect().top+f.orig.getScrollInfo().top,H=0;H=S.from&&R.origFrom<=k.to&&R.origTo>=k.from&&Ie(f,R,F,D,y)}}}function le(f,y){for(var S=0,k=0,A=0;Af&&D.editFrom<=f)return null;if(D.editFrom>f)break;S=D.editTo,k=D.origTo}return k+(f-S)}function ie(f,y,S){for(var k=f.state.trackAlignable,A=f.firstLine(),D=0,F=[],H=0;;H++){for(var R=y[H],ae=R?S?R.origFrom:R.editFrom:1e9;Dce){D++,A--;continue e}if(me.editTo>ue){if(me.editFrom<=ue)continue e;break}H+=me.origTo-me.origFrom-(me.editTo-me.editFrom),F++}if(ue==ce-H)R[k]=ce,D++;else if(ue1&&k.push(ye(f[F],S[F],R))}}function ye(f,y,S){var k=!0;y>f.lastLine()&&(y--,k=!1);var A=document.createElement("div");return A.className="CodeMirror-merge-spacer",A.style.height=S+"px",A.style.minWidth="1px",f.addLineWidget(y,A,{height:S,above:k,mergeSpacer:!0,handleMouseEvents:!0})}function Ie(f,y,S,k,A){var D=f.type=="left",F=f.orig.heightAtLine(y.origFrom,"local",!0)-S;if(f.svg){var H=F,R=f.edit.heightAtLine(y.editFrom,"local",!0)-k;if(D){var ae=H;H=R,R=ae}var ue=f.orig.heightAtLine(y.origTo,"local",!0)-S,ce=f.edit.heightAtLine(y.editTo,"local",!0)-k;if(D){var ae=ue;ue=ce,ce=ae}var me=" C "+A/2+" "+R+" "+A/2+" "+H+" "+(A+2)+" "+H,Ce=" C "+A/2+" "+ue+" "+A/2+" "+ce+" -1 "+ce;pr(f.svg.appendChild(document.createElementNS(M,"path")),"d","M -1 "+R+me+" L "+(A+2)+" "+ue+Ce+" z","class",f.classes.connect)}if(f.copyButtons){var be=f.copyButtons.appendChild(Pe("div",f.type=="left"?"⇝":"⇜","CodeMirror-merge-copy")),Ne=f.mv.options.allowEditingOriginals;if(be.title=f.edit.phrase(Ne?"Push to left":"Revert chunk"),be.chunk=y,be.style.top=(y.origTo>y.origFrom?F:f.edit.heightAtLine(y.editFrom,"local")-k)+"px",be.setAttribute("role","button"),be.setAttribute("tabindex","0"),be.setAttribute("aria-label",be.title),Ne){var ut=f.edit.heightAtLine(y.editFrom,"local")-k,ge=f.copyButtons.appendChild(Pe("div",f.type=="right"?"⇝":"⇜","CodeMirror-merge-copy-reverse"));ge.title="Push to right",ge.chunk={editFrom:y.origFrom,editTo:y.origTo,origFrom:y.editFrom,origTo:y.editTo},ge.style.top=ut+"px",f.type=="right"?ge.style.left="2px":ge.style.right="2px",ge.setAttribute("role","button"),ge.setAttribute("tabindex","0"),ge.setAttribute("aria-label",ge.title)}}}function Ke(f,y,S,k){if(!f.diffOutOfDate){var A=k.origTo>S.lastLine()?N(k.origFrom-1):N(k.origFrom,0),D=N(k.origTo,0),F=k.editTo>y.lastLine()?N(k.editFrom-1):N(k.editFrom,0),H=N(k.editTo,0),R=f.mv.options.revertChunk;R?R(f.mv,S,A,D,y,F,H):y.replaceRange(S.getRange(A,D),F,H)}}var Me=T.MergeView=function(f,y){if(!(this instanceof Me))return new Me(f,y);this.options=y;var S=y.origLeft,k=y.origRight==null?y.orig:y.origRight,A=S!=null,D=k!=null,F=1+(A?1:0)+(D?1:0),H=[],R=this.left=null,ae=this.right=null,ue=this;if(A){R=this.left=new K(this,"left");var ce=Pe("div",null,"CodeMirror-merge-pane CodeMirror-merge-left");H.push(ce),H.push(qe(R))}var me=Pe("div",null,"CodeMirror-merge-pane CodeMirror-merge-editor");if(H.push(me),D){ae=this.right=new K(this,"right"),H.push(qe(ae));var Ce=Pe("div",null,"CodeMirror-merge-pane CodeMirror-merge-right");H.push(Ce)}(D?Ce:me).className+=" CodeMirror-merge-pane-rightmost",H.push(Pe("div",null,null,"height: 0; clear: both;"));var be=this.wrap=f.appendChild(Pe("div",H,"CodeMirror-merge CodeMirror-merge-"+F+"pane"));this.edit=T(me,dt(y)),R&&R.init(ce,S,y),ae&&ae.init(Ce,k,y),y.collapseIdentical&&this.editor().operation(function(){It(ue,y.collapseIdentical)}),y.connect=="align"&&(this.aligners=[],re(this.left||this.right,!0)),R&&R.registerEvents(ae),ae&&ae.registerEvents(R);var Ne=function(){R&&Z(R),ae&&Z(ae)};T.on(window,"resize",Ne);var ut=setInterval(function(){for(var ge=be.parentNode;ge&&ge!=document.body;ge=ge.parentNode);ge||(clearInterval(ut),T.off(window,"resize",Ne))},5e3)};function qe(f){var y=f.lockButton=Pe("div",null,"CodeMirror-merge-scrolllock");y.setAttribute("role","button"),y.setAttribute("tabindex","0");var S=Pe("div",[y],"CodeMirror-merge-scrolllock-wrap");T.on(y,"click",function(){x(f,!f.lockScroll)}),T.on(y,"keyup",function(F){(F.key==="Enter"||F.code==="Space")&&x(f,!f.lockScroll)});var k=[S];if(f.mv.options.revertButtons!==!1){f.copyButtons=Pe("div",null,"CodeMirror-merge-copybuttons-"+f.type);var A=function(F){var H=F.target||F.srcElement;if(H.chunk){if(H.className=="CodeMirror-merge-copy-reverse"){Ke(f,f.orig,f.edit,H.chunk);return}Ke(f,f.edit,f.orig,H.chunk)}};T.on(f.copyButtons,"click",A),T.on(f.copyButtons,"keyup",function(F){(F.key==="Enter"||F.code==="Space")&&A(F)}),k.unshift(f.copyButtons)}if(f.mv.options.connect!="align"){var D=document.createElementNS&&document.createElementNS(M,"svg");D&&!D.createSVGRect&&(D=null),f.svg=D,D&&k.push(D)}return f.gap=Pe("div",k,"CodeMirror-merge-gap")}Me.prototype={constructor:Me,editor:function(){return this.edit},rightOriginal:function(){return this.right&&this.right.orig},leftOriginal:function(){return this.left&&this.left.orig},setShowDifferences:function(f){this.right&&this.right.setShowDifferences(f),this.left&&this.left.setShowDifferences(f)},rightChunks:function(){if(this.right)return h(this.right),this.right.chunks},leftChunks:function(){if(this.left)return h(this.left),this.left.chunks}};function De(f){return typeof f=="string"?f:f.getValue()}var Q;function kt(f,y,S){Q||(Q=new diff_match_patch);for(var k=Q.diff_main(f,y),A=0;Aue&&(F&&y.push({origFrom:k,origTo:ce,editFrom:S,editTo:ue}),S=Ce,k=be)}else Ze(R==DIFF_INSERT?A:D,H[1])}return(S<=A.line||k<=D.line)&&y.push({origFrom:k,origTo:D.line+1,editFrom:S,editTo:A.line+1}),y}function ct(f,y){if(y==f.length-1)return!0;var S=f[y+1][1];return S.length==1&&y1||y==f.length-3)&&S.charCodeAt(0)==10)}function tt(f,y){if(y==0)return!0;var S=f[y-1][1];return S.charCodeAt(S.length-1)!=10?!1:y==1?!0:(S=f[y-2][1],S.charCodeAt(S.length-1)==10)}function xt(f,y,S){for(var k,A,D,F,H=0;Hy?(A=R.editFrom,F=R.origFrom):ue>y&&(A=R.editTo,F=R.origTo)),ue<=y?(k=R.editTo,D=R.origTo):ae<=y&&(k=R.editFrom,D=R.origFrom)}return{edit:{before:k,after:A},orig:{before:D,after:F}}}function zr(f,y,S){f.addLineClass(y,"wrap","CodeMirror-merge-collapsed-line");var k=document.createElement("span");k.className="CodeMirror-merge-collapsed-widget",k.title=f.phrase("Identical text collapsed. Click to expand.");var A=f.markText(N(y,0),N(S-1),{inclusiveLeft:!0,inclusiveRight:!0,replacedWith:k,clearOnEnter:!0});function D(){A.clear(),f.removeLineClass(y,"wrap","CodeMirror-merge-collapsed-line")}return A.explicitlyCleared&&D(),T.on(k,"click",D),A.on("clear",D),T.on(k,"click",D),{mark:A,clear:D}}function Zt(f,y){var S=[];function k(){for(var H=0;H=0&&Hy){var ue=[{line:R,cm:k}];f.left&&ue.push({line:le(R,f.left.chunks),cm:f.left.orig}),f.right&&ue.push({line:le(R,f.right.chunks),cm:f.right.orig});var ce=Zt(ae,ue);f.options.onCollapse&&f.options.onCollapse(f,R,ae,ce)}}}function Pe(f,y,S,k){var A=document.createElement(f);if(S&&(A.className=S),k&&(A.style.cssText=k),typeof y=="string")A.appendChild(document.createTextNode(y));else if(y)for(var D=0;D0;--y)f.removeChild(f.firstChild)}function pr(f){for(var y=1;y0)break}this.signal(),this.alignable.splice(S,0,f,y)},find:function(f){for(var y=0;y-1){var ae=this.alignable[D+1];ae==Se?this.alignable.splice(D,2):this.alignable[D+1]=ae&~Se}F>-1&&S&&this.set(f+S,Se)}};function ht(f,y){return(f.line-y.line||f.ch-y.ch)<0?f:y}function Ur(f,y){return(f.line-y.line||f.ch-y.ch)>0?f:y}function Jt(f,y){return f.line==y.line&&f.ch==y.ch}function Gr(f,y,S){for(var k=f.length-1;k>=0;k--){var A=f[k],D=(S?A.origTo:A.editTo)-1;if(Dy)return D}}function yr(f,y){var S=null,k=f.state.diffViews,A=f.getCursor().line;if(k)for(var D=0;DS:R"u"&&(d=!0);var v=d,m=this.diff_commonPrefix(h,c),w=h.substring(0,m);h=h.substring(m),c=c.substring(m),m=this.diff_commonSuffix(h,c);var x=h.substring(h.length-m);h=h.substring(0,h.length-m),c=c.substring(0,c.length-m);var _=this.diff_compute(h,c,v);return w&&_.unshift([M,w]),x&&_.push([M,x]),this.diff_cleanupMerge(_),_},b.prototype.diff_compute=function(h,c,d){var v;if(!h)return[[N,c]];if(!c)return[[T,h]];var m=h.length>c.length?h:c,w=h.length>c.length?c:h,x=m.indexOf(w);if(x!=-1)return v=[[N,m.substring(0,x)],[M,w],[N,m.substring(x+w.length)]],h.length>c.length&&(v[0][0]=v[2][0]=T),v;m=w=null;var _=this.diff_halfMatch(h,c);if(_){var I=_[0],z=_[1],Y=_[2],q=_[3],Z=_[4],le=this.diff_main(I,Y,d),ie=this.diff_main(z,q,d);return le.concat([[M,Z]],ie)}d&&(h.length<100||c.length<100)&&(d=!1);var ne;if(d){var he=this.diff_linesToChars(h,c);h=he[0],c=he[1],ne=he[2]}if(v=this.diff_map(h,c),v||(v=[[T,h],[N,c]]),d){this.diff_charsToLines(v,ne),this.diff_cleanupSemantic(v),v.push([M,""]);for(var re=0,J=0,ye=0,Ie="",Ke="";re=1&&ye>=1){var he=this.diff_main(Ie,Ke,!1);v.splice(re-J-ye,J+ye),re=re-J-ye;for(var Me=he.length-1;Me>=0;Me--)v.splice(re,0,he[Me]);re=re+he.length}ye=0,J=0,Ie="",Ke="";break}re++}v.pop()}return v},b.prototype.diff_linesToChars=function(h,c){var d=[],v={};d[0]="";function m(_){for(var I="",z=0,Y=-1,q=d.length;Y<_.length-1;){Y=_.indexOf(` +`,z),Y==-1&&(Y=_.length-1);var Z=_.substring(z,Y+1);z=Y+1,(v.hasOwnProperty?v.hasOwnProperty(Z):v[Z]!==void 0)?I+=String.fromCharCode(v[Z]):(I+=String.fromCharCode(q),v[Z]=q,d[q++]=Z)}return I}var w=m(h),x=m(c);return[w,x,d]},b.prototype.diff_charsToLines=function(h,c){for(var d=0;d0&&new Date().getTime()>d)return null;_[re]={};for(var J=-re;J<=re;J+=2){for(J==-re||J!=re&&z[J-1]=0;_--)for(;;)if(h[_][m-1+","+w]!==void 0){m--,x===T?v[0][1]=c.charAt(m)+v[0][1]:v.unshift([T,c.charAt(m)]),x=T;break}else if(h[_][m+","+(w-1)]!==void 0){w--,x===N?v[0][1]=d.charAt(w)+v[0][1]:v.unshift([N,d.charAt(w)]),x=N;break}else{if(m--,w--,c.charAt(m)!=d.charAt(w))throw new Error("No diagonal. Can't happen. (diff_path1)");x===M?v[0][1]=c.charAt(m)+v[0][1]:v.unshift([M,c.charAt(m)]),x=M}return v},b.prototype.diff_path2=function(h,c,d){for(var v=[],m=0,w=c.length,x=d.length,_=null,I=h.length-2;I>=0;I--)for(;;)if(h[I][w-1+","+x]!==void 0){w--,_===T?v[m-1][1]+=c.charAt(c.length-w-1):v[m++]=[T,c.charAt(c.length-w-1)],_=T;break}else if(h[I][w+","+(x-1)]!==void 0){x--,_===N?v[m-1][1]+=d.charAt(d.length-x-1):v[m++]=[N,d.charAt(d.length-x-1)],_=N;break}else{if(w--,x--,c.charAt(c.length-w-1)!=d.charAt(d.length-x-1))throw new Error("No diagonal. Can't happen. (diff_path2)");_===M?v[m-1][1]+=c.charAt(c.length-w-1):v[m++]=[M,c.charAt(c.length-w-1)],_=M}return v},b.prototype.diff_commonPrefix=function(h,c){if(!h||!c||h.charAt(0)!=c.charAt(0))return 0;for(var d=0,v=Math.min(h.length,c.length),m=v,w=0;dc.length?h:c,v=h.length>c.length?c:h;if(d.length<10||v.length<1)return null;var m=this;function w(ie,ne,he){for(var re=ie.substring(he,he+Math.floor(ie.length/4)),J=-1,ye="",Ie,Ke,Me,qe;(J=ne.indexOf(re,J+1))!=-1;){var De=m.diff_commonPrefix(ie.substring(he),ne.substring(J)),Q=m.diff_commonSuffix(ie.substring(0,he),ne.substring(0,J));ye.length=ie.length/2?[Ie,Ke,Me,qe,ye]:null}var x=w(d,v,Math.ceil(d.length/4)),_=w(d,v,Math.ceil(d.length/2)),I;if(!x&&!_)return null;_?x?I=x[4].length>_[4].length?x:_:I=_:I=x;var z,Y,q,Z;h.length>c.length?(z=I[0],Y=I[1],q=I[2],Z=I[3]):(q=I[0],Z=I[1],z=I[2],Y=I[3]);var le=I[4];return[z,Y,q,Z,le]},b.prototype.diff_cleanupSemantic=function(h){for(var c=!1,d=[],v=0,m=null,w=0,x=0,_=0;w0?d[v-1]:-1,x=0,_=0,m=null,c=!0)),w++;c&&this.diff_cleanupMerge(h),this.diff_cleanupSemanticLossless(h)},b.prototype.diff_cleanupSemanticLossless=function(h){var c=/[^a-zA-Z0-9]/,d=/\s/,v=/[\r\n]/,m=/\n\r?\n$/,w=/^\r?\n\r?\n/;function x(J,ye){if(!J||!ye)return 5;var Ie=0;return(J.charAt(J.length-1).match(c)||ye.charAt(0).match(c))&&(Ie++,(J.charAt(J.length-1).match(d)||ye.charAt(0).match(d))&&(Ie++,(J.charAt(J.length-1).match(v)||ye.charAt(0).match(v))&&(Ie++,(J.match(m)||ye.match(w))&&Ie++))),Ie}for(var _=1;_=he&&(he=re,le=I,ie=z,ne=Y)}h[_-1][1]!=le&&(le?h[_-1][1]=le:(h.splice(_-1,1),_--),h[_][1]=ie,ne?h[_+1][1]=ne:(h.splice(_+1,1),_--))}_++}},b.prototype.diff_cleanupEfficiency=function(h){for(var c=!1,d=[],v=0,m="",w=0,x=!1,_=!1,I=!1,z=!1;w0?d[v-1]:-1,I=z=!1),c=!0)),w++;c&&this.diff_cleanupMerge(h)},b.prototype.diff_cleanupMerge=function(h){h.push([M,""]);for(var c=0,d=0,v=0,m="",w="",x;c0&&h[c-d-v-1][0]==M?h[c-d-v-1][1]+=w.substring(0,x):(h.splice(0,0,[M,w.substring(0,x)]),c++),w=w.substring(x),m=m.substring(x)),x=this.diff_commonSuffix(w,m),x!==0&&(h[c][1]=w.substring(w.length-x)+h[c][1],w=w.substring(0,w.length-x),m=m.substring(0,m.length-x))),d===0?h.splice(c-d-v,d+v,[N,w]):v===0?h.splice(c-d-v,d+v,[T,m]):h.splice(c-d-v,d+v,[T,m],[N,w]),c=c-d-v+(d?1:0)+(v?1:0)+1):c!==0&&h[c-1][0]==M?(h[c-1][1]+=h[c][1],h.splice(c,1)):c++,v=0,d=0,m="",w="";break}h[h.length-1][1]===""&&h.pop();var _=!1;for(c=1;cc));x++)m=d,w=v;return h.length!=x&&h[x][0]===T?w:w+(c-m)},b.prototype.diff_prettyHtml=function(h){for(var c=[],d=0,v=0;v/g,">").replace(/\n/g,"¶
");switch(m){case N:c[v]=''+x+"";break;case T:c[v]=''+x+"";break;case M:c[v]=''+x+"";break}m!==T&&(d+=w.length)}return c.join("")},b.prototype.diff_text1=function(h){for(var c=[],d=0;dthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var v=this.match_alphabet(c),m=this;function w(Ie,Ke){var Me=Ie/c.length,qe=Math.abs(d-Ke);return m.Match_Distance?Me+qe/m.Match_Distance:qe?1:Me}var x=this.Match_Threshold,_=h.indexOf(c,d);_!=-1&&(x=Math.min(w(0,_),x),_=h.lastIndexOf(c,d+c.length),_!=-1&&(x=Math.min(w(0,_),x)));var I=1<=ie;re--){var J=v[h.charAt(re-1)];if(le===0?he[re]=(he[re+1]<<1|1)&J:he[re]=(he[re+1]<<1|1)&J|((Z[re+1]|Z[re])<<1|1)|Z[re+1],he[re]&I){var ye=w(le,re-1);if(ye<=x)if(x=ye,_=re-1,_>d)ie=Math.max(1,2*d-_);else break}}if(w(le+1,d)>x)break;Z=he}return _},b.prototype.match_alphabet=function(h){for(var c={},d=0;d"u")v=h,m=this.diff_main(v,c,!0),m.length>2&&(this.diff_cleanupSemantic(m),this.diff_cleanupEfficiency(m));else if(h&&typeof h=="object"&&typeof c>"u"&&typeof d>"u")m=h,v=this.diff_text1(m);else if(typeof h=="string"&&c&&typeof c=="object"&&typeof d>"u")v=h,m=c;else if(typeof h=="string"&&typeof c=="string"&&d&&typeof d=="object")v=h,m=d;else throw new Error("Unknown call format to patch_make.");if(m.length===0)return[];for(var w=[],x=new K,_=0,I=0,z=0,Y=v,q=v,Z=0;Z=2*this.Patch_Margin&&_&&(this.patch_addContext(x,Y),w.push(x),x=new K,_=0,Y=q,I=z);break}le!==N&&(I+=ie.length),le!==T&&(z+=ie.length)}return _&&(this.patch_addContext(x,Y),w.push(x)),w},b.prototype.patch_deepCopy=function(h){for(var c=[],d=0;dthis.Match_MaxBits?(I=this.match_main(c,_.substring(0,this.Match_MaxBits),x),I!=-1&&(z=this.match_main(c,_.substring(_.length-this.Match_MaxBits),x+_.length-this.Match_MaxBits),(z==-1||I>=z)&&(I=-1))):I=this.match_main(c,_,x),I==-1)m[w]=!1,v-=h[w].length2-h[w].length1;else{m[w]=!0,v=I-x;var Y;if(z==-1?Y=c.substring(I,I+_.length):Y=c.substring(I,z+this.Match_MaxBits),_==Y)c=c.substring(0,I)+this.diff_text2(h[w].diffs)+c.substring(I+_.length);else{var q=this.diff_main(_,Y,!1);if(_.length>this.Match_MaxBits&&this.diff_levenshtein(q)/_.length>this.Patch_DeleteThreshold)m[w]=!1;else{this.diff_cleanupSemanticLossless(q);for(var Z=0,le,ie=0;iew[0][1].length){var x=c-w[0][1].length;w[0][1]=d.substring(w[0][1].length)+w[0][1],m.start1-=x,m.start2-=x,m.length1+=x,m.length2+=x}if(m=h[h.length-1],w=m.diffs,w.length==0||w[w.length-1][0]!=M)w.push([M,d]),m.length1+=c,m.length2+=c;else if(c>w[w.length-1][1].length){var x=c-w[w.length-1][1].length;w[w.length-1][1]+=d.substring(0,x),m.length1+=x,m.length2+=x}return d},b.prototype.patch_splitMax=function(h){for(var c=0;cthis.Match_MaxBits){var d=h[c];h.splice(c--,1);for(var v=this.Match_MaxBits,m=d.start1,w=d.start2,x="";d.diffs.length!==0;){var _=new K,I=!0;for(_.start1=m-x.length,_.start2=w-x.length,x!==""&&(_.length1=_.length2=x.length,_.diffs.push([M,x]));d.diffs.length!==0&&_.length12*v?(_.length1+=Y.length,m+=Y.length,I=!1,_.diffs.push([z,Y]),d.diffs.shift()):(Y=Y.substring(0,v-_.length1-this.Patch_Margin),_.length1+=Y.length,m+=Y.length,z===M?(_.length2+=Y.length,w+=Y.length):I=!1,_.diffs.push([z,Y]),Y==d.diffs[0][1]?d.diffs.shift():d.diffs[0][1]=d.diffs[0][1].substring(Y.length))}x=this.diff_text2(_.diffs),x=x.substring(x.length-this.Patch_Margin);var q=this.diff_text1(d.diffs).substring(0,this.Patch_Margin);q!==""&&(_.length1+=q.length,_.length2+=q.length,_.diffs.length!==0&&_.diffs[_.diffs.length-1][0]===M?_.diffs[_.diffs.length-1][1]+=q:_.diffs.push([M,q])),I||h.splice(++c,0,_)}}},b.prototype.patch_toText=function(h){for(var c=[],d=0;dN}):void 0,qo="$lit$",qt=`lit$${(Math.random()+"").slice(9)}$`,Zo="?"+qt,wf=`<${Zo}>`,gr=document,Ti=()=>gr.createComment(""),ki=N=>N===null||typeof N!="object"&&typeof N!="function",Qo=Array.isArray,Cf=N=>Qo(N)||typeof(N==null?void 0:N[Symbol.iterator])=="function",Sl=`[ + */const Si=globalThis,cn=Si.trustedTypes,Po=cn?cn.createPolicy("lit-html",{createHTML:O=>O}):void 0,qo="$lit$",qt=`lit$${(Math.random()+"").slice(9)}$`,Zo="?"+qt,wf=`<${Zo}>`,gr=document,Ti=()=>gr.createComment(""),ki=O=>O===null||typeof O!="object"&&typeof O!="function",Qo=Array.isArray,Cf=O=>Qo(O)||typeof(O==null?void 0:O[Symbol.iterator])=="function",Sl=`[ \f\r]`,wi=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Bo=/-->/g,Ro=/>/g,hr=RegExp(`>|${Sl}(?:([^\\s"'>=/]+)(${Sl}*=${Sl}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),zo=/'/g,Uo=/"/g,Jo=/^(?:script|style|textarea|title)$/i,Sf=N=>(b,...T)=>({_$litType$:N,strings:b,values:T}),cr=Sf(1),xi=Symbol.for("lit-noChange"),Ye=Symbol.for("lit-nothing"),Go=new WeakMap,dr=gr.createTreeWalker(gr,129);function jo(N,b){if(!Array.isArray(N)||!N.hasOwnProperty("raw"))throw Error("invalid template strings array");return Po!==void 0?Po.createHTML(b):b}const Lf=(N,b)=>{const T=N.length-1,O=[];let M,K=b===2?"":"",h=wi;for(let c=0;c"?(h=M??wi,w=-1):m[1]===void 0?w=-2:(w=h.lastIndex-m[2].length,v=m[1],h=m[3]===void 0?hr:m[3]==='"'?Uo:zo):h===Uo||h===zo?h=hr:h===Bo||h===Ro?h=wi:(h=hr,M=void 0);const _=h===hr&&N[c+1].startsWith("/>")?" ":"";K+=h===wi?d+wf:w>=0?(O.push(v),d.slice(0,w)+qo+d.slice(w)+qt+_):d+qt+(w===-2?c:_)}return[jo(N,K+(N[T]||"")+(b===2?"":"")),O]};class Ai{constructor({strings:b,_$litType$:T},O){let M;this.parts=[];let K=0,h=0;const c=b.length-1,d=this.parts,[v,m]=Lf(b,T);if(this.el=Ai.createElement(v,O),dr.currentNode=this.el.content,T===2){const w=this.el.content.firstChild;w.replaceWith(...w.childNodes)}for(;(M=dr.nextNode())!==null&&d.length0){M.textContent=cn?cn.emptyScript:"";for(let _=0;_2||O[0]!==""||O[1]!==""?(this._$AH=Array(O.length-1).fill(new String),this.strings=O):this._$AH=Ye}_$AI(b,T=this,O,M){const K=this.strings;let h=!1;if(K===void 0)b=Rr(this,b,T,0),h=!ki(b)||b!==this._$AH&&b!==xi,h&&(this._$AH=b);else{const c=b;let d,v;for(b=K[0],d=0;d{const O=(T==null?void 0:T.renderBefore)??b;let M=O._$litPart$;if(M===void 0){const K=(T==null?void 0:T.renderBefore)??null;O._$litPart$=M=new _i(b.insertBefore(Ti(),K),K,void 0,T??{})}return M._$AI(N),M};function _f(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function xl(N,b=!1){const T=_f(),O=`_${T}`;return Object.defineProperty(window,O,{value:M=>(b&&Reflect.deleteProperty(window,O),N==null?void 0:N(M)),writable:!1,configurable:!0}),T}async function Vo(N,b={}){return new Promise((T,O)=>{const M=xl(h=>{T(h),Reflect.deleteProperty(window,`_${K}`)},!0),K=xl(h=>{O(h),Reflect.deleteProperty(window,`_${M}`)},!0);window.__TAURI_IPC__({cmd:N,callback:M,error:K,...b})})}async function Al(N){return Vo("tauri",N)}async function Df(N=0){return Al({__tauriModule:"Process",message:{cmd:"exit",exitCode:N}})}function Tl(N){return N.type=="Text"?N.value:null}const Ml="__TAURI__"in globalThis;async function es(N,b,T){if(Ml){let O={};return T!=null&&(O={result:T}),await Vo(N,O)}else return await ts(N,b,T)}async function ts(N,b,T){let O=null,M={};T!=null&&(O=JSON.stringify(T),M["Content-Type"]="application/json");const K=await fetch(`/api/${N}`,{method:b,body:O,headers:M});if(K.ok)return await K.json();{let h="";throw K.status<500&&(h=`Likely bug in the webapp: got response "${K.status} ${K.statusText}" for "${N}" request. Additional details, if any, follow. `),h+await K.text()}}async function _l(N){Ml?await Df(N):await ts("exit","POST",N)}async function Nf(){await _l(0)}async function Ko(){await _l(1)}async function Of(){await _l(2)}async function $o(N){return await es("save","PUT",N)}async function Ef(){const N=await es("get_merge_data","GET");for(const b in N)N[b]={left:N[b][0],right:N[b][1],edit:N[b][2]};return N}async function Wf(N,b){return Al({__tauriModule:"Event",message:{cmd:"unlisten",event:N,eventId:b}})}async function Ff(N,b,T){return Al({__tauriModule:"Event",message:{cmd:"listen",event:N,windowLabel:b,handler:xl(T)}}).then(O=>async()=>Wf(N,O))}var Xo;(function(N){N.WINDOW_RESIZED="tauri://resize",N.WINDOW_MOVED="tauri://move",N.WINDOW_CLOSE_REQUESTED="tauri://close-requested",N.WINDOW_CREATED="tauri://window-created",N.WINDOW_DESTROYED="tauri://destroyed",N.WINDOW_FOCUS="tauri://focus",N.WINDOW_BLUR="tauri://blur",N.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",N.WINDOW_THEME_CHANGED="tauri://theme-changed",N.WINDOW_FILE_DROP="tauri://file-drop",N.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",N.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",N.MENU="tauri://menu",N.CHECK_UPDATE="tauri://update",N.UPDATE_AVAILABLE="tauri://update-available",N.INSTALL_UPDATE="tauri://update-install",N.STATUS_UPDATE="tauri://update-status",N.DOWNLOAD_PROGRESS="tauri://update-download-progress"})(Xo||(Xo={}));async function fn(N,b){return Ff(N,null,b)}class If{constructor(b){Eo(this,"merge_views");this.merge_views=b}values(){const b={};for(const T in this.merge_views)b[T]=this.merge_views[T].editor().getValue();return b}}function Hf(N,b){let T=[],O=c=>`${c}_${N}`,M=c=>{let d=Array.from([{file:c.left,side:"left"},{file:c.right,side:"right"},{file:c.edit,side:"middle"}]).find(v=>v.file.type=="Unsupported");if(d==null)return null;if(d.file.type!="Unsupported")throw new Error("this statement is unreachable; this check exists to make TS happy");return cr`error: ${d.file.value} (occurred on the - ${d.side} side)`};for(const c in b){const d=M(b[c]);d!=null?T.push(cr`
+\f\r"'\`<>=]|("|')|))|$)`,"g"),zo=/'/g,Uo=/"/g,Jo=/^(?:script|style|textarea|title)$/i,Sf=O=>(b,...T)=>({_$litType$:O,strings:b,values:T}),cr=Sf(1),xi=Symbol.for("lit-noChange"),Ye=Symbol.for("lit-nothing"),Go=new WeakMap,dr=gr.createTreeWalker(gr,129);function jo(O,b){if(!Array.isArray(O)||!O.hasOwnProperty("raw"))throw Error("invalid template strings array");return Po!==void 0?Po.createHTML(b):b}const Lf=(O,b)=>{const T=O.length-1,N=[];let M,K=b===2?"":"",h=wi;for(let c=0;c"?(h=M??wi,w=-1):m[1]===void 0?w=-2:(w=h.lastIndex-m[2].length,v=m[1],h=m[3]===void 0?hr:m[3]==='"'?Uo:zo):h===Uo||h===zo?h=hr:h===Bo||h===Ro?h=wi:(h=hr,M=void 0);const _=h===hr&&O[c+1].startsWith("/>")?" ":"";K+=h===wi?d+wf:w>=0?(N.push(v),d.slice(0,w)+qo+d.slice(w)+qt+_):d+qt+(w===-2?c:_)}return[jo(O,K+(O[T]||"")+(b===2?"":"")),N]};class Ai{constructor({strings:b,_$litType$:T},N){let M;this.parts=[];let K=0,h=0;const c=b.length-1,d=this.parts,[v,m]=Lf(b,T);if(this.el=Ai.createElement(v,N),dr.currentNode=this.el.content,T===2){const w=this.el.content.firstChild;w.replaceWith(...w.childNodes)}for(;(M=dr.nextNode())!==null&&d.length0){M.textContent=cn?cn.emptyScript:"";for(let _=0;_2||N[0]!==""||N[1]!==""?(this._$AH=Array(N.length-1).fill(new String),this.strings=N):this._$AH=Ye}_$AI(b,T=this,N,M){const K=this.strings;let h=!1;if(K===void 0)b=Rr(this,b,T,0),h=!ki(b)||b!==this._$AH&&b!==xi,h&&(this._$AH=b);else{const c=b;let d,v;for(b=K[0],d=0;d{const N=(T==null?void 0:T.renderBefore)??b;let M=N._$litPart$;if(M===void 0){const K=(T==null?void 0:T.renderBefore)??null;N._$litPart$=M=new _i(b.insertBefore(Ti(),K),K,void 0,T??{})}return M._$AI(O),M};function _f(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function xl(O,b=!1){const T=_f(),N=`_${T}`;return Object.defineProperty(window,N,{value:M=>(b&&Reflect.deleteProperty(window,N),O==null?void 0:O(M)),writable:!1,configurable:!0}),T}async function Vo(O,b={}){return new Promise((T,N)=>{const M=xl(h=>{T(h),Reflect.deleteProperty(window,`_${K}`)},!0),K=xl(h=>{N(h),Reflect.deleteProperty(window,`_${M}`)},!0);window.__TAURI_IPC__({cmd:O,callback:M,error:K,...b})})}async function Al(O){return Vo("tauri",O)}async function Df(O=0){return Al({__tauriModule:"Process",message:{cmd:"exit",exitCode:O}})}function Tl(O){return O.type=="Text"?O.value:null}const Ml="__TAURI__"in globalThis;async function es(O,b,T){if(Ml){let N={};return T!=null&&(N={result:T}),await Vo(O,N)}else return await ts(O,b,T)}async function ts(O,b,T){let N=null,M={};T!=null&&(N=JSON.stringify(T),M["Content-Type"]="application/json");const K=await fetch(`/api/${O}`,{method:b,body:N,headers:M});if(K.ok)return await K.json();{let h="";throw K.status<500&&(h=`Likely bug in the webapp: got response "${K.status} ${K.statusText}" for "${O}" request. Additional details, if any, follow. `),h+await K.text()}}async function _l(O){Ml?await Df(O):await ts("exit","POST",O)}async function Nf(){await _l(0)}async function Ko(){await _l(1)}async function Of(){await _l(2)}async function $o(O){return await es("save","PUT",O)}async function Ef(){const O=await es("get_merge_data","GET");for(const b in O)O[b]={left:O[b][0],right:O[b][1],edit:O[b][2]};return O}async function Wf(O,b){return Al({__tauriModule:"Event",message:{cmd:"unlisten",event:O,eventId:b}})}async function Ff(O,b,T){return Al({__tauriModule:"Event",message:{cmd:"listen",event:O,windowLabel:b,handler:xl(T)}}).then(N=>async()=>Wf(O,N))}var Xo;(function(O){O.WINDOW_RESIZED="tauri://resize",O.WINDOW_MOVED="tauri://move",O.WINDOW_CLOSE_REQUESTED="tauri://close-requested",O.WINDOW_CREATED="tauri://window-created",O.WINDOW_DESTROYED="tauri://destroyed",O.WINDOW_FOCUS="tauri://focus",O.WINDOW_BLUR="tauri://blur",O.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",O.WINDOW_THEME_CHANGED="tauri://theme-changed",O.WINDOW_FILE_DROP="tauri://file-drop",O.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",O.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",O.MENU="tauri://menu",O.CHECK_UPDATE="tauri://update",O.UPDATE_AVAILABLE="tauri://update-available",O.INSTALL_UPDATE="tauri://update-install",O.STATUS_UPDATE="tauri://update-status",O.DOWNLOAD_PROGRESS="tauri://update-download-progress"})(Xo||(Xo={}));async function fn(O,b){return Ff(O,null,b)}class If{constructor(b){Eo(this,"merge_views");this.merge_views=b}values(){const b={};for(const T in this.merge_views)b[T]=this.merge_views[T].editor().getValue();return b}}function Hf(O,b){let T=[],N=c=>`${c}_${O}`,M=c=>{let d=Array.from([{file:c.left,side:"left"},{file:c.right,side:"right"},{file:c.edit,side:"middle"}]).find(v=>v.file.type=="Unsupported");if(d==null)return null;if(d.file.type!="Unsupported")throw new Error("this statement is unreachable; this check exists to make TS happy");return cr`error: ${d.file.value} (occurred on the + ${d.side} side)`};for(const c in b){const d=M(b[c]);d!=null?T.push(cr`
${c}: ${d}
`):T.push(cr` -
+
${c} - - -
+
- `)}const K=document.getElementById(N);K.innerHTML="",Li(cr`${T}`,K);let h={};for(let c in b){if(M(b[c])!=null)continue;const d=document.getElementById(`collapse_${O(c)}`),v=document.getElementById(`linewrap_${O(c)}`),m=document.getElementById(`prevChange_${O(c)}`),w=document.getElementById(`nextChange_${O(c)}`),x=document.getElementById(`details_${O(c)}`),_=document.getElementById(`cm_${O(c)}`),I={value:Tl(b[c].edit)??"",origLeft:Tl(b[c].left)??"",orig:Tl(b[c].right)??"",lineNumbers:!0,lineWrapping:!1,mode:"text/plain",connect:"align",collapseIdentical:!0},z=yf.MergeView(_,I);z.editor().setOption("extraKeys",{"Alt-Down":Ci,"Option-Down":Ci,"Cmd-Down":Ci,"Alt-Up":hn,"Option-Up":hn,"Cmd-Up":hn,Tab:Ci}),d.onclick=()=>Pf(z.editor()),v.onclick=()=>Bf(z.editor()),m.onclick=()=>hn(z.editor()),w.onclick=()=>Ci(z.editor()),x.open=!1,x.ontoggle=()=>z.editor().refresh(),console.log(x),h[c]=z}return new If(h)}function Pf(N){N.setOption("collapseIdentical",!N.getOption("collapseIdentical")),N.setValue(N.getValue()),console.log(N.getOption("collapseIdentical")),N.scrollIntoView(null,50)}function Bf(N){N.setOption("lineWrapping",!N.getOption("lineWrapping")),N.setValue(N.getValue())}function Ci(N){N.execCommand("goNextDiff"),N.scrollIntoView(null,50)}function hn(N){N.execCommand("goPrevDiff"),N.scrollIntoView(null,50)}function rs(N){console.log("Caught error, showing to user:",N);const b=document.getElementById("modal_dialog_with_message"),T=document.getElementById("message_of_modal_dialog_with_message");Li(`${String(N)}`,T),b.showModal(),console.log("Done showing error to user.")}async function kl(N){try{return await N()}catch(b){rs(b)}}window.addEventListener("DOMContentLoaded",async()=>{const N=document.getElementById("loading_message");N.innerHTML="",Li(cr` + `)}const K=document.getElementById(O);K.innerHTML="",Li(cr`${T}`,K);let h={};for(let c in b){if(M(b[c])!=null)continue;const d=document.getElementById(`collapse_${N(c)}`),v=document.getElementById(`linewrap_${N(c)}`),m=document.getElementById(`prevChange_${N(c)}`),w=document.getElementById(`nextChange_${N(c)}`),x=document.getElementById(`details_${N(c)}`),_=document.getElementById(`cm_${N(c)}`),I={value:Tl(b[c].edit)??"",origLeft:Tl(b[c].left)??"",orig:Tl(b[c].right)??"",lineNumbers:!0,lineWrapping:!1,mode:"text/plain",connect:"align",collapseIdentical:!0},z=yf.MergeView(_,I);z.editor().setOption("extraKeys",{"Alt-Down":Ci,"Option-Down":Ci,"Cmd-Down":Ci,"Alt-Up":hn,"Option-Up":hn,"Cmd-Up":hn,Tab:Ci}),d.onclick=()=>Pf(z.editor()),v.onclick=()=>Bf(z.editor()),m.onclick=()=>hn(z.editor()),w.onclick=()=>Ci(z.editor()),x.open=!1,x.ontoggle=()=>z.editor().refresh(),console.log(x),h[c]=z}return new If(h)}function Pf(O){O.setOption("collapseIdentical",!O.getOption("collapseIdentical")),O.setValue(O.getValue()),console.log(O.getOption("collapseIdentical")),O.scrollIntoView(null,50)}function Bf(O){O.setOption("lineWrapping",!O.getOption("lineWrapping")),O.setValue(O.getValue())}function Ci(O){O.execCommand("goNextDiff"),O.scrollIntoView(null,50)}function hn(O){O.execCommand("goPrevDiff"),O.scrollIntoView(null,50)}function rs(O){console.log("Caught error, showing to user:",O);const b=document.getElementById("modal_dialog_with_message"),T=document.getElementById("message_of_modal_dialog_with_message");Li(`${String(O)}`,T),b.showModal(),console.log("Done showing error to user.")}async function kl(O){try{return await O()}catch(b){rs(b)}}window.addEventListener("DOMContentLoaded",async()=>{const O=document.getElementById("loading_message");O.innerHTML="",Li(cr`

Loading...

Getting the data we want to merge...

- `,N);let b;try{b=await Ef()}catch(v){throw rs(v),await Of(),new Error("Internal error: this statement should be unreachable")}Li(cr` + `,O);let b;try{b=await Ef()}catch(v){throw rs(v),await Of(),new Error("Internal error: this statement should be unreachable")}Li(cr`

Loading...

Rendering diffs...

- `,N);const T=Hf("lit",b);Li(cr``,N);const O=async()=>await kl(async()=>{await $o(T.values())}),M=document.getElementById("button_save"),K=document.getElementById("button_save_and_quit"),h=async()=>await kl(async()=>{await $o(T.values()),M.disabled=!0,K.disabled=!0,Nf(),await new Promise(v=>setTimeout(v,100)),window.close()}),c=async()=>await kl(async()=>{M.disabled=!0,K.disabled=!0,Ko(),await new Promise(v=>setTimeout(v,100)),window.close()}),d=()=>(window.location.reload(),!1);M.onclick=O,K.onclick=h,document.getElementById("button_abandon_changes_and_quit").onclick=c,document.getElementById("button_revert").onclick=d,Ml?(await fn("save",async v=>O()),await fn("save_and_quit",async v=>h()),await fn("revert",async v=>d()),await fn("abandon_changes_and_quit",async v=>Ko())):document.addEventListener("keydown",async v=>{const m=v.metaKey||v.ctrlKey;return v.key=="s"&&m?(await O(),v.preventDefault(),!1):!0})});button_collapse_uncollapse_menu.onclick=function(N){console.log(N),console.log(this.closest(".main-menu")),this.closest(".main-menu").classList.toggle("collapsed")}; + `,O);const T=Hf("lit",b);Li(cr``,O);const N=async()=>await kl(async()=>{await $o(T.values())}),M=document.getElementById("button_save"),K=document.getElementById("button_save_and_quit"),h=async()=>await kl(async()=>{await $o(T.values()),M.disabled=!0,K.disabled=!0,Nf(),await new Promise(v=>setTimeout(v,100)),window.close()}),c=async()=>await kl(async()=>{M.disabled=!0,K.disabled=!0,Ko(),await new Promise(v=>setTimeout(v,100)),window.close()}),d=()=>(window.location.reload(),!1);M.onclick=N,K.onclick=h,document.getElementById("button_abandon_changes_and_quit").onclick=c,document.getElementById("button_revert").onclick=d,Ml?(await fn("save",async v=>N()),await fn("save_and_quit",async v=>h()),await fn("revert",async v=>d()),await fn("abandon_changes_and_quit",async v=>Ko())):document.addEventListener("keydown",async v=>{const m=v.metaKey||v.ctrlKey;return v.key=="s"&&m?(await N(),v.preventDefault(),!1):!0})}); diff --git a/webapp/dist/index.html b/webapp/dist/index.html index 20624b8..8a9ae80 100644 --- a/webapp/dist/index.html +++ b/webapp/dist/index.html @@ -3,17 +3,8 @@ - Tauri App - - + Diffedit3 + @@ -37,9 +28,10 @@
×
- - +
@@ -52,6 +44,5 @@

Loading...

If this message persists, Javascript is not working.

- diff --git a/webapp/index.html b/webapp/index.html index 0969456..0629695 100644 --- a/webapp/index.html +++ b/webapp/index.html @@ -4,18 +4,14 @@ - Tauri App + Diffedit3 + - @@ -38,9 +34,10 @@
×
- - +
@@ -53,13 +50,5 @@

Loading...

If this message persists, Javascript is not working.

- -